vendor: 6,238 bytes, lines 1-9
1var Yw=e=>{throw TypeError(e)};var hm=(e,t,r)=>t.has(e)||Yw("Cannot "+r);var ue=(e,t,r)=>(hm(e,t,"read from private field"),r?r.call(e):t.get(e)),Ue=(e,t,r)=>t.has(e)?Yw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Ne=(e,t,r,n)=>(hm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),lr=(e,t,r)=>(hm(e,t,"access private method"),r);var N0=(e,t,r,n)=>({set _(i){Ne(e,t,i,r)},get _(){return ue(e,t,n)}});function zD(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Li=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Nj={exports:{}},Hh={},Dj={exports:{}},$e={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var s0=Symbol.for("react.element"),UD=Symbol.for("react.portal"),WD=Symbol.for("react.fragment"),HD=Symbol.for("react.strict_mode"),KD=Symbol.for("react.profiler"),VD=Symbol.for("react.provider"),GD=Symbol.for("react.context"),qD=Symbol.for("react.forward_ref"),YD=Symbol.for("react.suspense"),ZD=Symbol.for("react.memo"),XD=Symbol.for("react.lazy"),Zw=Symbol.iterator;function QD(e){return e===null||typeof e!="object"?null:(e=Zw&&e[Zw]||e["@@iterator"],typeof e=="function"?e:null)}var Fj={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Pj=Object.assign,Oj={};function mc(e,t,r){this.props=e,this.context=t,this.refs=Oj,this.updater=r||Fj}mc.prototype.isReactComponent={};mc.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")};mc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Tj(){}Tj.prototype=mc.prototype;function c1(e,t,r){this.props=e,this.context=t,this.refs=Oj,this.updater=r||Fj}var u1=c1.prototype=new Tj;u1.constructor=c1;Pj(u1,mc.prototype);u1.isPureReactComponent=!0;var Xw=Array.isArray,$j=Object.prototype.hasOwnProperty,d1={current:null},Ij={key:!0,ref:!0,__self:!0,__source:!0};function Mj(e,t,r){var n,i={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)$j.call(t,n)&&!Ij.hasOwnProperty(n)&&(i[n]=t[n]);var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)i[n]===void 0&&(i[n]=l[n]);return{$$typeof:s0,type:e,key:a,ref:o,props:i,_owner:d1.current}}function JD(e,t){return{$$typeof:s0,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function x1(e){return typeof e=="object"&&e!==null&&e.$$typeof===s0}function eF(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Qw=/\/+/g;function pm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?eF(""+e.key):t.toString(36)}function Fx(e,t,r,n,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case s0:case UD:o=!0}}if(o)return o=e,i=i(o),e=n===""?"."+pm(o,0):n,Xw(i)?(r="",e!=null&&(r=e.replace(Qw,"$&/")+"/"),Fx(i,t,r,"",function(u){return u})):i!=null&&(x1(i)&&(i=JD(i,r+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Qw,"$&/")+"/")+e)),t.push(i)),1;if(o=0,n=n===""?".":n+":",Xw(e))for(var l=0;l<e.length;l++){a=e[l];var c=n+pm(a,l);o+=Fx(a,t,r,c,i)}else if(c=QD(e),typeof c=="function")for(e=c.call(e),l=0;!(a=e.next()).done;)a=a.value,c=n+pm(a,l++),o+=Fx(a,t,r,c,i);else if(a==="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 o}function D0(e,t,r){if(e==null)return e;var n=[],i=0;return Fx(e,n,"","",function(a){return t.call(r,a,i++)}),n}function tF(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Nr={current:null},Px={transition:null},rF={ReactCurrentDispatcher:Nr,ReactCurrentBatchConfig:Px,ReactCurrentOwner:d1};function Rj(){throw Error("act(...) is not supported in production builds of React.")}$e.Children={map:D0,forEach:function(e,t,r){D0(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return D0(e,function(){t++}),t},toArray:function(e){return D0(e,function(t){return t})||[]},only:function(e){if(!x1(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};$e.Component=mc;$e.Fragment=WD;$e.Profiler=KD;$e.PureComponent=c1;$e.StrictMode=HD;$e.Suspense=YD;
vendor: 4,808 bytes, lines 9-25
9$e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rF;$e.act=Rj;$e.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Pj({},e.props),i=e.key,a=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,o=d1.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)$j.call(t,c)&&!Ij.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];n.children=l}return{$$typeof:s0,type:e.type,key:i,ref:a,props:n,_owner:o}};$e.createContext=function(e){return e={$$typeof:GD,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:VD,_context:e},e.Consumer=e};$e.createElement=Mj;$e.createFactory=function(e){var t=Mj.bind(null,e);return t.type=e,t};$e.createRef=function(){return{current:null}};$e.forwardRef=function(e){return{$$typeof:qD,render:e}};$e.isValidElement=x1;$e.lazy=function(e){return{$$typeof:XD,_payload:{_status:-1,_result:e},_init:tF}};$e.memo=function(e,t){return{$$typeof:ZD,type:e,compare:t===void 0?null:t}};$e.startTransition=function(e){var t=Px.transition;Px.transition={};try{e()}finally{Px.transition=t}};$e.unstable_act=Rj;$e.useCallback=function(e,t){return Nr.current.useCallback(e,t)};$e.useContext=function(e){return Nr.current.useContext(e)};$e.useDebugValue=function(){};$e.useDeferredValue=function(e){return Nr.current.useDeferredValue(e)};$e.useEffect=function(e,t){return Nr.current.useEffect(e,t)};$e.useId=function(){return Nr.current.useId()};$e.useImperativeHandle=function(e,t,r){return Nr.current.useImperativeHandle(e,t,r)};$e.useInsertionEffect=function(e,t){return Nr.current.useInsertionEffect(e,t)};$e.useLayoutEffect=function(e,t){return Nr.current.useLayoutEffect(e,t)};$e.useMemo=function(e,t){return Nr.current.useMemo(e,t)};$e.useReducer=function(e,t,r){return Nr.current.useReducer(e,t,r)};$e.useRef=function(e){return Nr.current.useRef(e)};$e.useState=function(e){return Nr.current.useState(e)};$e.useSyncExternalStore=function(e,t,r){return Nr.current.useSyncExternalStore(e,t,r)};$e.useTransition=function(){return Nr.current.useTransition()};$e.version="18.3.1";Dj.exports=$e;var A=Dj.exports;const q=qe(A),f1=zD({__proto__:null,default:q},[A]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var nF=A,iF=Symbol.for("react.element"),aF=Symbol.for("react.fragment"),sF=Object.prototype.hasOwnProperty,oF=nF.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,lF={key:!0,ref:!0,__self:!0,__source:!0};function Lj(e,t,r){var n,i={},a=null,o=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)sF.call(t,n)&&!lF.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:iF,type:e,key:a,ref:o,props:i,_owner:oF.current}}Hh.Fragment=aF;Hh.jsx=Lj;Hh.jsxs=Lj;Nj.exports=Hh;var s=Nj.exports,zj={exports:{}},sn={},Uj={exports:{}},Wj={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(e){function t(L,F){var U=L.length;L.push(F);e:for(;0<U;){var D=U-1>>>1,N=L[D];if(0<i(N,F))L[D]=F,L[U]=N,U=D;else break e}}function r(L){return L.length===0?null:L[0]}function n(L){if(L.length===0)return null;var F=L[0],U=L.pop();if(U!==F){L[0]=U;e:for(var D=0,N=L.length,K=N>>>1;D<K;){var R=2*(D+1)-1,H=L[R],X=R+1,ie=L[X];if(0>i(H,U))X<N&&0>i(ie,H)?(L[D]=ie,L[X]=U,D=X):(L[D]=H,L[R]=U,D=R);else if(X<N&&0>i(ie,U))L[D]=ie,L[X]=U,D=X;else break e}}return F}function i(L,F){var U=L.sortIndex-F.sortIndex;return U!==0?U:L.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,x=null,f=3,h=!1,m=!1,p=!1,v=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(L){for(var F=r(u);F!==null;){if(F.callback===null)n(u);else if(F.startTime<=L)n(u),F.sortIndex=F.expirationTime,t(c,F);else break;F=r(u)}}
vendor: 9,390 bytes, lines 25-34
25function w(L){if(p=!1,g(L),!m)if(r(c)!==null)m=!0,W(E);else{var F=r(u);F!==null&&z(w,F.startTime-L)}}function E(L,F){m=!1,p&&(p=!1,y(S),S=-1),h=!0;var U=f;try{for(g(F),x=r(c);x!==null&&(!(x.expirationTime>F)||L&&!I());){var D=x.callback;if(typeof D=="function"){x.callback=null,f=x.priorityLevel;var N=D(x.expirationTime<=F);F=e.unstable_now(),typeof N=="function"?x.callback=N:x===r(c)&&n(c),g(F)}else n(c);x=r(c)}if(x!==null)var K=!0;else{var R=r(u);R!==null&&z(w,R.startTime-F),K=!1}return K}finally{x=null,f=U,h=!1}}var C=!1,j=null,S=-1,_=5,O=-1;function I(){return!(e.unstable_now()-O<_)}function B(){if(j!==null){var L=e.unstable_now();O=L;var F=!0;try{F=j(!0,L)}finally{F?T():(C=!1,j=null)}}else C=!1}var T;if(typeof b=="function")T=function(){b(B)};else if(typeof MessageChannel<"u"){var k=new MessageChannel,$=k.port2;k.port1.onmessage=B,T=function(){$.postMessage(null)}}else T=function(){v(B,0)};function W(L){j=L,C||(C=!0,T())}function z(L,F){S=v(function(){L(e.unstable_now())},F)}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(L){L.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,W(E))},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(L){switch(f){case 1:case 2:case 3:var F=3;break;default:F=f}var U=f;f=F;try{return L()}finally{f=U}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(L,F){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var U=f;f=L;try{return F()}finally{f=U}},e.unstable_scheduleCallback=function(L,F,U){var D=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?D+U:D):U=D,L){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=U+N,L={id:d++,callback:F,priorityLevel:L,startTime:U,expirationTime:N,sortIndex:-1},U>D?(L.sortIndex=U,t(u,L),r(c)===null&&L===r(u)&&(p?(y(S),S=-1):p=!0,z(w,U-D))):(L.sortIndex=N,t(c,L),m||h||(m=!0,W(E))),L},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(L){var F=f;return function(){var U=f;f=F;try{return L.apply(this,arguments)}finally{f=U}}}})(Wj);Uj.exports=Wj;var cF=Uj.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var uF=A,nn=cF;function fe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 Hj=new Set,Lu={};function Co(e,t){Ol(e,t),Ol(e+"Capture",t)}function Ol(e,t){for(Lu[e]=t,e=0;e<t.length;e++)Hj.add(t[e])}var Qi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rv=Object.prototype.hasOwnProperty,dF=/^[: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]*$/,Jw={},e2={};function xF(e){return rv.call(e2,e)?!0:rv.call(Jw,e)?!1:dF.test(e)?e2[e]=!0:(Jw[e]=!0,!1)}function fF(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function hF(e,t,r,n){if(t===null||typeof t>"u"||fF(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 Dr(e,t,r,n,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var sr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){sr[e]=new Dr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];sr[t]=new Dr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){sr[e]=new Dr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){sr[e]=new Dr(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){sr[e]=new Dr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){sr[e]=new Dr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){sr[e]=new Dr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){sr[e]=new Dr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){sr[e]=new Dr(e,5,!1,e.toLowerCase(),null,!1,!1)});var h1=/[\-:]([a-z])/g;function p1(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(h1,p1);sr[t]=new Dr(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(h1,p1);sr[t]=new Dr(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(h1,p1);sr[t]=new Dr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){sr[e]=new Dr(e,1,!1,e.toLowerCase(),null,!1,!1)});sr.xlinkHref=new Dr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){sr[e]=new Dr(e,1,!1,e.toLowerCase(),null,!0,!0)});function m1(e,t,r,n){var i=sr.hasOwnProperty(t)?sr[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(hF(t,r,i,n)&&(r=null),n||i===null?xF(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(t=i.attributeName,n=i.attributeNamespace,r===null?e.removeAttribute(t):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var fa=uF.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,F0=Symbol.for("react.element"),Yo=Symbol.for("react.portal"),Zo=Symbol.for("react.fragment"),g1=Symbol.for("react.strict_mode"),nv=Symbol.for("react.profiler"),Kj=Symbol.for("react.provider"),Vj=Symbol.for("react.context"),v1=Symbol.for("react.forward_ref"),iv=Symbol.for("react.suspense"),av=Symbol.for("react.suspense_list"),y1=Symbol.for("react.memo"),_a=Symbol.for("react.lazy"),Gj=Symbol.for("react.offscreen"),t2=Symbol.iterator;function Lc(e){return e===null||typeof e!="object"?null:(e=t2&&e[t2]||e["@@iterator"],typeof e=="function"?e:null)}var bt=Object.assign,mm;function uu(e){if(mm===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);mm=t&&t[1]||""}return` 34`+mm+e}var gm=!1;function vm(e,t){if(!e||gm)return"";gm=!0;var r=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(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}
vendor: 14,106 bytes, lines 34-37
34catch(u){if(u&&n&&typeof u.stack=="string"){for(var i=u.stack.split(` 35`),a=n.stack.split(` 36`),o=i.length-1,l=a.length-1;1<=o&&0<=l&&i[o]!==a[l];)l--;for(;1<=o&&0<=l;o--,l--)if(i[o]!==a[l]){if(o!==1||l!==1)do if(o--,l--,0>l||i[o]!==a[l]){var c=` 37`+i[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{gm=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?uu(e):""}function pF(e){switch(e.tag){case 5:return uu(e.type);case 16:return uu("Lazy");case 13:return uu("Suspense");case 19:return uu("SuspenseList");case 0:case 2:case 15:return e=vm(e.type,!1),e;case 11:return e=vm(e.type.render,!1),e;case 1:return e=vm(e.type,!0),e;default:return""}}function sv(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 Zo:return"Fragment";case Yo:return"Portal";case nv:return"Profiler";case g1:return"StrictMode";case iv:return"Suspense";case av:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Vj:return(e.displayName||"Context")+".Consumer";case Kj:return(e._context.displayName||"Context")+".Provider";case v1:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case y1:return t=e.displayName||null,t!==null?t:sv(e.type)||"Memo";case _a:t=e._payload,e=e._init;try{return sv(e(t))}catch{}}return null}function mF(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 sv(t);case 8:return t===g1?"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 is(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qj(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gF(e){var t=qj(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function P0(e){e._valueTracker||(e._valueTracker=gF(e))}function Yj(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=qj(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Jx(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 ov(e,t){var r=t.checked;return bt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function r2(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=is(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Zj(e,t){t=t.checked,t!=null&&m1(e,"checked",t,!1)}function lv(e,t){Zj(e,t);var r=is(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?cv(e,t.type,r):t.hasOwnProperty("defaultValue")&&cv(e,t.type,is(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function n2(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function cv(e,t,r){(t!=="number"||Jx(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var du=Array.isArray;function xl(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+is(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function uv(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(fe(91));return bt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function i2(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(fe(92));if(du(r)){if(1<r.length)throw Error(fe(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:is(r)}}function Xj(e,t){var r=is(t.value),n=is(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function a2(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Qj(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 dv(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Qj(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var O0,Jj=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(O0=O0||document.createElement("div"),O0.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=O0.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zu(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var bu={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},vF=["Webkit","ms","Moz","O"];Object.keys(bu).forEach(function(e){vF.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),bu[t]=bu[e]})});function ek(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||bu.hasOwnProperty(e)&&bu[e]?(""+t).trim():t+"px"}function tk(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=ek(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var yF=bt({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 xv(e,t){if(t){if(yF[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(fe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(fe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(fe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(fe(62))}}function fv(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 hv=null;function b1(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pv=null,fl=null,hl=null;function s2(e){if(e=c0(e)){if(typeof pv!="function")throw Error(fe(280));var t=e.stateNode;t&&(t=Yh(t),pv(e.stateNode,e.type,t))}}function rk(e){fl?hl?hl.push(e):hl=[e]:fl=e}function nk(){if(fl){var e=fl,t=hl;if(hl=fl=null,s2(e),t)for(e=0;e<t.length;e++)s2(t[e])}}function ik(e,t){return e(t)}function ak(){}var ym=!1;function sk(e,t,r){if(ym)return e(t,r);ym=!0;try{return ik(e,t,r)}finally{ym=!1,(fl!==null||hl!==null)&&(ak(),nk())}}function Uu(e,t){var r=e.stateNode;if(r===null)return null;var n=Yh(r);if(n===null)return null;r=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(fe(231,t,typeof r));return r}var mv=!1;if(Qi)try{var zc={};Object.defineProperty(zc,"passive",{get:function(){mv=!0}}),window.addEventListener("test",zc,zc),window.removeEventListener("test",zc,zc)}catch{mv=!1}function bF(e,t,r,n,i,a,o,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var Eu=!1,ef=null,tf=!1,gv=null,EF={onError:function(e){Eu=!0,ef=e}};function wF(e,t,r,n,i,a,o,l,c){Eu=!1,ef=null,bF.apply(EF,arguments)}function CF(e,t,r,n,i,a,o,l,c){if(wF.apply(this,arguments),Eu){if(Eu){var u=ef;Eu=!1,ef=null}else throw Error(fe(198));tf||(tf=!0,gv=u)}}function Ao(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function ok(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 o2(e){if(Ao(e)!==e)throw Error(fe(188))}function AF(e){var t=e.alternate;if(!t){if(t=Ao(e),t===null)throw Error(fe(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var a=i.alternate;if(a===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return o2(i),e;if(a===n)return o2(i),t;a=a.sibling}throw Error(fe(188))}if(r.return!==n.return)r=i,n=a;else{for(var o=!1,l=i.child;l;){if(l===r){o=!0,r=i,n=a;break}if(l===n){o=!0,n=i,r=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===r){o=!0,r=a,n=i;break}if(l===n){o=!0,n=a,r=i;break}l=l.sibling}if(!o)throw Error(fe(189))}}if(r.alternate!==n)throw Error(fe(190))}if(r.tag!==3)throw Error(fe(188));return r.stateNode.current===r?e:t}function lk(e){return e=AF(e),e!==null?ck(e):null}function ck(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ck(e);if(t!==null)return t;e=e.sibling}return null}var uk=nn.unstable_scheduleCallback,l2=nn.unstable_cancelCallback,jF=nn.unstable_shouldYield,kF=nn.unstable_requestPaint,St=nn.unstable_now,_F=nn.unstable_getCurrentPriorityLevel,E1=nn.unstable_ImmediatePriority,dk=nn.unstable_UserBlockingPriority,rf=nn.unstable_NormalPriority,SF=nn.unstable_LowPriority,xk=nn.unstable_IdlePriority,Kh=null,yi=null;function BF(e){if(yi&&typeof yi.onCommitFiberRoot=="function")try{yi.onCommitFiberRoot(Kh,e,void 0,(e.current.flags&128)===128)}catch{}}var Zn=Math.clz32?Math.clz32:FF,NF=Math.log,DF=Math.LN2;function FF(e){return e>>>=0,e===0?32:31-(NF(e)/DF|0)|0}var T0=64,$0=4194304;function xu(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 nf(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var l=o&~i;l!==0?n=xu(l):(a&=o,a!==0&&(n=xu(a)))}else o=r&~i,o!==0?n=xu(o):a!==0&&(n=xu(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Zn(t),i=1<<r,n|=e[r],t&=~i;return n}function PF(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 OF(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Zn(a),l=1<<o,c=i[o];c===-1?(!(l&r)||l&n)&&(i[o]=PF(l,t)):c<=t&&(e.expiredLanes|=l),a&=~l}}function vv(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function fk(){var e=T0;return T0<<=1,!(T0&4194240)&&(T0=64),e}function bm(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}
vendor: 4,087 bytes, line 37
37function o0(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Zn(t),e[t]=r}function TF(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-Zn(r),a=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~a}}function w1(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Zn(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var Ye=0;function hk(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var pk,C1,mk,gk,vk,yv=!1,I0=[],Ga=null,qa=null,Ya=null,Wu=new Map,Hu=new Map,Da=[],$F="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 c2(e,t){switch(e){case"focusin":case"focusout":Ga=null;break;case"dragenter":case"dragleave":qa=null;break;case"mouseover":case"mouseout":Ya=null;break;case"pointerover":case"pointerout":Wu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hu.delete(t.pointerId)}}function Uc(e,t,r,n,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[i]},t!==null&&(t=c0(t),t!==null&&C1(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function IF(e,t,r,n,i){switch(t){case"focusin":return Ga=Uc(Ga,e,t,r,n,i),!0;case"dragenter":return qa=Uc(qa,e,t,r,n,i),!0;case"mouseover":return Ya=Uc(Ya,e,t,r,n,i),!0;case"pointerover":var a=i.pointerId;return Wu.set(a,Uc(Wu.get(a)||null,e,t,r,n,i)),!0;case"gotpointercapture":return a=i.pointerId,Hu.set(a,Uc(Hu.get(a)||null,e,t,r,n,i)),!0}return!1}function yk(e){var t=Rs(e.target);if(t!==null){var r=Ao(t);if(r!==null){if(t=r.tag,t===13){if(t=ok(r),t!==null){e.blockedOn=t,vk(e.priority,function(){mk(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ox(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=bv(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);hv=n,r.target.dispatchEvent(n),hv=null}else return t=c0(r),t!==null&&C1(t),e.blockedOn=r,!1;t.shift()}return!0}function u2(e,t,r){Ox(e)&&r.delete(t)}function MF(){yv=!1,Ga!==null&&Ox(Ga)&&(Ga=null),qa!==null&&Ox(qa)&&(qa=null),Ya!==null&&Ox(Ya)&&(Ya=null),Wu.forEach(u2),Hu.forEach(u2)}function Wc(e,t){e.blockedOn===t&&(e.blockedOn=null,yv||(yv=!0,nn.unstable_scheduleCallback(nn.unstable_NormalPriority,MF)))}function Ku(e){function t(i){return Wc(i,e)}if(0<I0.length){Wc(I0[0],e);for(var r=1;r<I0.length;r++){var n=I0[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Ga!==null&&Wc(Ga,e),qa!==null&&Wc(qa,e),Ya!==null&&Wc(Ya,e),Wu.forEach(t),Hu.forEach(t),r=0;r<Da.length;r++)n=Da[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Da.length&&(r=Da[0],r.blockedOn===null);)yk(r),r.blockedOn===null&&Da.shift()}var pl=fa.ReactCurrentBatchConfig,af=!0;function RF(e,t,r,n){var i=Ye,a=pl.transition;pl.transition=null;try{Ye=1,A1(e,t,r,n)}finally{Ye=i,pl.transition=a}}function LF(e,t,r,n){var i=Ye,a=pl.transition;pl.transition=null;try{Ye=4,A1(e,t,r,n)}finally{Ye=i,pl.transition=a}}function A1(e,t,r,n){if(af){var i=bv(e,t,r,n);if(i===null)Nm(e,t,n,sf,r),c2(e,n);else if(IF(i,e,t,r,n))n.stopPropagation();else if(c2(e,n),t&4&&-1<$F.indexOf(e)){for(;i!==null;){var a=c0(i);if(a!==null&&pk(a),a=bv(e,t,r,n),a===null&&Nm(e,t,n,sf,r),a===i)break;i=a}i!==null&&n.stopPropagation()}else Nm(e,t,n,null,r)}}var sf=null;function bv(e,t,r,n){if(sf=null,e=b1(n),e=Rs(e),e!==null)if(t=Ao(e),t===null)e=null;else if(r=t.tag,r===13){if(e=ok(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return sf=e,null}
vendor: 10,401 bytes, line 37
37function bk(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(_F()){case E1:return 1;case dk:return 4;case rf:case SF:return 16;case xk:return 536870912;default:return 16}default:return 16}}var La=null,j1=null,Tx=null;function Ek(){if(Tx)return Tx;var e,t=j1,r=t.length,n,i="value"in La?La.value:La.textContent,a=i.length;for(e=0;e<r&&t[e]===i[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===i[a-n];n++);return Tx=i.slice(e,1<n?1-n:void 0)}function $x(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 M0(){return!0}function d2(){return!1}function on(e){function t(r,n,i,a,o){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(a):a[l]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?M0:d2,this.isPropagationStopped=d2,this}return bt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=M0)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=M0)},persist:function(){},isPersistent:M0}),t}var gc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},k1=on(gc),l0=bt({},gc,{view:0,detail:0}),zF=on(l0),Em,wm,Hc,Vh=bt({},l0,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_1,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!==Hc&&(Hc&&e.type==="mousemove"?(Em=e.screenX-Hc.screenX,wm=e.screenY-Hc.screenY):wm=Em=0,Hc=e),Em)},movementY:function(e){return"movementY"in e?e.movementY:wm}}),x2=on(Vh),UF=bt({},Vh,{dataTransfer:0}),WF=on(UF),HF=bt({},l0,{relatedTarget:0}),Cm=on(HF),KF=bt({},gc,{animationName:0,elapsedTime:0,pseudoElement:0}),VF=on(KF),GF=bt({},gc,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),qF=on(GF),YF=bt({},gc,{data:0}),f2=on(YF),ZF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},XF={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"},QF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function JF(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=QF[e])?!!t[e]:!1}function _1(){return JF}var eP=bt({},l0,{key:function(e){if(e.key){var t=ZF[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=$x(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?XF[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_1,charCode:function(e){return e.type==="keypress"?$x(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?$x(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),tP=on(eP),rP=bt({},Vh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),h2=on(rP),nP=bt({},l0,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_1}),iP=on(nP),aP=bt({},gc,{propertyName:0,elapsedTime:0,pseudoElement:0}),sP=on(aP),oP=bt({},Vh,{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}),lP=on(oP),cP=[9,13,27,32],S1=Qi&&"CompositionEvent"in window,wu=null;Qi&&"documentMode"in document&&(wu=document.documentMode);var uP=Qi&&"TextEvent"in window&&!wu,wk=Qi&&(!S1||wu&&8<wu&&11>=wu),p2=" ",m2=!1;function Ck(e,t){switch(e){case"keyup":return cP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ak(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xo=!1;function dP(e,t){switch(e){case"compositionend":return Ak(t);case"keypress":return t.which!==32?null:(m2=!0,p2);case"textInput":return e=t.data,e===p2&&m2?null:e;default:return null}}function xP(e,t){if(Xo)return e==="compositionend"||!S1&&Ck(e,t)?(e=Ek(),Tx=j1=La=null,Xo=!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 wk&&t.locale!=="ko"?null:t.data;default:return null}}var fP={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 g2(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fP[e.type]:t==="textarea"}function jk(e,t,r,n){rk(n),t=of(t,"onChange"),0<t.length&&(r=new k1("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Cu=null,Vu=null;function hP(e){$k(e,0)}function Gh(e){var t=el(e);if(Yj(t))return e}function pP(e,t){if(e==="change")return t}var kk=!1;if(Qi){var Am;if(Qi){var jm="oninput"in document;if(!jm){var v2=document.createElement("div");v2.setAttribute("oninput","return;"),jm=typeof v2.oninput=="function"}Am=jm}else Am=!1;kk=Am&&(!document.documentMode||9<document.documentMode)}function y2(){Cu&&(Cu.detachEvent("onpropertychange",_k),Vu=Cu=null)}function _k(e){if(e.propertyName==="value"&&Gh(Vu)){var t=[];jk(t,Vu,e,b1(e)),sk(hP,t)}}function mP(e,t,r){e==="focusin"?(y2(),Cu=t,Vu=r,Cu.attachEvent("onpropertychange",_k)):e==="focusout"&&y2()}function gP(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gh(Vu)}function vP(e,t){if(e==="click")return Gh(t)}function yP(e,t){if(e==="input"||e==="change")return Gh(t)}function bP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ei=typeof Object.is=="function"?Object.is:bP;function Gu(e,t){if(ei(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!rv.call(t,i)||!ei(e[i],t[i]))return!1}return!0}function b2(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function E2(e,t){var r=b2(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=b2(r)}}function Sk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bk(){for(var e=window,t=Jx();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Jx(e.document)}return t}function B1(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 EP(e){var t=Bk(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Sk(r.ownerDocument.documentElement,r)){if(n!==null&&B1(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=E2(r,a);var o=E2(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var wP=Qi&&"documentMode"in document&&11>=document.documentMode,Qo=null,Ev=null,Au=null,wv=!1;function w2(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;wv||Qo==null||Qo!==Jx(n)||(n=Qo,"selectionStart"in n&&B1(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),Au&&Gu(Au,n)||(Au=n,n=of(Ev,"onSelect"),0<n.length&&(t=new k1("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Qo)))}function R0(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Jo={animationend:R0("Animation","AnimationEnd"),animationiteration:R0("Animation","AnimationIteration"),animationstart:R0("Animation","AnimationStart"),transitionend:R0("Transition","TransitionEnd")},km={},Nk={};Qi&&(Nk=document.createElement("div").style,"AnimationEvent"in window||(delete Jo.animationend.animation,delete Jo.animationiteration.animation,delete Jo.animationstart.animation),"TransitionEvent"in window||delete Jo.transitionend.transition);function qh(e){if(km[e])return km[e];if(!Jo[e])return e;var t=Jo[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Nk)return km[e]=t[r];return e}var Dk=qh("animationend"),Fk=qh("animationiteration"),Pk=qh("animationstart"),Ok=qh("transitionend"),Tk=new Map,C2="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 ds(e,t){Tk.set(e,t),Co(t,[e])}for(var _m=0;_m<C2.length;_m++){var Sm=C2[_m],CP=Sm.toLowerCase(),AP=Sm[0].toUpperCase()+Sm.slice(1);ds(CP,"on"+AP)}ds(Dk,"onAnimationEnd");ds(Fk,"onAnimationIteration");ds(Pk,"onAnimationStart");ds("dblclick","onDoubleClick");ds("focusin","onFocus");ds("focusout","onBlur");ds(Ok,"onTransitionEnd");Ol("onMouseEnter",["mouseout","mouseover"]);Ol("onMouseLeave",["mouseout","mouseover"]);Ol("onPointerEnter",["pointerout","pointerover"]);Ol("onPointerLeave",["pointerout","pointerover"]);Co("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Co("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Co("onBeforeInput",["compositionend","keypress","textInput","paste"]);Co("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Co("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Co("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fu="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(" "),jP=new Set("cancel close invalid load scroll toggle".split(" ").concat(fu));function A2(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,CF(n,t,void 0,e),e.currentTarget=null}function $k(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var o=n.length-1;0<=o;o--){var l=n[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==a&&i.isPropagationStopped())break e;A2(i,l,u),a=c}else for(o=0;o<n.length;o++){if(l=n[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==a&&i.isPropagationStopped())break e;A2(i,l,u),a=c}}}if(tf)throw e=gv,tf=!1,gv=null,e}function st(e,t){var r=t[_v];r===void 0&&(r=t[_v]=new Set);var n=e+"__bubble";r.has(n)||(Ik(t,e,2,!1),r.add(n))}function Bm(e,t,r){var n=0;t&&(n|=4),Ik(r,e,n,t)}var L0="_reactListening"+Math.random().toString(36).slice(2);function qu(e){if(!e[L0]){e[L0]=!0,Hj.forEach(function(r){r!=="selectionchange"&&(jP.has(r)||Bm(r,!1,e),Bm(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[L0]||(t[L0]=!0,Bm("selectionchange",!1,t))}}function Ik(e,t,r,n){switch(bk(t)){case 1:var i=RF;break;case 4:i=LF;break;default:i=A1}r=i.bind(null,t,r,e),i=void 0,!mv||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function Nm(e,t,r,n,i){var a=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var l=n.stateNode.containerInfo;
vendor: 5,573 bytes, lines 37-38
37if(l===i||l.nodeType===8&&l.parentNode===i)break;if(o===4)for(o=n.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;l!==null;){if(o=Rs(l),o===null)return;if(c=o.tag,c===5||c===6){n=a=o;continue e}l=l.parentNode}}n=n.return}sk(function(){var u=a,d=b1(r),x=[];e:{var f=Tk.get(e);if(f!==void 0){var h=k1,m=e;switch(e){case"keypress":if($x(r)===0)break e;case"keydown":case"keyup":h=tP;break;case"focusin":m="focus",h=Cm;break;case"focusout":m="blur",h=Cm;break;case"beforeblur":case"afterblur":h=Cm;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=x2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=WF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=iP;break;case Dk:case Fk:case Pk:h=VF;break;case Ok:h=sP;break;case"scroll":h=zF;break;case"wheel":h=lP;break;case"copy":case"cut":case"paste":h=qF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=h2}var p=(t&4)!==0,v=!p&&e==="scroll",y=p?f!==null?f+"Capture":null:f;p=[];for(var b=u,g;b!==null;){g=b;var w=g.stateNode;if(g.tag===5&&w!==null&&(g=w,y!==null&&(w=Uu(b,y),w!=null&&p.push(Yu(b,w,g)))),v)break;b=b.return}0<p.length&&(f=new h(f,m,null,r,d),x.push({event:f,listeners:p}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&r!==hv&&(m=r.relatedTarget||r.fromElement)&&(Rs(m)||m[Ji]))break e;if((h||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,h?(m=r.relatedTarget||r.toElement,h=u,m=m?Rs(m):null,m!==null&&(v=Ao(m),m!==v||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(p=x2,w="onMouseLeave",y="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(p=h2,w="onPointerLeave",y="onPointerEnter",b="pointer"),v=h==null?f:el(h),g=m==null?f:el(m),f=new p(w,b+"leave",h,r,d),f.target=v,f.relatedTarget=g,w=null,Rs(d)===u&&(p=new p(y,b+"enter",m,r,d),p.target=g,p.relatedTarget=v,w=p),v=w,h&&m)t:{for(p=h,y=m,b=0,g=p;g;g=Fo(g))b++;for(g=0,w=y;w;w=Fo(w))g++;for(;0<b-g;)p=Fo(p),b--;for(;0<g-b;)y=Fo(y),g--;for(;b--;){if(p===y||y!==null&&p===y.alternate)break t;p=Fo(p),y=Fo(y)}p=null}else p=null;h!==null&&j2(x,f,h,p,!1),m!==null&&v!==null&&j2(x,v,m,p,!0)}}e:{if(f=u?el(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var E=pP;else if(g2(f))if(kk)E=yP;else{E=gP;var C=mP}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=vP);if(E&&(E=E(e,u))){jk(x,E,r,d);break e}C&&C(e,f,u),e==="focusout"&&(C=f._wrapperState)&&C.controlled&&f.type==="number"&&cv(f,"number",f.value)}switch(C=u?el(u):window,e){case"focusin":(g2(C)||C.contentEditable==="true")&&(Qo=C,Ev=u,Au=null);break;case"focusout":Au=Ev=Qo=null;break;case"mousedown":wv=!0;break;case"contextmenu":case"mouseup":case"dragend":wv=!1,w2(x,r,d);break;case"selectionchange":if(wP)break;case"keydown":case"keyup":w2(x,r,d)}var j;if(S1)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else Xo?Ck(e,r)&&(S="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(S="onCompositionStart");S&&(wk&&r.locale!=="ko"&&(Xo||S!=="onCompositionStart"?S==="onCompositionEnd"&&Xo&&(j=Ek()):(La=d,j1="value"in La?La.value:La.textContent,Xo=!0)),C=of(u,S),0<C.length&&(S=new f2(S,e,null,r,d),x.push({event:S,listeners:C}),j?S.data=j:(j=Ak(r),j!==null&&(S.data=j)))),(j=uP?dP(e,r):xP(e,r))&&(u=of(u,"onBeforeInput"),0<u.length&&(d=new f2("onBeforeInput","beforeinput",null,r,d),x.push({event:d,listeners:u}),d.data=j))}$k(x,t)})}function Yu(e,t,r){return{instance:e,listener:t,currentTarget:r}}function of(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=Uu(e,r),a!=null&&n.unshift(Yu(e,a,i)),a=Uu(e,t),a!=null&&n.push(Yu(e,a,i))),e=e.return}return n}function Fo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function j2(e,t,r,n,i){for(var a=t._reactName,o=[];r!==null&&r!==n;){var l=r,c=l.alternate,u=l.stateNode;if(c!==null&&c===n)break;l.tag===5&&u!==null&&(l=u,i?(c=Uu(r,a),c!=null&&o.unshift(Yu(r,c,l))):i||(c=Uu(r,a),c!=null&&o.push(Yu(r,c,l)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var kP=/\r\n?/g,_P=/\u0000|\uFFFD/g;function k2(e){return(typeof e=="string"?e:""+e).replace(kP,` 38`).replace(_P,"")}function z0(e,t,r){if(t=k2(t),k2(e)!==t&&r)throw Error(fe(425))}function lf(){}var Cv=null,Av=null;function jv(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 kv=typeof setTimeout=="function"?setTimeout:void 0,SP=typeof clearTimeout=="function"?clearTimeout:void 0,_2=typeof Promise=="function"?Promise:void 0,BP=typeof queueMicrotask=="function"?queueMicrotask:typeof _2<"u"?function(e){return _2.resolve(null).then(e).catch(NP)}:kv;function NP(e){setTimeout(function(){throw e})}function Dm(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),Ku(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}
vendor: 4,666 bytes, line 38
38while(r);Ku(t)}function Za(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 S2(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var vc=Math.random().toString(36).slice(2),fi="__reactFiber$"+vc,Zu="__reactProps$"+vc,Ji="__reactContainer$"+vc,_v="__reactEvents$"+vc,DP="__reactListeners$"+vc,FP="__reactHandles$"+vc;function Rs(e){var t=e[fi];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Ji]||r[fi]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=S2(e);e!==null;){if(r=e[fi])return r;e=S2(e)}return t}e=r,r=e.parentNode}return null}function c0(e){return e=e[fi]||e[Ji],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function el(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(fe(33))}function Yh(e){return e[Zu]||null}var Sv=[],tl=-1;function xs(e){return{current:e}}function ct(e){0>tl||(e.current=Sv[tl],Sv[tl]=null,tl--)}function it(e,t){tl++,Sv[tl]=e.current,e.current=t}var as={},vr=xs(as),Ir=xs(!1),ao=as;function Tl(e,t){var r=e.type.contextTypes;if(!r)return as;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mr(e){return e=e.childContextTypes,e!=null}function cf(){ct(Ir),ct(vr)}function B2(e,t,r){if(vr.current!==as)throw Error(fe(168));it(vr,t),it(Ir,r)}function Mk(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(fe(108,mF(e)||"Unknown",i));return bt({},r,n)}function uf(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||as,ao=vr.current,it(vr,e),it(Ir,Ir.current),!0}function N2(e,t,r){var n=e.stateNode;if(!n)throw Error(fe(169));r?(e=Mk(e,t,ao),n.__reactInternalMemoizedMergedChildContext=e,ct(Ir),ct(vr),it(vr,e)):ct(Ir),it(Ir,r)}var Ii=null,Zh=!1,Fm=!1;function Rk(e){Ii===null?Ii=[e]:Ii.push(e)}function PP(e){Zh=!0,Rk(e)}function fs(){if(!Fm&&Ii!==null){Fm=!0;var e=0,t=Ye;try{var r=Ii;for(Ye=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Ii=null,Zh=!1}catch(i){throw Ii!==null&&(Ii=Ii.slice(e+1)),uk(E1,fs),i}finally{Ye=t,Fm=!1}}return null}var rl=[],nl=0,df=null,xf=0,mn=[],gn=0,so=null,zi=1,Ui="";function Ds(e,t){rl[nl++]=xf,rl[nl++]=df,df=e,xf=t}function Lk(e,t,r){mn[gn++]=zi,mn[gn++]=Ui,mn[gn++]=so,so=e;var n=zi;e=Ui;var i=32-Zn(n)-1;n&=~(1<<i),r+=1;var a=32-Zn(t)+i;if(30<a){var o=i-i%5;a=(n&(1<<o)-1).toString(32),n>>=o,i-=o,zi=1<<32-Zn(t)+i|r<<i|n,Ui=a+e}else zi=1<<a|r<<i|n,Ui=e}function N1(e){e.return!==null&&(Ds(e,1),Lk(e,1,0))}function D1(e){for(;e===df;)df=rl[--nl],rl[nl]=null,xf=rl[--nl],rl[nl]=null;for(;e===so;)so=mn[--gn],mn[gn]=null,Ui=mn[--gn],mn[gn]=null,zi=mn[--gn],mn[gn]=null}var tn=null,en=null,xt=!1,Gn=null;function zk(e,t){var r=yn(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function D2(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,tn=e,en=Za(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,tn=e,en=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=so!==null?{id:zi,overflow:Ui}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=yn(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,tn=e,en=null,!0):!1;default:return!1}}function Bv(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Nv(e){if(xt){var t=en;if(t){var r=t;if(!D2(e,t)){if(Bv(e))throw Error(fe(418));t=Za(r.nextSibling);var n=tn;t&&D2(e,t)?zk(n,r):(e.flags=e.flags&-4097|2,xt=!1,tn=e)}}else{if(Bv(e))throw Error(fe(418));e.flags=e.flags&-4097|2,xt=!1,tn=e}}}function F2(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;tn=e}function U0(e){if(e!==tn)return!1;if(!xt)return F2(e),xt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!jv(e.type,e.memoizedProps)),t&&(t=en)){if(Bv(e))throw Uk(),Error(fe(418));for(;t;)zk(e,t),t=Za(t.nextSibling)}if(F2(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(fe(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){en=Za(e.nextSibling);break e}t--}
vendor: 11,494 bytes, line 38
38else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}en=null}}else en=tn?Za(e.stateNode.nextSibling):null;return!0}function Uk(){for(var e=en;e;)e=Za(e.nextSibling)}function $l(){en=tn=null,xt=!1}function F1(e){Gn===null?Gn=[e]:Gn.push(e)}var OP=fa.ReactCurrentBatchConfig;function Kc(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(fe(309));var n=r.stateNode}if(!n)throw Error(fe(147,e));var i=n,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var l=i.refs;o===null?delete l[a]:l[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(fe(284));if(!r._owner)throw Error(fe(290,e))}return e}function W0(e,t){throw e=Object.prototype.toString.call(t),Error(fe(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function P2(e){var t=e._init;return t(e._payload)}function Wk(e){function t(y,b){if(e){var g=y.deletions;g===null?(y.deletions=[b],y.flags|=16):g.push(b)}}function r(y,b){if(!e)return null;for(;b!==null;)t(y,b),b=b.sibling;return null}function n(y,b){for(y=new Map;b!==null;)b.key!==null?y.set(b.key,b):y.set(b.index,b),b=b.sibling;return y}function i(y,b){return y=es(y,b),y.index=0,y.sibling=null,y}function a(y,b,g){return y.index=g,e?(g=y.alternate,g!==null?(g=g.index,g<b?(y.flags|=2,b):g):(y.flags|=2,b)):(y.flags|=1048576,b)}function o(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,b,g,w){return b===null||b.tag!==6?(b=Rm(g,y.mode,w),b.return=y,b):(b=i(b,g),b.return=y,b)}function c(y,b,g,w){var E=g.type;return E===Zo?d(y,b,g.props.children,w,g.key):b!==null&&(b.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===_a&&P2(E)===b.type)?(w=i(b,g.props),w.ref=Kc(y,b,g),w.return=y,w):(w=Wx(g.type,g.key,g.props,null,y.mode,w),w.ref=Kc(y,b,g),w.return=y,w)}function u(y,b,g,w){return b===null||b.tag!==4||b.stateNode.containerInfo!==g.containerInfo||b.stateNode.implementation!==g.implementation?(b=Lm(g,y.mode,w),b.return=y,b):(b=i(b,g.children||[]),b.return=y,b)}function d(y,b,g,w,E){return b===null||b.tag!==7?(b=ro(g,y.mode,w,E),b.return=y,b):(b=i(b,g),b.return=y,b)}function x(y,b,g){if(typeof b=="string"&&b!==""||typeof b=="number")return b=Rm(""+b,y.mode,g),b.return=y,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case F0:return g=Wx(b.type,b.key,b.props,null,y.mode,g),g.ref=Kc(y,null,b),g.return=y,g;case Yo:return b=Lm(b,y.mode,g),b.return=y,b;case _a:var w=b._init;return x(y,w(b._payload),g)}if(du(b)||Lc(b))return b=ro(b,y.mode,g,null),b.return=y,b;W0(y,b)}return null}function f(y,b,g,w){var E=b!==null?b.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return E!==null?null:l(y,b,""+g,w);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case F0:return g.key===E?c(y,b,g,w):null;case Yo:return g.key===E?u(y,b,g,w):null;case _a:return E=g._init,f(y,b,E(g._payload),w)}if(du(g)||Lc(g))return E!==null?null:d(y,b,g,w,null);W0(y,g)}return null}function h(y,b,g,w,E){if(typeof w=="string"&&w!==""||typeof w=="number")return y=y.get(g)||null,l(b,y,""+w,E);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case F0:return y=y.get(w.key===null?g:w.key)||null,c(b,y,w,E);case Yo:return y=y.get(w.key===null?g:w.key)||null,u(b,y,w,E);case _a:var C=w._init;return h(y,b,g,C(w._payload),E)}if(du(w)||Lc(w))return y=y.get(g)||null,d(b,y,w,E,null);W0(b,w)}return null}function m(y,b,g,w){for(var E=null,C=null,j=b,S=b=0,_=null;j!==null&&S<g.length;S++){j.index>S?(_=j,j=null):_=j.sibling;var O=f(y,j,g[S],w);if(O===null){j===null&&(j=_);break}e&&j&&O.alternate===null&&t(y,j),b=a(O,b,S),C===null?E=O:C.sibling=O,C=O,j=_}if(S===g.length)return r(y,j),xt&&Ds(y,S),E;if(j===null){for(;S<g.length;S++)j=x(y,g[S],w),j!==null&&(b=a(j,b,S),C===null?E=j:C.sibling=j,C=j);return xt&&Ds(y,S),E}for(j=n(y,j);S<g.length;S++)_=h(j,y,S,g[S],w),_!==null&&(e&&_.alternate!==null&&j.delete(_.key===null?S:_.key),b=a(_,b,S),C===null?E=_:C.sibling=_,C=_);return e&&j.forEach(function(I){return t(y,I)}),xt&&Ds(y,S),E}function p(y,b,g,w){var E=Lc(g);if(typeof E!="function")throw Error(fe(150));if(g=E.call(g),g==null)throw Error(fe(151));for(var C=E=null,j=b,S=b=0,_=null,O=g.next();j!==null&&!O.done;S++,O=g.next()){j.index>S?(_=j,j=null):_=j.sibling;var I=f(y,j,O.value,w);if(I===null){j===null&&(j=_);break}e&&j&&I.alternate===null&&t(y,j),b=a(I,b,S),C===null?E=I:C.sibling=I,C=I,j=_}if(O.done)return r(y,j),xt&&Ds(y,S),E;if(j===null){for(;!O.done;S++,O=g.next())O=x(y,O.value,w),O!==null&&(b=a(O,b,S),C===null?E=O:C.sibling=O,C=O);return xt&&Ds(y,S),E}for(j=n(y,j);!O.done;S++,O=g.next())O=h(j,y,S,O.value,w),O!==null&&(e&&O.alternate!==null&&j.delete(O.key===null?S:O.key),b=a(O,b,S),C===null?E=O:C.sibling=O,C=O);return e&&j.forEach(function(B){return t(y,B)}),xt&&Ds(y,S),E}function v(y,b,g,w){if(typeof g=="object"&&g!==null&&g.type===Zo&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case F0:e:{for(var E=g.key,C=b;C!==null;){if(C.key===E){if(E=g.type,E===Zo){if(C.tag===7){r(y,C.sibling),b=i(C,g.props.children),b.return=y,y=b;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===_a&&P2(E)===C.type){r(y,C.sibling),b=i(C,g.props),b.ref=Kc(y,C,g),b.return=y,y=b;break e}r(y,C);break}else t(y,C);C=C.sibling}g.type===Zo?(b=ro(g.props.children,y.mode,w,g.key),b.return=y,y=b):(w=Wx(g.type,g.key,g.props,null,y.mode,w),w.ref=Kc(y,b,g),w.return=y,y=w)}return o(y);case Yo:e:{for(C=g.key;b!==null;){if(b.key===C)if(b.tag===4&&b.stateNode.containerInfo===g.containerInfo&&b.stateNode.implementation===g.implementation){r(y,b.sibling),b=i(b,g.children||[]),b.return=y,y=b;break e}else{r(y,b);break}else t(y,b);b=b.sibling}b=Lm(g,y.mode,w),b.return=y,y=b}return o(y);case _a:return C=g._init,v(y,b,C(g._payload),w)}if(du(g))return m(y,b,g,w);if(Lc(g))return p(y,b,g,w);W0(y,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,b!==null&&b.tag===6?(r(y,b.sibling),b=i(b,g),b.return=y,y=b):(r(y,b),b=Rm(g,y.mode,w),b.return=y,y=b),o(y)):r(y,b)}return v}var Il=Wk(!0),Hk=Wk(!1),ff=xs(null),hf=null,il=null,P1=null;function O1(){P1=il=hf=null}function T1(e){var t=ff.current;ct(ff),e._currentValue=t}function Dv(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function ml(e,t){hf=e,P1=il=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Tr=!0),e.firstContext=null)}function An(e){var t=e._currentValue;if(P1!==e)if(e={context:e,memoizedValue:t,next:null},il===null){if(hf===null)throw Error(fe(308));il=e,hf.dependencies={lanes:0,firstContext:e}}else il=il.next=e;return t}var Ls=null;function $1(e){Ls===null?Ls=[e]:Ls.push(e)}function Kk(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,$1(t)):(r.next=i.next,i.next=r),t.interleaved=r,ea(e,n)}function ea(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Sa=!1;function I1(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Vk(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 Vi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Xa(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Le&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,ea(e,r)}return i=n.interleaved,i===null?(t.next=t,$1(n)):(t.next=i.next,i.next=t),n.interleaved=t,ea(e,r)}function Ix(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,w1(e,r)}}function O2(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function pf(e,t,r,n){var i=e.updateQueue;Sa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?a=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(a!==null){var x=i.baseState;o=0,d=u=c=null,l=a;do{var f=l.lane,h=l.eventTime;if((n&f)===f){d!==null&&(d=d.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,p=l;switch(f=t,h=r,p.tag){case 1:if(m=p.payload,typeof m=="function"){x=m.call(h,x,f);break e}x=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=p.payload,f=typeof m=="function"?m.call(h,x,f):m,f==null)break e;x=bt({},x,f);break e;case 2:Sa=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[l]:f.push(l))}else h={eventTime:h,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=h,c=x):d=d.next=h,o|=f;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;f=l,l=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(c=x),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);lo|=o,e.lanes=o,e.memoizedState=x}}function T2(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(fe(191,i));i.call(n)}}}var u0={},bi=xs(u0),Xu=xs(u0),Qu=xs(u0);function zs(e){if(e===u0)throw Error(fe(174));return e}function M1(e,t){switch(it(Qu,t),it(Xu,e),it(bi,u0),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:dv(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=dv(t,e)}ct(bi),it(bi,t)}function Ml(){ct(bi),ct(Xu),ct(Qu)}function Gk(e){zs(Qu.current);var t=zs(bi.current),r=dv(t,e.type);t!==r&&(it(Xu,e),it(bi,r))}function R1(e){Xu.current===e&&(ct(bi),ct(Xu))}var mt=xs(0);function mf(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.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 Pm=[];function L1(){for(var e=0;e<Pm.length;e++)Pm[e]._workInProgressVersionPrimary=null;Pm.length=0}var Mx=fa.ReactCurrentDispatcher,Om=fa.ReactCurrentBatchConfig,oo=0,yt=null,zt=null,Zt=null,gf=!1,ju=!1,Ju=0,TP=0;function cr(){throw Error(fe(321))}function z1(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!ei(e[r],t[r]))return!1;return!0}function U1(e,t,r,n,i,a){if(oo=a,yt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Mx.current=e===null||e.memoizedState===null?RP:LP,e=r(n,i),ju){a=0;
vendor: 6,598 bytes, line 38
38do{if(ju=!1,Ju=0,25<=a)throw Error(fe(301));a+=1,Zt=zt=null,t.updateQueue=null,Mx.current=zP,e=r(n,i)}while(ju)}if(Mx.current=vf,t=zt!==null&&zt.next!==null,oo=0,Zt=zt=yt=null,gf=!1,t)throw Error(fe(300));return e}function W1(){var e=Ju!==0;return Ju=0,e}function li(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zt===null?yt.memoizedState=Zt=e:Zt=Zt.next=e,Zt}function jn(){if(zt===null){var e=yt.alternate;e=e!==null?e.memoizedState:null}else e=zt.next;var t=Zt===null?yt.memoizedState:Zt.next;if(t!==null)Zt=t,zt=e;else{if(e===null)throw Error(fe(310));zt=e,e={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},Zt===null?yt.memoizedState=Zt=e:Zt=Zt.next=e}return Zt}function ed(e,t){return typeof t=="function"?t(e):t}function Tm(e){var t=jn(),r=t.queue;if(r===null)throw Error(fe(311));r.lastRenderedReducer=e;var n=zt,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}n.baseQueue=i=a,r.pending=null}if(i!==null){a=i.next,n=n.baseState;var l=o=null,c=null,u=a;do{var d=u.lane;if((oo&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var x={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=x,o=n):c=c.next=x,yt.lanes|=d,lo|=d}u=u.next}while(u!==null&&u!==a);c===null?o=n:c.next=l,ei(n,t.memoizedState)||(Tr=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){i=e;do a=i.lane,yt.lanes|=a,lo|=a,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function $m(e){var t=jn(),r=t.queue;if(r===null)throw Error(fe(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,a=t.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);ei(a,t.memoizedState)||(Tr=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function qk(){}function Yk(e,t){var r=yt,n=jn(),i=t(),a=!ei(n.memoizedState,i);if(a&&(n.memoizedState=i,Tr=!0),n=n.queue,H1(Qk.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||Zt!==null&&Zt.memoizedState.tag&1){if(r.flags|=2048,td(9,Xk.bind(null,r,n,i,t),void 0,null),Xt===null)throw Error(fe(349));oo&30||Zk(r,t,i)}return i}function Zk(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=yt.updateQueue,t===null?(t={lastEffect:null,stores:null},yt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Xk(e,t,r,n){t.value=r,t.getSnapshot=n,Jk(t)&&e_(e)}function Qk(e,t,r){return r(function(){Jk(t)&&e_(e)})}function Jk(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!ei(e,r)}catch{return!0}}function e_(e){var t=ea(e,1);t!==null&&Xn(t,e,1,-1)}function $2(e){var t=li();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ed,lastRenderedState:e},t.queue=e,e=e.dispatch=MP.bind(null,yt,e),[t.memoizedState,e]}function td(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=yt.updateQueue,t===null?(t={lastEffect:null,stores:null},yt.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function t_(){return jn().memoizedState}function Rx(e,t,r,n){var i=li();yt.flags|=e,i.memoizedState=td(1|t,r,void 0,n===void 0?null:n)}function Xh(e,t,r,n){var i=jn();n=n===void 0?null:n;var a=void 0;if(zt!==null){var o=zt.memoizedState;if(a=o.destroy,n!==null&&z1(n,o.deps)){i.memoizedState=td(t,r,a,n);return}}yt.flags|=e,i.memoizedState=td(1|t,r,a,n)}function I2(e,t){return Rx(8390656,8,e,t)}function H1(e,t){return Xh(2048,8,e,t)}function r_(e,t){return Xh(4,2,e,t)}function n_(e,t){return Xh(4,4,e,t)}function i_(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 a_(e,t,r){return r=r!=null?r.concat([e]):null,Xh(4,4,i_.bind(null,t,e),r)}function K1(){}function s_(e,t){var r=jn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&z1(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function o_(e,t){var r=jn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&z1(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function l_(e,t,r){return oo&21?(ei(r,t)||(r=fk(),yt.lanes|=r,lo|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Tr=!0),e.memoizedState=r)}function $P(e,t){var r=Ye;Ye=r!==0&&4>r?r:4,e(!0);var n=Om.transition;Om.transition={};try{e(!1),t()}finally{Ye=r,Om.transition=n}}function c_(){return jn().memoizedState}function IP(e,t,r){var n=Ja(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},u_(e))d_(t,r);else if(r=Kk(e,t,r,n),r!==null){var i=jr();Xn(r,e,n,i),x_(r,t,n)}}function MP(e,t,r){var n=Ja(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(u_(e))d_(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,l=a(o,r);if(i.hasEagerState=!0,i.eagerState=l,ei(l,o)){var c=t.interleaved;c===null?(i.next=i,$1(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}r=Kk(e,t,i,n),r!==null&&(i=jr(),Xn(r,e,n,i),x_(r,t,n))}}function u_(e){var t=e.alternate;return e===yt||t!==null&&t===yt}function d_(e,t){ju=gf=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function x_(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,w1(e,r)}}var vf={readContext:An,useCallback:cr,useContext:cr,useEffect:cr,useImperativeHandle:cr,useInsertionEffect:cr,useLayoutEffect:cr,useMemo:cr,useReducer:cr,useRef:cr,useState:cr,useDebugValue:cr,useDeferredValue:cr,useTransition:cr,useMutableSource:cr,useSyncExternalStore:cr,useId:cr,unstable_isNewReconciler:!1},RP={readContext:An,useCallback:function(e,t){return li().memoizedState=[e,t===void 0?null:t],e},useContext:An,useEffect:I2,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Rx(4194308,4,i_.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Rx(4194308,4,e,t)},useInsertionEffect:function(e,t){return Rx(4,2,e,t)},useMemo:function(e,t){var r=li();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=li();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=IP.bind(null,yt,e),[n.memoizedState,e]}
vendor: 7,433 bytes, lines 38-40
38,useRef:function(e){var t=li();return e={current:e},t.memoizedState=e},useState:$2,useDebugValue:K1,useDeferredValue:function(e){return li().memoizedState=e},useTransition:function(){var e=$2(!1),t=e[0];return e=$P.bind(null,e[1]),li().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=yt,i=li();if(xt){if(r===void 0)throw Error(fe(407));r=r()}else{if(r=t(),Xt===null)throw Error(fe(349));oo&30||Zk(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,I2(Qk.bind(null,n,a,e),[e]),n.flags|=2048,td(9,Xk.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=li(),t=Xt.identifierPrefix;if(xt){var r=Ui,n=zi;r=(n&~(1<<32-Zn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Ju++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=TP++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},LP={readContext:An,useCallback:s_,useContext:An,useEffect:H1,useImperativeHandle:a_,useInsertionEffect:r_,useLayoutEffect:n_,useMemo:o_,useReducer:Tm,useRef:t_,useState:function(){return Tm(ed)},useDebugValue:K1,useDeferredValue:function(e){var t=jn();return l_(t,zt.memoizedState,e)},useTransition:function(){var e=Tm(ed)[0],t=jn().memoizedState;return[e,t]},useMutableSource:qk,useSyncExternalStore:Yk,useId:c_,unstable_isNewReconciler:!1},zP={readContext:An,useCallback:s_,useContext:An,useEffect:H1,useImperativeHandle:a_,useInsertionEffect:r_,useLayoutEffect:n_,useMemo:o_,useReducer:$m,useRef:t_,useState:function(){return $m(ed)},useDebugValue:K1,useDeferredValue:function(e){var t=jn();return zt===null?t.memoizedState=e:l_(t,zt.memoizedState,e)},useTransition:function(){var e=$m(ed)[0],t=jn().memoizedState;return[e,t]},useMutableSource:qk,useSyncExternalStore:Yk,useId:c_,unstable_isNewReconciler:!1};function Rn(e,t){if(e&&e.defaultProps){t=bt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Fv(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:bt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Qh={isMounted:function(e){return(e=e._reactInternals)?Ao(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=jr(),i=Ja(e),a=Vi(n,i);a.payload=t,r!=null&&(a.callback=r),t=Xa(e,a,i),t!==null&&(Xn(t,e,i,n),Ix(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=jr(),i=Ja(e),a=Vi(n,i);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=Xa(e,a,i),t!==null&&(Xn(t,e,i,n),Ix(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=jr(),n=Ja(e),i=Vi(r,n);i.tag=2,t!=null&&(i.callback=t),t=Xa(e,i,n),t!==null&&(Xn(t,e,n,r),Ix(t,e,n))}};function M2(e,t,r,n,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,o):t.prototype&&t.prototype.isPureReactComponent?!Gu(r,n)||!Gu(i,a):!0}function f_(e,t,r){var n=!1,i=as,a=t.contextType;return typeof a=="object"&&a!==null?a=An(a):(i=Mr(t)?ao:vr.current,n=t.contextTypes,a=(n=n!=null)?Tl(e,i):as),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Qh,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function R2(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Qh.enqueueReplaceState(t,t.state,null)}function Pv(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},I1(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=An(a):(a=Mr(t)?ao:vr.current,i.context=Tl(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Fv(e,t,a,r),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Qh.enqueueReplaceState(i,i.state,null),pf(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Rl(e,t){try{var r="",n=t;do r+=pF(n),n=n.return;while(n);var i=r}catch(a){i=` 39Error generating stack: `+a.message+` 40`+a.stack}return{value:e,source:t,stack:i,digest:null}}function Im(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Ov(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var UP=typeof WeakMap=="function"?WeakMap:Map;function h_(e,t,r){r=Vi(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){bf||(bf=!0,Hv=n),Ov(e,t)},r}function p_(e,t,r){r=Vi(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){Ov(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Ov(e,t),typeof n!="function"&&(Qa===null?Qa=new Set([this]):Qa.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function L2(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new UP;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=rO.bind(null,e,t,r),t.then(e,e))}function z2(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 U2(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Vi(-1,1),t.tag=2,Xa(r,t,1))),r.lanes|=1),e)}var WP=fa.ReactCurrentOwner,Tr=!1;function wr(e,t,r,n){t.child=e===null?Hk(t,null,r,n):Il(t,e.child,r,n)}function W2(e,t,r,n,i){r=r.render;var a=t.ref;return ml(t,i),n=U1(e,t,r,n,a,i),r=W1(),e!==null&&!Tr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ta(e,t,i)):(xt&&r&&N1(t),t.flags|=1,wr(e,t,n,i),t.child)}function H2(e,t,r,n,i){if(e===null){var a=r.type;return typeof a=="function"&&!J1(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,m_(e,t,a,n,i)):(e=Wx(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(r=r.compare,r=r!==null?r:Gu,r(o,n)&&e.ref===t.ref)return ta(e,t,i)}return t.flags|=1,e=es(a,n),e.ref=t.ref,e.return=t,t.child=e}function m_(e,t,r,n,i){if(e!==null){var a=e.memoizedProps;if(Gu(a,n)&&e.ref===t.ref)if(Tr=!1,t.pendingProps=n=a,(e.lanes&i)!==0)e.flags&131072&&(Tr=!0);else return t.lanes=e.lanes,ta(e,t,i)}return Tv(e,t,r,n,i)}function g_(e,t,r){var n=t.pendingProps,i=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},it(sl,qr),qr|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,it(sl,qr),qr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,it(sl,qr),qr|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,it(sl,qr),qr|=n;return wr(e,t,i,r),t.child}function v_(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}
vendor: 4,711 bytes, line 40
40function Tv(e,t,r,n,i){var a=Mr(r)?ao:vr.current;return a=Tl(t,a),ml(t,i),r=U1(e,t,r,n,a,i),n=W1(),e!==null&&!Tr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ta(e,t,i)):(xt&&n&&N1(t),t.flags|=1,wr(e,t,r,i),t.child)}function K2(e,t,r,n,i){if(Mr(r)){var a=!0;uf(t)}else a=!1;if(ml(t,i),t.stateNode===null)Lx(e,t),f_(t,r,n),Pv(t,r,n,i),n=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=An(u):(u=Mr(r)?ao:vr.current,u=Tl(t,u));var d=r.getDerivedStateFromProps,x=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";x||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==n||c!==u)&&R2(t,o,n,u),Sa=!1;var f=t.memoizedState;o.state=f,pf(t,n,o,i),c=t.memoizedState,l!==n||f!==c||Ir.current||Sa?(typeof d=="function"&&(Fv(t,r,d,n),c=t.memoizedState),(l=Sa||M2(t,r,l,n,f,c,u))?(x||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),o.props=n,o.state=c,o.context=u,n=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Vk(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Rn(t.type,l),o.props=u,x=t.pendingProps,f=o.context,c=r.contextType,typeof c=="object"&&c!==null?c=An(c):(c=Mr(r)?ao:vr.current,c=Tl(t,c));var h=r.getDerivedStateFromProps;(d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==x||f!==c)&&R2(t,o,n,c),Sa=!1,f=t.memoizedState,o.state=f,pf(t,n,o,i);var m=t.memoizedState;l!==x||f!==m||Ir.current||Sa?(typeof h=="function"&&(Fv(t,r,h,n),m=t.memoizedState),(u=Sa||M2(t,r,u,n,f,m,c)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,m,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,m,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=m),o.props=n,o.state=m,o.context=c,n=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return $v(e,t,r,n,a,i)}function $v(e,t,r,n,i,a){v_(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return i&&N2(t,r,!1),ta(e,t,a);n=t.stateNode,WP.current=t;var l=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=Il(t,e.child,null,a),t.child=Il(t,null,l,a)):wr(e,t,l,a),t.memoizedState=n.state,i&&N2(t,r,!0),t.child}function y_(e){var t=e.stateNode;t.pendingContext?B2(e,t.pendingContext,t.pendingContext!==t.context):t.context&&B2(e,t.context,!1),M1(e,t.containerInfo)}function V2(e,t,r,n,i){return $l(),F1(i),t.flags|=256,wr(e,t,r,n),t.child}var Iv={dehydrated:null,treeContext:null,retryLane:0};function Mv(e){return{baseLanes:e,cachePool:null,transitions:null}}function b_(e,t,r){var n=t.pendingProps,i=mt.current,a=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),it(mt,i&1),e===null)return Nv(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):(o=n.children,e=n.fallback,a?(n=t.mode,a=t.child,o={mode:"hidden",children:o},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=tp(o,n,0,null),e=ro(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Mv(r),t.memoizedState=Iv,e):V1(t,o));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return HP(e,t,o,n,l,i,r);if(a){a=n.fallback,o=t.mode,i=e.child,l=i.sibling;var c={mode:"hidden",children:n.children};return!(o&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=es(i,c),n.subtreeFlags=i.subtreeFlags&14680064),l!==null?a=es(l,a):(a=ro(a,o,r,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,n=a,a=t.child,o=e.child.memoizedState,o=o===null?Mv(r):{base
vendor: 8,923 bytes, line 40
40Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~r,t.memoizedState=Iv,n}return a=e.child,e=a.sibling,n=es(a,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function V1(e,t){return t=tp({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function H0(e,t,r,n){return n!==null&&F1(n),Il(t,e.child,null,r),e=V1(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function HP(e,t,r,n,i,a,o){if(r)return t.flags&256?(t.flags&=-257,n=Im(Error(fe(422))),H0(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,i=t.mode,n=tp({mode:"visible",children:n.children},i,0,null),a=ro(a,i,o,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,t.mode&1&&Il(t,e.child,null,o),t.child.memoizedState=Mv(o),t.memoizedState=Iv,a);if(!(t.mode&1))return H0(e,t,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var l=n.dgst;return n=l,a=Error(fe(419)),n=Im(a,n,void 0),H0(e,t,o,n)}if(l=(o&e.childLanes)!==0,Tr||l){if(n=Xt,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,ea(e,i),Xn(n,e,i,-1))}return Q1(),n=Im(Error(fe(421))),H0(e,t,o,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=nO.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,en=Za(i.nextSibling),tn=t,xt=!0,Gn=null,e!==null&&(mn[gn++]=zi,mn[gn++]=Ui,mn[gn++]=so,zi=e.id,Ui=e.overflow,so=t),t=V1(t,n.children),t.flags|=4096,t)}function G2(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Dv(e.return,t,r)}function Mm(e,t,r,n,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=i)}function E_(e,t,r){var n=t.pendingProps,i=n.revealOrder,a=n.tail;if(wr(e,t,n.children,r),n=mt.current,n&2)n=n&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&&G2(e,r,t);else if(e.tag===19)G2(e,r,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}n&=1}if(it(mt,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&mf(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),Mm(t,!1,i,r,a);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&mf(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}Mm(t,!0,r,null,a);break;case"together":Mm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Lx(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ta(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),lo|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(fe(153));if(t.child!==null){for(e=t.child,r=es(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=es(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function KP(e,t,r){switch(t.tag){case 3:y_(t),$l();break;case 5:Gk(t);break;case 1:Mr(t.type)&&uf(t);break;case 4:M1(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;it(ff,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(it(mt,mt.current&1),t.flags|=128,null):r&t.child.childLanes?b_(e,t,r):(it(mt,mt.current&1),e=ta(e,t,r),e!==null?e.sibling:null);it(mt,mt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return E_(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),it(mt,mt.current),n)break;return null;case 22:case 23:return t.lanes=0,g_(e,t,r)}return ta(e,t,r)}var w_,Rv,C_,A_;w_=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Rv=function(){};C_=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,zs(bi.current);var a=null;switch(r){case"input":i=ov(e,i),n=ov(e,n),a=[];break;case"select":i=bt({},i,{value:void 0}),n=bt({},n,{value:void 0}),a=[];break;case"textarea":i=uv(e,i),n=uv(e,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=lf)}xv(r,n);var o;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Lu.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var c=n[u];if(l=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(r||(r={}),r[o]=c[o])}else r||(a||(a=[]),a.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(a=a||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Lu.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&st("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}r&&(a=a||[]).push("style",r);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};A_=function(e,t,r,n){r!==n&&(t.flags|=4)};function Vc(e,t){if(!xt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ur(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function VP(e,t,r){var n=t.pendingProps;switch(D1(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ur(t),null;case 1:return Mr(t.type)&&cf(),ur(t),null;case 3:return n=t.stateNode,Ml(),ct(Ir),ct(vr),L1(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(U0(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gn!==null&&(Gv(Gn),Gn=null))),Rv(e,t),ur(t),null;case 5:R1(t);var i=zs(Qu.current);if(r=t.type,e!==null&&t.stateNode!=null)C_(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(fe(166));return ur(t),null}if(e=zs(bi.current),U0(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[fi]=t,n[Zu]=a,e=(t.mode&1)!==0,r){case"dialog":st("cancel",n),st("close",n);break;case"iframe":case"object":case"embed":st("load",n);break;case"video":case"audio":for(i=0;i<fu.length;i++)st(fu[i],n);break;case"source":st("error",n);break;case"img":case"image":case"link":st("error",n),st("load",n);break;case"details":st("toggle",n);break;case"input":r2(n,a),st("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},st("invalid",n);break;case"textarea":i2(n,a),st("invalid",n)}xv(r,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="children"?typeof l=="string"?n.textContent!==l&&(a.suppressHydrationWarning!==!0&&z0(n.textContent,l,e),i=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(a.suppressHydrationWarning!==!0&&z0(n.textContent,l,e),i=["children",""+l]):Lu.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&st("scroll",n)}switch(r){case"input":P0(n),n2(n,a,!0);break;case"textarea":P0(n),a2(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=lf)}n=i,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Qj(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>
40",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[fi]=t,e[Zu]=n,w_(e,t,!1,!1),t.stateNode=e;e:{switch(o=fv(r,n),r){case"dialog":st("cancel",e),st("close",e),i=n;break;case"iframe":case"object":case"embed":st("load",e),i=n;break;case"video":case"audio":for(i=0;i<fu.length;i++)st(fu[i],e);i=n;break;case"source":st("error",e),i=n;break;case"img":case"image":case"link":st("error",e),st("load",e),i=n;break;case"details":st("toggle",e),i=n;break;case"input":r2(e,n),i=ov(e,n),st("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=bt({},n,{value:void 0}),st("invalid",e);break;case"textarea":i2(e,n),i=uv(e,n),st("invalid",e);break;default:i=n}xv(r,i),l=i;for(a in l)if(l.hasOwnProperty(a)){var c=l[a];a==="style"?tk(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Jj(e,c)):a==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&zu(e,c):typeof c=="number"&&zu(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Lu.hasOwnProperty(a)?c!=null&&a==="onScroll"&&st("scroll",e):c!=null&&m1(e,a,c,o))}switch(r){case"input":P0(e),n2(e,n,!1);break;case"textarea":P0(e),a2(e);break;case"option":n.value!=null&&e.setAttribute("value",""+is(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?xl(e,!!n.multiple,a,!1):n.defaultValue!=null&&xl(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=lf)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ur(t),null;case 6:if(e&&t.stateNode!=null)A_(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(fe(166));if(r=zs(Qu.current),zs(bi.current),U0(t)){if(n=t.stateNode,r=t.memoizedProps,n[fi]=t,(a=n.nodeValue!==r)&&(e=tn,e!==null))switch(e.tag){case 3:z0(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&z0(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[fi]=t,t.stateNode=n}return ur(t),null;case 13:if(ct(mt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(xt&&en!==null&&t.mode&1&&!(t.flags&128))Uk(),$l(),t.flags|=98560,a=!1;else if(a=U0(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(fe(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(fe(317));a[fi]=t}else $l(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ur(t),a=!1}else Gn!==null&&(Gv(Gn),Gn=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||mt.current&1?Ut===0&&(Ut=3):Q1())),t.updateQueue!==null&&(t.flags|=4),ur(t),null);case 4:return Ml(),Rv(e,t),e===null&&qu(t.stateNode.containerInfo),ur(t),null;case 10:return T1(t.type._context),ur(t),null;case 17:return Mr(t.type)&&cf(),ur(t),null;case 19:if(ct(mt),a=t.memoizedState,a===null)return ur(t),null;if(n=(t.flags&128)!==0,o=a.rendering,o===null)if(n)Vc(a,!1);else{if(Ut!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=mf(e),o!==null){for(t.flags|=128,Vc(a,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)a=r,e=n,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return it(mt,mt.current&1|2),t.child}e=e.sibling}a.tail!==null&&St()>Ll&&(t.flags|=128,n=!0,Vc(a,!1),t.lanes=4194304)}else{if(!n)if(e=mf(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Vc(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!xt)return ur(t),null}else 2*St()-a.renderingStartTime>Ll&&r!==1073741824&&(t.flags|=128,n=!0,Vc(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=St(),t.sibling=null,r=mt.current,it(mt,n?r&1|2:r&1),t):(ur(t),null);case 22:case 23:return X1(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?qr&1073741824&&(ur(t),t.subtreeFlags&6&&(t.flags|=8192)):ur(t),null;case 24:return null;case 25:return null}throw Error(fe(156,t.tag))}function GP(e,t){switch(D1(t),t.tag){case 1:return Mr(t.type)&&cf(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 26,035 bytes, line 40
40case 3:return Ml(),ct(Ir),ct(vr),L1(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return R1(t),null;case 13:if(ct(mt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(fe(340));$l()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ct(mt),null;case 4:return Ml(),null;case 10:return T1(t.type._context),null;case 22:case 23:return X1(),null;case 24:return null;default:return null}}var K0=!1,fr=!1,qP=typeof WeakSet=="function"?WeakSet:Set,ye=null;function al(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){jt(e,t,n)}else r.current=null}function Lv(e,t,r){try{r()}catch(n){jt(e,t,n)}}var q2=!1;function YP(e,t){if(Cv=af,e=Bk(),B1(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,l=-1,c=-1,u=0,d=0,x=e,f=null;t:for(;;){for(var h;x!==r||i!==0&&x.nodeType!==3||(l=o+i),x!==a||n!==0&&x.nodeType!==3||(c=o+n),x.nodeType===3&&(o+=x.nodeValue.length),(h=x.firstChild)!==null;)f=x,x=h;for(;;){if(x===e)break t;if(f===r&&++u===i&&(l=o),f===a&&++d===n&&(c=o),(h=x.nextSibling)!==null)break;x=f,f=x.parentNode}x=h}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(Av={focusedElem:e,selectionRange:r},af=!1,ye=t;ye!==null;)if(t=ye,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ye=e;else for(;ye!==null;){t=ye;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var p=m.memoizedProps,v=m.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?p:Rn(t.type,p),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(fe(163))}}catch(w){jt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,ye=e;break}ye=t.return}return m=q2,q2=!1,m}function ku(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Lv(t,r,a)}i=i.next}while(i!==n)}}function Jh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function zv(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function j_(e){var t=e.alternate;t!==null&&(e.alternate=null,j_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[fi],delete t[Zu],delete t[_v],delete t[DP],delete t[FP])),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 k_(e){return e.tag===5||e.tag===3||e.tag===4}function Y2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||k_(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 Uv(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=lf));else if(n!==4&&(e=e.child,e!==null))for(Uv(e,t,r),e=e.sibling;e!==null;)Uv(e,t,r),e=e.sibling}function Wv(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Wv(e,t,r),e=e.sibling;e!==null;)Wv(e,t,r),e=e.sibling}var rr=null,Hn=!1;function Ea(e,t,r){for(r=r.child;r!==null;)__(e,t,r),r=r.sibling}function __(e,t,r){if(yi&&typeof yi.onCommitFiberUnmount=="function")try{yi.onCommitFiberUnmount(Kh,r)}catch{}switch(r.tag){case 5:fr||al(r,t);case 6:var n=rr,i=Hn;rr=null,Ea(e,t,r),rr=n,Hn=i,rr!==null&&(Hn?(e=rr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):rr.removeChild(r.stateNode));break;case 18:rr!==null&&(Hn?(e=rr,r=r.stateNode,e.nodeType===8?Dm(e.parentNode,r):e.nodeType===1&&Dm(e,r),Ku(e)):Dm(rr,r.stateNode));break;case 4:n=rr,i=Hn,rr=r.stateNode.containerInfo,Hn=!0,Ea(e,t,r),rr=n,Hn=i;break;case 0:case 11:case 14:case 15:if(!fr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Lv(r,t,o),i=i.next}while(i!==n)}Ea(e,t,r);break;case 1:if(!fr&&(al(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){jt(r,t,l)}Ea(e,t,r);break;case 21:Ea(e,t,r);break;case 22:r.mode&1?(fr=(n=fr)||r.memoizedState!==null,Ea(e,t,r),fr=n):Ea(e,t,r);break;default:Ea(e,t,r)}}function Z2(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new qP),t.forEach(function(n){var i=iO.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Tn(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var a=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:rr=l.stateNode,Hn=!1;break e;case 3:rr=l.stateNode.containerInfo,Hn=!0;break e;case 4:rr=l.stateNode.containerInfo,Hn=!0;break e}l=l.return}if(rr===null)throw Error(fe(160));__(a,o,i),rr=null,Hn=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(u){jt(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)S_(t,e),t=t.sibling}function S_(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Tn(t,e),oi(e),n&4){try{ku(3,e,e.return),Jh(3,e)}catch(p){jt(e,e.return,p)}try{ku(5,e,e.return)}catch(p){jt(e,e.return,p)}}break;case 1:Tn(t,e),oi(e),n&512&&r!==null&&al(r,r.return);break;case 5:if(Tn(t,e),oi(e),n&512&&r!==null&&al(r,r.return),e.flags&32){var i=e.stateNode;try{zu(i,"")}catch(p){jt(e,e.return,p)}}if(n&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=r!==null?r.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&a.type==="radio"&&a.name!=null&&Zj(i,a),fv(l,o);var u=fv(l,a);for(o=0;o<c.length;o+=2){var d=c[o],x=c[o+1];d==="style"?tk(i,x):d==="dangerouslySetInnerHTML"?Jj(i,x):d==="children"?zu(i,x):m1(i,d,x,u)}switch(l){case"input":lv(i,a);break;case"textarea":Xj(i,a);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var h=a.value;h!=null?xl(i,!!a.multiple,h,!1):f!==!!a.multiple&&(a.defaultValue!=null?xl(i,!!a.multiple,a.defaultValue,!0):xl(i,!!a.multiple,a.multiple?[]:"",!1))}i[Zu]=a}catch(p){jt(e,e.return,p)}}break;case 6:if(Tn(t,e),oi(e),n&4){if(e.stateNode===null)throw Error(fe(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(p){jt(e,e.return,p)}}break;case 3:if(Tn(t,e),oi(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ku(t.containerInfo)}catch(p){jt(e,e.return,p)}break;case 4:Tn(t,e),oi(e);break;case 13:Tn(t,e),oi(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(Y1=St())),n&4&&Z2(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(fr=(u=fr)||d,Tn(t,e),fr=u):Tn(t,e),oi(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(ye=e,d=e.child;d!==null;){for(x=ye=d;ye!==null;){switch(f=ye,h=f.child,f.tag){case 0:case 11:case 14:case 15:ku(4,f,f.return);break;case 1:al(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(p){jt(n,r,p)}}break;case 5:al(f,f.return);break;case 22:if(f.memoizedState!==null){Q2(x);continue}}h!==null?(h.return=f,ye=h):Q2(x)}d=d.sibling}e:for(d=null,x=e;;){if(x.tag===5){if(d===null){d=x;try{i=x.stateNode,u?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(l=x.stateNode,c=x.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=ek("display",o))}catch(p){jt(e,e.return,p)}}}else if(x.tag===6){if(d===null)try{x.stateNode.nodeValue=u?"":x.memoizedProps}catch(p){jt(e,e.return,p)}}else if((x.tag!==22&&x.tag!==23||x.memoizedState===null||x===e)&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===e)break e;for(;x.sibling===null;){if(x.return===null||x.return===e)break e;d===x&&(d=null),x=x.return}d===x&&(d=null),x.sibling.return=x.return,x=x.sibling}}break;case 19:Tn(t,e),oi(e),n&4&&Z2(e);break;case 21:break;default:Tn(t,e),oi(e)}}function oi(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(k_(r)){var n=r;break e}r=r.return}throw Error(fe(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(zu(i,""),n.flags&=-33);var a=Y2(e);Wv(e,a,i);break;case 3:case 4:var o=n.stateNode.containerInfo,l=Y2(e);Uv(e,l,o);break;default:throw Error(fe(161))}}catch(c){jt(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ZP(e,t,r){ye=e,B_(e)}function B_(e,t,r){for(var n=(e.mode&1)!==0;ye!==null;){var i=ye,a=i.child;if(i.tag===22&&n){var o=i.memoizedState!==null||K0;if(!o){var l=i.alternate,c=l!==null&&l.memoizedState!==null||fr;l=K0;var u=fr;if(K0=o,(fr=c)&&!u)for(ye=i;ye!==null;)o=ye,c=o.child,o.tag===22&&o.memoizedState!==null?J2(i):c!==null?(c.return=o,ye=c):J2(i);for(;a!==null;)ye=a,B_(a),a=a.sibling;ye=i,K0=l,fr=u}X2(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,ye=a):X2(e)}}function X2(e){for(;ye!==null;){var t=ye;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:fr||Jh(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!fr)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:Rn(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&T2(t,a,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}T2(t,o,r)}break;case 5:var l=t.stateNode;if(r===null&&t.flags&4){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var x=d.dehydrated;x!==null&&Ku(x)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(fe(163))}fr||t.flags&512&&zv(t)}catch(f){jt(t,t.return,f)}}if(t===e){ye=null;break}if(r=t.sibling,r!==null){r.return=t.return,ye=r;break}ye=t.return}}function Q2(e){for(;ye!==null;){var t=ye;if(t===e){ye=null;break}var r=t.sibling;if(r!==null){r.return=t.return,ye=r;break}ye=t.return}}function J2(e){for(;ye!==null;){var t=ye;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Jh(4,t)}catch(c){jt(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(c){jt(t,i,c)}}var a=t.return;try{zv(t)}catch(c){jt(t,a,c)}break;case 5:var o=t.return;try{zv(t)}catch(c){jt(t,o,c)}}}catch(c){jt(t,t.return,c)}if(t===e){ye=null;break}var l=t.sibling;if(l!==null){l.return=t.return,ye=l;break}ye=t.return}}var XP=Math.ceil,yf=fa.ReactCurrentDispatcher,G1=fa.ReactCurrentOwner,wn=fa.ReactCurrentBatchConfig,Le=0,Xt=null,Ft=null,ir=0,qr=0,sl=xs(0),Ut=0,rd=null,lo=0,ep=0,q1=0,_u=null,Or=null,Y1=0,Ll=1/0,Ti=null,bf=!1,Hv=null,Qa=null,V0=!1,za=null,Ef=0,Su=0,Kv=null,zx=-1,Ux=0;function jr(){return Le&6?St():zx!==-1?zx:zx=St()}function Ja(e){return e.mode&1?Le&2&&ir!==0?ir&-ir:OP.transition!==null?(Ux===0&&(Ux=fk()),Ux):(e=Ye,e!==0||(e=window.event,e=e===void 0?16:bk(e.type)),e):1}function Xn(e,t,r,n){if(50<Su)throw Su=0,Kv=null,Error(fe(185));o0(e,r,n),(!(Le&2)||e!==Xt)&&(e===Xt&&(!(Le&2)&&(ep|=r),Ut===4&&Fa(e,ir)),Rr(e,n),r===1&&Le===0&&!(t.mode&1)&&(Ll=St()+500,Zh&&fs()))}function Rr(e,t){var r=e.callbackNode;OF(e,t);var n=nf(e,e===Xt?ir:0);if(n===0)r!==null&&l2(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&l2(r),t===1)e.tag===0?PP(e9.bind(null,e)):Rk(e9.bind(null,e)),BP(function(){!(Le&6)&&fs()}),r=null;else{switch(hk(n)){case 1:r=E1;break;case 4:r=dk;break;case 16:r=rf;break;case 536870912:r=xk;break;default:r=rf}r=I_(r,N_.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function N_(e,t){if(zx=-1,Ux=0,Le&6)throw Error(fe(327));var r=e.callbackNode;if(gl()&&e.callbackNode!==r)return null;var n=nf(e,e===Xt?ir:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=wf(e,n);else{t=n;var i=Le;Le|=2;var a=F_();(Xt!==e||ir!==t)&&(Ti=null,Ll=St()+500,to(e,t));do try{eO();break}catch(l){D_(e,l)}while(!0);O1(),yf.current=a,Le=i,Ft!==null?t=0:(Xt=null,ir=0,t=Ut)}if(t!==0){if(t===2&&(i=vv(e),i!==0&&(n=i,t=Vv(e,i))),t===1)throw r=rd,to(e,0),Fa(e,n),Rr(e,St()),r;if(t===6)Fa(e,n);else{if(i=e.current.alternate,!(n&30)&&!QP(i)&&(t=wf(e,n),t===2&&(a=vv(e),a!==0&&(n=a,t=Vv(e,a))),t===1))throw r=rd,to(e,0),Fa(e,n),Rr(e,St()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(fe(345));case 2:Fs(e,Or,Ti);break;case 3:if(Fa(e,n),(n&130023424)===n&&(t=Y1+500-St(),10<t)){if(nf(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){jr(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=kv(Fs.bind(null,e,Or,Ti),t);break}Fs(e,Or,Ti);break;case 4:if(Fa(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var o=31-Zn(n);a=1<<o,o=t[o],o>i&&(i=o),n&=~a}if(n=i,n=St()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*XP(n/1960))-n,10<n){e.timeoutHandle=kv(Fs.bind(null,e,Or,Ti),n);break}Fs(e,Or,Ti);break;case 5:Fs(e,Or,Ti);break;default:throw Error(fe(329))}}}return Rr(e,St()),e.callbackNode===r?N_.bind(null,e):null}function Vv(e,t){var r=_u;return e.current.memoizedState.isDehydrated&&(to(e,t).flags|=256),e=wf(e,t),e!==2&&(t=Or,Or=r,t!==null&&Gv(t)),e}function Gv(e){Or===null?Or=e:Or.push.apply(Or,e)}function QP(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],a=i.getSnapshot;i=i.value;try{if(!ei(a(),i))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Fa(e,t){for(t&=~q1,t&=~ep,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Zn(t),n=1<<r;e[r]=-1,t&=~n}}function e9(e){if(Le&6)throw Error(fe(327));gl();var t=nf(e,0);if(!(t&1))return Rr(e,St()),null;var r=wf(e,t);if(e.tag!==0&&r===2){var n=vv(e);n!==0&&(t=n,r=Vv(e,n))}if(r===1)throw r=rd,to(e,0),Fa(e,t),Rr(e,St()),r;if(r===6)throw Error(fe(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fs(e,Or,Ti),Rr(e,St()),null}function Z1(e,t){var r=Le;Le|=1;try{return e(t)}finally{Le=r,Le===0&&(Ll=St()+500,Zh&&fs())}}function co(e){za!==null&&za.tag===0&&!(Le&6)&&gl();var t=Le;Le|=1;var r=wn.transition,n=Ye;try{if(wn.transition=null,Ye=1,e)return e()}finally{Ye=n,wn.transition=r,Le=t,!(Le&6)&&fs()}}function X1(){qr=sl.current,ct(sl)}function to(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,SP(r)),Ft!==null)for(r=Ft.return;r!==null;){var n=r;switch(D1(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&cf();break;case 3:Ml(),ct(Ir),ct(vr),L1();break;case 5:R1(n);break;case 4:Ml();break;case 13:ct(mt);break;case 19:ct(mt);break;case 10:T1(n.type._context);break;case 22:case 23:X1()}r=r.return}if(Xt=e,Ft=e=es(e.current,null),ir=qr=t,Ut=0,rd=null,q1=ep=lo=0,Or=_u=null,Ls!==null){for(t=0;t<Ls.length;t++)if(r=Ls[t],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,a=r.pending;if(a!==null){var o=a.next;a.next=i,n.next=o}r.pending=n}Ls=null}return e}function D_(e,t){do{var r=Ft;try{if(O1(),Mx.current=vf,gf){for(var n=yt.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}gf=!1}if(oo=0,Zt=zt=yt=null,ju=!1,Ju=0,G1.current=null,r===null||r.return===null){Ut=1,rd=t,Ft=null;break}e:{var a=e,o=r.return,l=r,c=t;if(t=ir,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,x=d.tag;if(!(d.mode&1)&&(x===0||x===11||x===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=z2(o);if(h!==null){h.flags&=-257,U2(h,o,l,a,t),h.mode&1&&L2(a,u,t),t=h,c=u;var m=t.updateQueue;if(m===null){var p=new Set;p.add(c),t.updateQueue=p}else m.add(c);break e}else{if(!(t&1)){L2(a,u,t),Q1();break e}c=Error(fe(426))}}else if(xt&&l.mode&1){var v=z2(o);if(v!==null){!(v.flags&65536)&&(v.flags|=256),U2(v,o,l,a,t),F1(Rl(c,l));break e}}a=c=Rl(c,l),Ut!==4&&(Ut=2),_u===null?_u=[a]:_u.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var y=h_(a,c,t);O2(a,y);break e;case 1:l=c;var b=a.type,g=a.stateNode;if(!(a.flags&128)&&(typeof b.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Qa===null||!Qa.has(g)))){a.flags|=65536,t&=-t,a.lanes|=t;var w=p_(a,l,t);O2(a,w);break e}}a=a.return}while(a!==null)}O_(r)}catch(E){t=E,Ft===r&&r!==null&&(Ft=r=r.return);continue}break}while(!0)}function F_(){var e=yf.current;return yf.current=vf,e===null?vf:e}function Q1(){(Ut===0||Ut===3||Ut===2)&&(Ut=4),Xt===null||!(lo&268435455)&&!(ep&268435455)||Fa(Xt,ir)}function wf(e,t){var r=Le;Le|=2;var n=F_();(Xt!==e||ir!==t)&&(Ti=null,to(e,t));do try{JP();break}catch(i){D_(e,i)}while(!0);if(O1(),Le=r,yf.current=n,Ft!==null)throw Error(fe(261));return Xt=null,ir=0,Ut}function JP(){for(;Ft!==null;)P_(Ft)}function eO(){for(;Ft!==null&&!jF();)P_(Ft)}function P_(e){var t=$_(e.alternate,e,qr);e.memoizedProps=e.pendingProps,t===null?O_(e):Ft=t,G1.current=null}function O_(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=GP(r,t),r!==null){r.flags&=32767,Ft=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ut=6,Ft=null;return}}else if(r=VP(r,t,qr),r!==null){Ft=r;return}if(t=t.sibling,t!==null){Ft=t;return}Ft=t=e}while(t!==null);Ut===0&&(Ut=5)}function Fs(e,t,r){var n=Ye,i=wn.transition;try{wn.transition=null,Ye=1,tO(e,t,r,n)}finally{wn.transition=i,Ye=n}return null}function tO(e,t,r,n){do gl();while(za!==null);if(Le&6)throw Error(fe(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(fe(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(TF(e,a),e===Xt&&(Ft=Xt=null,ir=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||V0||(V0=!0,I_(rf,function(){return gl(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=wn.transition,wn.transition=null;var o=Ye;Ye=1;var l=Le;Le|=4,G1.current=null,YP(e,r),S_(r,e),EP(Av),af=!!Cv,Av=Cv=null,e.current=r,ZP(r),kF(),Le=l,Ye=o,wn.transition=a}else e.current=r;if(V0&&(V0=!1,za=e,Ef=i),a=e.pendingLanes,a===0&&(Qa=null),BF(r.stateNode),Rr(e,St()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(bf)throw bf=!1,e=Hv,Hv=null,e;return Ef&1&&e.tag!==0&&gl(),a=e.pendingLanes,a&1?e===Kv?Su++:(Su=0,Kv=e):Su=0,fs(),null}function gl(){if(za!==null){var e=hk(Ef),t=wn.transition,r=Ye;try{if(wn.transition=null,Ye=16>e?16:e,za===null)var n=!1;else{if(e=za,za=null,Ef=0,Le&6)throw Error(fe(331));var i=Le;for(Le|=4,ye=e.current;ye!==null;){var a=ye,o=a.child;if(ye.flags&16){var l=a.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(ye=u;ye!==null;){var d=ye;switch(d.tag){case 0:case 11:case 15:ku(8,d,a)}var x=d.child;if(x!==null)x.return=d,ye=x;else for(;ye!==null;){d=ye;var f=d.sibling,h=d.return;if(j_(d),d===u){ye=null;break}if(f!==null){f.return=h,ye=f;break}ye=h}}}var m=a.alternate;if(m!==null){var p=m.child;if(p!==null){m.child=null;do{var v=p.sibling;p.sibling=null,p=v}while(p!==null)}}ye=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,ye=o;else e:for(;ye!==null;){if(a=ye,a.flags&2048)switch(a.tag){case 0:case 11:case 15:ku(9,a,a.return)}var y=a.sibling;if(y!==null){y.return=a.return,ye=y;break e}ye=a.return}}var b=e.current;for(ye=b;ye!==null;){o=ye;var g=o.child;if(o.subtreeFlags&2064&&g!==null)g.return=o,ye=g;else e:for(o=b;ye!==null;){if(l=ye,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Jh(9,l)}}catch(E){jt(l,l.return,E)}if(l===o){ye=null;break e}var w=l.sibling;if(w!==null){w.return=l.return,ye=w;break e}ye=l.return}}if(Le=i,fs(),yi&&typeof yi.onPostCommitFiberRoot=="function")try{yi.onPostCommitFiberRoot(Kh,e)}catch{}n=!0}return n}finally{Ye=r,wn.transition=t}}return!1}function t9(e,t,r){t=Rl(r,t),t=h_(e,t,1),e=Xa(e,t,1),t=jr(),e!==null&&(o0(e,1,t),Rr(e,t))}function jt(e,t,r){if(e.tag===3)t9(e,e,r);else for(;t!==null;){if(t.tag===3){t9(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Qa===null||!Qa.has(n))){e=Rl(r,e),e=p_(t,e,1),t=Xa(t,e,1),e=jr(),t!==null&&(o0(t,1,e),Rr(t,e));break}}t=t.return}}function rO(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=jr(),e.pingedLanes|=e.suspendedLanes&r,Xt===e&&(ir&r)===r&&(Ut===4||Ut===3&&(ir&130023424)===ir&&500>St()-Y1?to(e,0):q1|=r),Rr(e,t)}function T_(e,t){t===0&&(e.mode&1?(t=$0,$0<<=1,!($0&130023424)&&($0=4194304)):t=1);var r=jr();e=ea(e,t),e!==null&&(o0(e,t,r),Rr(e,r))}function nO(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),T_(e,r)}function iO(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(fe(314))}n!==null&&n.delete(t),T_(e,r)}var $_;$_=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ir.current)Tr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Tr=!1,KP(e,t,r);Tr=!!(e.flags&131072)}else Tr=!1,xt&&t.flags&1048576&&Lk(t,xf,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Lx(e,t),e=t.pendingProps;var i=Tl(t,vr.current);ml(t,r),i=U1(null,t,n,e,i,r);var a=W1();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mr(n)?(a=!0,uf(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,I1(t),i.updater=Qh,t.stateNode=i,i._reactInternals=t,Pv(t,n,e,r),t=$v(null,t,n,!0,a,r)):(t.tag=0,xt&&a&&N1(t),wr(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Lx(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=sO(n),e=Rn(n,e),i){case 0:t=Tv(null,t,n,e,r);break e;case 1:t=K2(null,t,n,e,r);break e;case 11:t=W2(null,t,n,e,r);break e;case 14:t=H2(null,t,n,Rn(n.type,e),r);break e}throw Error(fe(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Rn(n,i),Tv(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Rn(n,i),K2(e,t,n,i,r);case 3:e:{if(y_(t),e===null)throw Error(fe(387));n=t.pendingProps,a=t.memoizedState,i=a.element,Vk(e,t),pf(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=Rl(Error(fe(423)),t),t=V2(e,t,n,r,i);break e}else if(n!==i){i=Rl(Error(fe(424)),t),t=V2(e,t,n,r,i);break e}else for(en=Za(t.stateNode.containerInfo.firstChild),tn=t,xt=!0,Gn=null,r=Hk(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if($l(),n===i){t=ta(e,t,r);break e}wr(e,t,n,r)}t=t.child}return t;case 5:return Gk(t),e===null&&Nv(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,jv(n,i)?o=null:a!==null&&jv(n,a)&&(t.flags|=32),v_(e,t),wr(e,t,o,r),t.child;case 6:return e===null&&Nv(t),null;case 13:return b_(e,t,r);case 4:return M1(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Il(t,null,n,r):wr(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Rn(n,i),W2(e,t,n,i,r);case 7:return wr(e,t,t.pendingProps,r),t.child;case 8:return wr(e,t,t.pendingProps.children,r),t.child;case 12:return wr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,it(ff,n._currentValue),n._currentValue=o,a!==null)if(ei(a.value,o)){if(a.children===i.children&&!Ir.current){t=ta(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){o=a.child;for(var c=l.firstContext;c!==null;){if(c.context===n){if(a.tag===1){c=Vi(-1,r&-r),c.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=r,c=a.alternate,c!==null&&(c.lanes|=r),Dv(a.return,r,t),l.lanes|=r;break}c=c.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(fe(341));o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),Dv(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}wr(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,ml(t,r),i=An(i),n=n(i),t.flags|=1,wr(e,t,n,r),t.child;case 14:return n=t.type,i=Rn(n,t.pendingProps),i=Rn(n.type,i),H2(e,t,n,i,r);case 15:return m_(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Rn(n,i),Lx(e,t),t.tag=1,Mr(n)?(e=!0,uf(t)):e=!1,ml(t,r),f_(t,n,i),Pv(t,n,i,r),$v(null,t,n,!0,e,r);case 19:return E_(e,t,r);case 22:return g_(e,t,r)}throw Error(fe(156,t.tag))};function I_(e,t){return uk(e,t)}function aO(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 5,642 bytes, line 40
40ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yn(e,t,r,n){return new aO(e,t,r,n)}function J1(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sO(e){if(typeof e=="function")return J1(e)?1:0;if(e!=null){if(e=e.$$typeof,e===v1)return 11;if(e===y1)return 14}return 2}function es(e,t){var r=e.alternate;return r===null?(r=yn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Wx(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")J1(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Zo:return ro(r.children,i,a,t);case g1:o=8,i|=8;break;case nv:return e=yn(12,r,t,i|2),e.elementType=nv,e.lanes=a,e;case iv:return e=yn(13,r,t,i),e.elementType=iv,e.lanes=a,e;case av:return e=yn(19,r,t,i),e.elementType=av,e.lanes=a,e;case Gj:return tp(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Kj:o=10;break e;case Vj:o=9;break e;case v1:o=11;break e;case y1:o=14;break e;case _a:o=16,n=null;break e}throw Error(fe(130,e==null?e:typeof e,""))}return t=yn(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function ro(e,t,r,n){return e=yn(7,e,n,t),e.lanes=r,e}function tp(e,t,r,n){return e=yn(22,e,n,t),e.elementType=Gj,e.lanes=r,e.stateNode={isHidden:!1},e}function Rm(e,t,r){return e=yn(6,e,null,t),e.lanes=r,e}function Lm(e,t,r){return t=yn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function oO(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bm(0),this.expirationTimes=bm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bm(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function eE(e,t,r,n,i,a,o,l,c){return e=new oO(e,t,r,l,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=yn(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},I1(a),e}function lO(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Yo,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function M_(e){if(!e)return as;e=e._reactInternals;e:{if(Ao(e)!==e||e.tag!==1)throw Error(fe(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Mr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(fe(171))}if(e.tag===1){var r=e.type;if(Mr(r))return Mk(e,r,t)}return t}function R_(e,t,r,n,i,a,o,l,c){return e=eE(r,n,!0,e,i,a,o,l,c),e.context=M_(null),r=e.current,n=jr(),i=Ja(r),a=Vi(n,i),a.callback=t??null,Xa(r,a,i),e.current.lanes=i,o0(e,i,n),Rr(e,n),e}function rp(e,t,r,n){var i=t.current,a=jr(),o=Ja(i);return r=M_(r),t.context===null?t.context=r:t.pendingContext=r,t=Vi(a,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Xa(i,t,o),e!==null&&(Xn(e,i,o,a),Ix(e,i,o)),o}function Cf(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 r9(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function tE(e,t){r9(e,t),(e=e.alternate)&&r9(e,t)}function cO(){return null}var L_=typeof reportError=="function"?reportError:function(e){console.error(e)};function rE(e){this._internalRoot=e}np.prototype.render=rE.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(fe(409));rp(e,t,null,null)};np.prototype.unmount=rE.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;co(function(){rp(null,e,null,null)}),t[Ji]=null}};function np(e){this._internalRoot=e}np.prototype.unstable_scheduleHydration=function(e){if(e){var t=gk();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Da.length&&t!==0&&t<Da[r].priority;r++);Da.splice(r,0,e),r===0&&yk(e)}};function nE(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ip(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function n9(){}function uO(e,t,r,n,i){if(i){if(typeof n=="function"){var a=n;n=function(){var u=Cf(o);a.call(u)}}var o=R_(t,n,e,0,null,!1,!1,"",n9);return e._reactRootContainer=o,e[Ji]=o.current,qu(e.nodeType===8?e.parentNode:e),co(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var l=n;n=function(){var u=Cf(c);l.call(u)}}var c=eE(e,0,!1,null,null,!1,!1,"",n9);return e._reactRootContainer=c,e[Ji]=c.current,qu(e.nodeType===8?e.parentNode:e),co(function(){rp(t,c,r,n)}),c}function ap(e,t,r,n,i){var a=r._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var l=i;
vendor: 4,811 bytes, line 40
40i=function(){var c=Cf(o);l.call(c)}}rp(t,o,e,i)}else o=uO(r,t,e,i,n);return Cf(o)}pk=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=xu(t.pendingLanes);r!==0&&(w1(t,r|1),Rr(t,St()),!(Le&6)&&(Ll=St()+500,fs()))}break;case 13:co(function(){var n=ea(e,1);if(n!==null){var i=jr();Xn(n,e,1,i)}}),tE(e,1)}};C1=function(e){if(e.tag===13){var t=ea(e,134217728);if(t!==null){var r=jr();Xn(t,e,134217728,r)}tE(e,134217728)}};mk=function(e){if(e.tag===13){var t=Ja(e),r=ea(e,t);if(r!==null){var n=jr();Xn(r,e,t,n)}tE(e,t)}};gk=function(){return Ye};vk=function(e,t){var r=Ye;try{return Ye=e,t()}finally{Ye=r}};pv=function(e,t,r){switch(t){case"input":if(lv(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=Yh(n);if(!i)throw Error(fe(90));Yj(n),lv(n,i)}}}break;case"textarea":Xj(e,r);break;case"select":t=r.value,t!=null&&xl(e,!!r.multiple,t,!1)}};ik=Z1;ak=co;var dO={usingClientEntryPoint:!1,Events:[c0,el,Yh,rk,nk,Z1]},Gc={findFiberByHostInstance:Rs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},xO={bundleType:Gc.bundleType,version:Gc.version,rendererPackageName:Gc.rendererPackageName,rendererConfig:Gc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:fa.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=lk(e),e===null?null:e.stateNode},findFiberByHostInstance:Gc.findFiberByHostInstance||cO,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 G0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!G0.isDisabled&&G0.supportsFiber)try{Kh=G0.inject(xO),yi=G0}catch{}}sn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dO;sn.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nE(t))throw Error(fe(200));return lO(e,t,null,r)};sn.createRoot=function(e,t){if(!nE(e))throw Error(fe(299));var r=!1,n="",i=L_;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=eE(e,1,!1,null,null,r,!1,n,i),e[Ji]=t.current,qu(e.nodeType===8?e.parentNode:e),new rE(t)};sn.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(fe(188)):(e=Object.keys(e).join(","),Error(fe(268,e)));return e=lk(t),e=e===null?null:e.stateNode,e};sn.flushSync=function(e){return co(e)};sn.hydrate=function(e,t,r){if(!ip(t))throw Error(fe(200));return ap(null,e,t,!0,r)};sn.hydrateRoot=function(e,t,r){if(!nE(e))throw Error(fe(405));var n=r!=null&&r.hydratedSources||null,i=!1,a="",o=L_;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=R_(t,null,e,1,r??null,i,!1,a,o),e[Ji]=t.current,qu(e),n)for(e=0;e<n.length;e++)r=n[e],i=r._getVersion,i=i(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new np(t)};sn.render=function(e,t,r){if(!ip(t))throw Error(fe(200));return ap(null,e,t,!1,r)};sn.unmountComponentAtNode=function(e){if(!ip(e))throw Error(fe(40));return e._reactRootContainer?(co(function(){ap(null,null,e,!1,function(){e._reactRootContainer=null,e[Ji]=null})}),!0):!1};sn.unstable_batchedUpdates=Z1;sn.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!ip(r))throw Error(fe(200));if(e==null||e._reactInternals===void 0)throw Error(fe(38));return ap(e,t,r,!1,n)};sn.version="18.3.1-next-f1338f8080-20240426";function z_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(z_)}catch(e){console.error(e)}}z_(),zj.exports=sn;var d0=zj.exports;const U_=qe(d0);var W_,i9=d0;W_=i9.createRoot,i9.hydrateRoot;const fO=1,hO=1e6;let zm=0;function pO(){return zm=(zm+1)%Number.MAX_SAFE_INTEGER,zm.toString()}const Um=new Map,a9=e=>{if(Um.has(e))return;const t=setTimeout(()=>{Um.delete(e),Bu({type:"REMOVE_TOAST",toastId:e})},hO);Um.set(e,t)},mO=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,fO)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;
vendor: 13,982 bytes, line 40
40return r?a9(r):e.toasts.forEach(n=>{a9(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Hx=[];let Kx={toasts:[]};function Bu(e){Kx=mO(Kx,e),Hx.forEach(t=>{t(Kx)})}function Bt({...e}){const t=pO(),r=i=>Bu({type:"UPDATE_TOAST",toast:{...i,id:t}}),n=()=>Bu({type:"DISMISS_TOAST",toastId:t});return Bu({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||n()}}}),{id:t,dismiss:n,update:r}}function iE(){const[e,t]=A.useState(Kx);return A.useEffect(()=>(Hx.push(t),()=>{const r=Hx.indexOf(t);r>-1&&Hx.splice(r,1)}),[e]),{...e,toast:Bt,dismiss:r=>Bu({type:"DISMISS_TOAST",toastId:r})}}function ft(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function s9(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function H_(...e){return t=>{let r=!1;const n=e.map(i=>{const a=s9(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i<n.length;i++){const a=n[i];typeof a=="function"?a():s9(e[i],null)}}}}function kr(...e){return A.useCallback(H_(...e),e)}function gO(e,t){const r=A.createContext(t),n=a=>{const{children:o,...l}=a,c=A.useMemo(()=>l,Object.values(l));return s.jsx(r.Provider,{value:c,children:o})};n.displayName=e+"Provider";function i(a){const o=A.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function x0(e,t=[]){let r=[];function n(a,o){const l=A.createContext(o),c=r.length;r=[...r,o];const u=x=>{var y;const{scope:f,children:h,...m}=x,p=((y=f==null?void 0:f[e])==null?void 0:y[c])||l,v=A.useMemo(()=>m,Object.values(m));return s.jsx(p.Provider,{value:v,children:h})};u.displayName=a+"Provider";function d(x,f){var p;const h=((p=f==null?void 0:f[e])==null?void 0:p[c])||l,m=A.useContext(h);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${x}\` must be used within \`${a}\``)}return[u,d]}const i=()=>{const a=r.map(o=>A.createContext(o));return function(l){const c=(l==null?void 0:l[e])||a;return A.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[n,vO(i,...t)]}function vO(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((l,{useScope:c,scopeName:u})=>{const x=c(a)[`__scope${u}`];return{...l,...x}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function nd(e){const t=bO(e),r=A.forwardRef((n,i)=>{const{children:a,...o}=n,l=A.Children.toArray(a),c=l.find(wO);if(c){const u=c.props.children,d=l.map(x=>x===c?A.Children.count(u)>1?A.Children.only(null):A.isValidElement(u)?u.props.children:null:x);return s.jsx(t,{...o,ref:i,children:A.isValidElement(u)?A.cloneElement(u,void 0,d):null})}return s.jsx(t,{...o,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}var yO=nd("Slot");function bO(e){const t=A.forwardRef((r,n)=>{const{children:i,...a}=r;if(A.isValidElement(i)){const o=AO(i),l=CO(a,i.props);return i.type!==A.Fragment&&(l.ref=n?H_(n,o):o),A.cloneElement(i,l)}return A.Children.count(i)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var K_=Symbol("radix.slottable");function EO(e){const t=({children:r})=>s.jsx(s.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=K_,t}function wO(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===K_}function CO(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function AO(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function jO(e){const t=e+"CollectionProvider",[r,n]=x0(t),[i,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:v,children:y}=p,b=q.useRef(null),g=q.useRef(new Map).current;return s.jsx(i,{scope:v,itemMap:g,collectionRef:b,children:y})};o.displayName=t;const l=e+"CollectionSlot",c=nd(l),u=q.forwardRef((p,v)=>{const{scope:y,children:b}=p,g=a(l,y),w=kr(v,g.collectionRef);return s.jsx(c,{ref:w,children:b})});u.displayName=l;const d=e+"CollectionItemSlot",x="data-radix-collection-item",f=nd(d),h=q.forwardRef((p,v)=>{const{scope:y,children:b,...g}=p,w=q.useRef(null),E=kr(v,w),C=a(d,y);return q.useEffect(()=>(C.itemMap.set(w,{ref:w,...g}),()=>void C.itemMap.delete(w))),s.jsx(f,{[x]:"",ref:E,children:b})});h.displayName=d;function m(p){const v=a(e+"CollectionConsumer",p);return q.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const g=Array.from(b.querySelectorAll(`[${x}]`));return Array.from(v.itemMap.values()).sort((C,j)=>g.indexOf(C.ref.current)-g.indexOf(j.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:u,ItemSlot:h},m,n]}var kO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],It=kO.reduce((e,t)=>{const r=nd(`Primitive.${t}`),n=A.forwardRef((i,a)=>{const{asChild:o,...l}=i,c=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function V_(e,t){e&&d0.flushSync(()=>e.dispatchEvent(t))}function Ai(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function _O(e,t=globalThis==null?void 0:globalThis.document){const r=Ai(e);A.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var SO="DismissableLayer",qv="dismissableLayer.update",BO="dismissableLayer.pointerDownOutside",NO="dismissableLayer.focusOutside",o9,G_=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),sp=A.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:l,...c}=e,u=A.useContext(G_),[d,x]=A.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=A.useState({}),m=kr(t,j=>x(j)),p=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=p.indexOf(v),b=d?p.indexOf(d):-1,g=u.layersWithOutsidePointerEventsDisabled.size>0,w=b>=y,E=FO(j=>{const S=j.target,_=[...u.branches].some(O=>O.contains(S));!w||_||(i==null||i(j),o==null||o(j),j.defaultPrevented||l==null||l())},f),C=PO(j=>{const S=j.target;[...u.branches].some(O=>O.contains(S))||(a==null||a(j),o==null||o(j),j.defaultPrevented||l==null||l())},f);return _O(j=>{b===u.layers.size-1&&(n==null||n(j),!j.defaultPrevented&&l&&(j.preventDefault(),l()))},f),A.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(o9=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),l9(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=o9)}},[d,f,r,u]),A.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),l9())},[d,u]),A.useEffect(()=>{const j=()=>h({});return document.addEventListener(qv,j),()=>document.removeEventListener(qv,j)},[]),s.jsx(It.div,{...c,ref:m,style:{pointerEvents:g?w?"auto":"none":void 0,...e.style},onFocusCapture:ft(e.onFocusCapture,C.onFocusCapture),onBlurCapture:ft(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:ft(e.onPointerDownCapture,E.onPointerDownCapture)})});sp.displayName=SO;var DO="DismissableLayerBranch",q_=A.forwardRef((e,t)=>{const r=A.useContext(G_),n=A.useRef(null),i=kr(t,n);return A.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),s.jsx(It.div,{...e,ref:i})});q_.displayName=DO;function FO(e,t=globalThis==null?void 0:globalThis.document){const r=Ai(e),n=A.useRef(!1),i=A.useRef(()=>{});return A.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let c=function(){Y_(BO,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function PO(e,t=globalThis==null?void 0:globalThis.document){const r=Ai(e),n=A.useRef(!1);return A.useEffect(()=>{const i=a=>{a.target&&!n.current&&Y_(NO,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function l9(){const e=new CustomEvent(qv);document.dispatchEvent(e)}function Y_(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?V_(i,a):i.dispatchEvent(a)}var OO=sp,TO=q_,ra=globalThis!=null&&globalThis.document?A.useLayoutEffect:()=>{},$O="Portal",aE=A.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[i,a]=A.useState(!1);ra(()=>a(!0),[]);const o=r||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?U_.createPortal(s.jsx(It.div,{...n,ref:t}),o):null});aE.displayName=$O;function IO(e,t){return A.useReducer((r,n)=>t[r][n]??r,e)}var yc=e=>{const{present:t,children:r}=e,n=MO(t),i=typeof r=="function"?r({present:n.isPresent}):A.Children.only(r),a=kr(n.ref,RO(i));return typeof r=="function"||n.isPresent?A.cloneElement(i,{ref:a}):null};yc.displayName="Presence";function MO(e){const[t,r]=A.useState(),n=A.useRef(null),i=A.useRef(e),a=A.useRef("none"),o=e?"mounted":"unmounted",[l,c]=IO(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{const u=q0(n.current);a.current=l==="mounted"?u:"none"},[l]),ra(()=>{const u=n.current,d=i.current;if(d!==e){const f=a.current,h=q0(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),ra(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,x=h=>{const p=q0(n.current).includes(h.animationName);if(h.target===t&&p&&(c("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},f=h=>{h.target===t&&(a.current=q0(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",x),t.addEventListener("animationend",x),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",x),t.removeEventListener("animationend",x)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:A.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function q0(e){return(e==null?void 0:e.animationName)||"none"}function RO(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var LO=f1[" useInsertionEffect ".trim().toString()]||ra;function Z_({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,o]=zO({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:i;{const d=A.useRef(e!==void 0);A.useEffect(()=>{const x=d.current;x!==l&&console.warn(`${n} is changing from ${x?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,n])}const u=A.useCallback(d=>{var x;if(l){const f=UO(d)?d(e):d;f!==e&&((x=o.current)==null||x.call(o,f))}else a(d)},[l,e,a,o]);return[c,u]}function zO({defaultProp:e,onChange:t}){const[r,n]=A.useState(e),i=A.useRef(r),a=A.useRef(t);return LO(()=>{a.current=t},[t]),A.useEffect(()=>{var o;i.current!==r&&((o=a.current)==null||o.call(a,r),i.current=r)},[r,i]),[r,n,a]}function UO(e){return typeof e=="function"}var WO=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),HO="VisuallyHidden",op=A.forwardRef((e,t)=>s.jsx(It.span,{...e,ref:t,style:{...WO,...e.style}}));op.displayName=HO;var KO=op,sE="ToastProvider",[oE,VO,GO]=jO("Toast"),[X_,$9e]=x0("Toast",[GO]),[qO,lp]=X_(sE),Q_=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:i="right",swipeThreshold:a=50,children:o}=e,[l,c]=A.useState(null),[u,d]=A.useState(0),x=A.useRef(!1),f=A.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${sE}\`. Expected non-empty \`string\`.`),s.jsx(oE.Provider,{scope:t,children:s.jsx(qO,{scope:t,label:r,duration:n,swipeDirection:i,swipeThreshold:a,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:A.useCallback(()=>d(h=>h+1),[]),onToastRemove:A.useCallback(()=>d(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:x,isClosePausedRef:f,children:o})})};Q_.displayName=sE;var J_="ToastViewport",YO=["F8"],Yv="toast.viewportPause",Zv="toast.viewportResume",e4=A.forwardRef((e,t)=>
40{const{__scopeToast:r,hotkey:n=YO,label:i="Notifications ({hotkey})",...a}=e,o=lp(J_,r),l=VO(r),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),x=A.useRef(null),f=kr(t,x,o.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=o.toastCount>0;A.useEffect(()=>{const v=y=>{var g;n.length!==0&&n.every(w=>y[w]||y.code===w)&&((g=x.current)==null||g.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[n]),A.useEffect(()=>{const v=c.current,y=x.current;if(m&&v&&y){const b=()=>{if(!o.isClosePausedRef.current){const C=new CustomEvent(Yv);y.dispatchEvent(C),o.isClosePausedRef.current=!0}},g=()=>{if(o.isClosePausedRef.current){const C=new CustomEvent(Zv);y.dispatchEvent(C),o.isClosePausedRef.current=!1}},w=C=>{!v.contains(C.relatedTarget)&&g()},E=()=>{v.contains(document.activeElement)||g()};return v.addEventListener("focusin",b),v.addEventListener("focusout",w),v.addEventListener("pointermove",b),v.addEventListener("pointerleave",E),window.addEventListener("blur",b),window.addEventListener("focus",g),()=>{v.removeEventListener("focusin",b),v.removeEventListener("focusout",w),v.removeEventListener("pointermove",b),v.removeEventListener("pointerleave",E),window.removeEventListener("blur",b),window.removeEventListener("focus",g)}}},[m,o.isClosePausedRef]);const p=A.useCallback(({tabbingDirection:v})=>{const b=l().map(g=>{const w=g.ref.current,E=[w,...lT(w)];return v==="forwards"?E:E.reverse()});return(v==="forwards"?b.reverse():b).flat()},[l]);return A.useEffect(()=>{const v=x.current;if(v){const y=b=>{var E,C,j;const g=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!g){const S=document.activeElement,_=b.shiftKey;if(b.target===v&&_){(E=u.current)==null||E.focus();return}const B=p({tabbingDirection:_?"backwards":"forwards"}),T=B.findIndex(k=>k===S);Wm(B.slice(T+1))?b.preventDefault():_?(C=u.current)==null||C.focus():(j=d.current)==null||j.focus()}};return v.addEventListener("keydown",y),()=>v.removeEventListener("keydown",y)}},[l,p]),s.jsxs(TO,{ref:c,role:"region","aria-label":i.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&s.jsx(Xv,{ref:u,onFocusFromOutsideViewport:()=>{const v=p({tabbingDirection:"forwards"});Wm(v)}}),s.jsx(oE.Slot,{scope:r,children:s.jsx(It.ol,{tabIndex:-1,...a,ref:f})}),m&&s.jsx(Xv,{ref:d,onFocusFromOutsideViewport:()=>{const v=p({tabbingDirection:"backwards"});Wm(v)}})]})});e4.displayName=J_;var t4="ToastFocusProxy",Xv=A.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...i}=e,a=lp(t4,r);return s.jsx(op,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const l=o.relatedTarget;!((u=a.viewport)!=null&&u.contains(l))&&n()}})});Xv.displayName=t4;var f0="Toast",ZO="toast.swipeStart",XO="toast.swipeMove",QO="toast.swipeCancel",JO="toast.swipeEnd",r4=A.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:i,onOpenChange:a,...o}=e,[l,c]=Z_({prop:n,defaultProp:i??!0,onChange:a,caller:f0});return s.jsx(yc,{present:r||l,children:s.jsx(rT,{open:l,...o,ref:t,onClose:()=>c(!1),onPause:Ai(e.onPause),onResume:Ai(e.onResume),onSwipeStart:ft(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ft(e.onSwipeMove,u=>{const{x:d,y:x}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${x}px`)}),onSwipeCancel:ft(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ft(e.onSwipeEnd,u=>{const{x:d,y:x}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${x}px`),c(!1)})})})});r4.displayName=f0;var[eT,tT]=X_(f0,{onClose(){}}),rT=A.forwardRef((e,t)=>
40{const{__scopeToast:r,type:n="foreground",duration:i,open:a,onClose:o,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:x,onSwipeCancel:f,onSwipeEnd:h,...m}=e,p=lp(f0,r),[v,y]=A.useState(null),b=kr(t,k=>y(k)),g=A.useRef(null),w=A.useRef(null),E=i||p.duration,C=A.useRef(0),j=A.useRef(E),S=A.useRef(0),{onToastAdd:_,onToastRemove:O}=p,I=Ai(()=>{var $;(v==null?void 0:v.contains(document.activeElement))&&(($=p.viewport)==null||$.focus()),o()}),B=A.useCallback(k=>{!k||k===1/0||(window.clearTimeout(S.current),C.current=new Date().getTime(),S.current=window.setTimeout(I,k))},[I]);A.useEffect(()=>{const k=p.viewport;if(k){const $=()=>{B(j.current),u==null||u()},W=()=>{const z=new Date().getTime()-C.current;j.current=j.current-z,window.clearTimeout(S.current),c==null||c()};return k.addEventListener(Yv,W),k.addEventListener(Zv,$),()=>{k.removeEventListener(Yv,W),k.removeEventListener(Zv,$)}}},[p.viewport,E,c,u,B]),A.useEffect(()=>{a&&!p.isClosePausedRef.current&&B(E)},[a,E,p.isClosePausedRef,B]),A.useEffect(()=>(_(),()=>O()),[_,O]);const T=A.useMemo(()=>v?c4(v):null,[v]);return p.viewport?s.jsxs(s.Fragment,{children:[T&&s.jsx(nT,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:T}),s.jsx(eT,{scope:r,onClose:I,children:d0.createPortal(s.jsx(oE.ItemSlot,{scope:r,children:s.jsx(OO,{asChild:!0,onEscapeKeyDown:ft(l,()=>{p.isFocusedToastEscapeKeyDownRef.current||I(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.jsx(It.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":p.swipeDirection,...m,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ft(e.onKeyDown,k=>{k.key==="Escape"&&(l==null||l(k.nativeEvent),k.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,I()))}),onPointerDown:ft(e.onPointerDown,k=>{k.button===0&&(g.current={x:k.clientX,y:k.clientY})}),onPointerMove:ft(e.onPointerMove,k=>{if(!g.current)return;const $=k.clientX-g.current.x,W=k.clientY-g.current.y,z=!!w.current,L=["left","right"].includes(p.swipeDirection),F=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,U=L?F(0,$):0,D=L?0:F(0,W),N=k.pointerType==="touch"?10:2,K={x:U,y:D},R={originalEvent:k,delta:K};z?(w.current=K,Y0(XO,x,R,{discrete:!1})):c9(K,p.swipeDirection,N)?(w.current=K,Y0(ZO,d,R,{discrete:!1}),k.target.setPointerCapture(k.pointerId)):(Math.abs($)>N||Math.abs(W)>N)&&(g.current=null)}),onPointerUp:ft(e.onPointerUp,k=>{const $=w.current,W=k.target;if(W.hasPointerCapture(k.pointerId)&&W.releasePointerCapture(k.pointerId),w.current=null,g.current=null,$){const z=k.currentTarget,L={originalEvent:k,delta:$};c9($,p.swipeDirection,p.swipeThreshold)?Y0(JO,h,L,{discrete:!0}):Y0(QO,f,L,{discrete:!0}),z.addEventListener("click",F=>F.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),nT=e=>{const{__scopeToast:t,children:r,...n}=e,i=lp(f0,t),[a,o]=A.useState(!1),[l,c]=A.useState(!1);return sT(()=>o(!0)),A.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:s.jsx(aE,{asChild:!0,children:s.jsx(op,{...n,children:a&&s.jsxs(s.Fragment,{children:[i.label," ",r]})})})},iT="ToastTitle",n4=A.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return s.jsx(It.div,{...n,ref:t})});n4.displayName=iT;var aT="ToastDescription",i4=A.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return s.jsx(It.div,{...n,ref:t})});i4.displayName=aT;var a4="ToastAction",s4=A.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?s.jsx(l4,{altText:r,asChild:!0,children:s.jsx(lE,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${a4}\`. Expected non-empty \`string\`.`),null)});s4.displayName=a4;var o4="ToastClose",lE=A.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,i=tT(o4,r);return s.jsx(l4,{asChild:!0,children:s.jsx(It.button,{type:"button",...n,ref:t,onClick:ft(e.onClick,i.onClose)})})});lE.displayName=o4;var l4=A.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...i}=e;return s.jsx(It.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...i,ref:t})});function c4(e){const t=[];
vendor: 4,148 bytes, lines 40-64
40return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),oT(n)){const i=n.ariaHidden||n.hidden||n.style.display==="none",a=n.dataset.radixToastAnnounceExclude==="";if(!i)if(a){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...c4(n))}}),t}function Y0(e,t,r,{discrete:n}){const i=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?V_(i,a):i.dispatchEvent(a)}var c9=(e,t,r=0)=>{const n=Math.abs(e.x),i=Math.abs(e.y),a=n>i;return t==="left"||t==="right"?a&&n>r:!a&&i>r};function sT(e=()=>{}){const t=Ai(e);ra(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function oT(e){return e.nodeType===e.ELEMENT_NODE}function lT(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Wm(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var cT=Q_,u4=e4,d4=r4,x4=n4,f4=i4,h4=s4,p4=lE;function m4(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=m4(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Me(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=m4(e))&&(n&&(n+=" "),n+=t);return n}const u9=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,d9=Me,g4=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return d9(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(u=>{const d=r==null?void 0:r[u],x=a==null?void 0:a[u];if(d===null)return null;const f=u9(d)||u9(x);return i[u][f]}),l=r&&Object.entries(r).reduce((u,d)=>{let[x,f]=d;return f===void 0||(u[x]=f),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:x,className:f,...h}=d;return Object.entries(h).every(m=>{let[p,v]=m;return Array.isArray(v)?v.includes({...a,...l}[p]):{...a,...l}[p]===v})?[...u,x,f]:u},[]);return d9(e,o,c,r==null?void 0:r.class,r==null?void 0:r.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const uT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),v4=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var dT={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"};/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const xT=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...l},c)=>A.createElement("svg",{ref:c,...dT,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:v4("lucide",i),...l},[...o.map(([u,d])=>A.createElement(u,d)),...Array.isArray(a)?a:[a]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const de=(e,t)=>{const r=A.forwardRef(({className:n,...i},a)=>A.createElement(xT,{ref:a,iconNode:t,className:v4(`lucide-${uT(e)}`,n),...i}));return r.displayName=`${e}`,r};/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree.
65 */const fT=de("Accessibility",[["circle",{cx:"16",cy:"4",r:"1",key:"1grugj"}],["path",{d:"m18 19 1-7-6 1",key:"r0i19z"}],["path",{d:"m5 8 3-3 5.5 3-2.36 3.5",key:"9ptxx2"}],["path",{d:"M4.24 14.5a5 5 0 0 0 6.88 6",key:"10kmtu"}],["path",{d:"M13.76 17.5a5 5 0 0 0-6.88-6",key:"2qq6rc"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const y4=de("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const Sn=de("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const Af=de("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const hT=de("Baby",[["path",{d:"M9 12h.01",key:"157uk2"}],["path",{d:"M15 12h.01",key:"1k8ypt"}],["path",{d:"M10 16c.5.3 1.2.5 2 .5s1.5-.2 2-.5",key:"1u7htd"}],["path",{d:"M19 6.3a9 9 0 0 1 1.8 3.9 2 2 0 0 1 0 3.6 9 9 0 0 1-17.6 0 2 2 0 0 1 0-3.6A9 9 0 0 1 12 3c2 0 3.5 1.1 3.5 2.5s-.9 2.5-2 2.5c-.8 0-1.5-.4-1.5-1",key:"5yv0yz"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const Qv=de("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const pT=de("Beer",[["path",{d:"M17 11h1a3 3 0 0 1 0 6h-1",key:"1yp76v"}],["path",{d:"M9 12v6",key:"1u1cab"}],["path",{d:"M13 12v6",key:"1sugkk"}],["path",{d:"M14 7.5c-1 0-1.44.5-3 .5s-2-.5-3-.5-1.72.5-2.5.5a2.5 2.5 0 0 1 0-5c.78 0 1.57.5 2.5.5S9.44 2 11 2s2 1.5 3 1.5 1.72-.5 2.5-.5a2.5 2.5 0 0 1 0 5c-.78 0-1.5-.5-2.5-.5Z",key:"1510fo"}],["path",{d:"M5 8v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"19jb7n"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const mT=de("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const gT=de("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** 106 * @license lucide-react v0.462.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const hu=de("CalendarCheck",[["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:"m9 16 2 2 4-4",key:"19s6y9"}]]);/** 111 * @license lucide-react v0.462.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const Vx=de("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"}]]);/** 116 * @license lucide-react v0.462.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const Jv=de("CalendarPlus",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"3spt84"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M16 19h6",key:"xwg31i"}],["path",{d:"M19 16v6",key:"tddt3s"}]]);/** 121 * @license lucide-react v0.462.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const Lr=de("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"}]]);/** 126 * @license lucide-react v0.462.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const vT=de("CameraOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16",key:"qmtpty"}],["path",{d:"M9.5 4h5L17 7h3a2 2 0 0 1 2 2v7.5",key:"1ufyfc"}],["path",{d:"M14.121 15.121A3 3 0 1 1 9.88 10.88",key:"11zox6"}]]);/** 131 * @license lucide-react v0.462.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const b4=de("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** 136 * @license lucide-react v0.462.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const cE=de("ChartNoAxesColumn",[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]]);/** 141 * @license lucide-react v0.462.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const ti=de("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 146 * @license lucide-react v0.462.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const mr=de("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 151 * @license lucide-react v0.462.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const yT=de("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 156 * @license lucide-react v0.462.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const zl=de("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 161 * @license lucide-react v0.462.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const na=de("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 166 * @license lucide-react v0.462.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const cp=de("Chrome",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["line",{x1:"21.17",x2:"12",y1:"8",y2:"8",key:"a0cw5f"}],["line",{x1:"3.95",x2:"8.54",y1:"6.06",y2:"14",key:"1kftof"}],["line",{x1:"10.88",x2:"15.46",y1:"21.94",y2:"14",key:"1ymyh8"}]]);/** 171 * @license lucide-react v0.462.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const Ul=de("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"}]]);/** 176 * @license lucide-react v0.462.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const up=de("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 181 * @license lucide-react v0.462.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const ut=de("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 186 * @license lucide-react v0.462.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const E4=de("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 191 * @license lucide-react v0.462.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const Hm=de("CircleUserRound",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 196 * @license lucide-react v0.462.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const Kt=de("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** 201 * @license lucide-react v0.462.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree.
205 */const bT=de("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/** 206 * @license lucide-react v0.462.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const gr=de("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 211 * @license lucide-react v0.462.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const ET=de("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** 216 * @license lucide-react v0.462.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const wT=de("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** 221 * @license lucide-react v0.462.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const Km=de("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** 226 * @license lucide-react v0.462.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of this source tree. 230 */const zr=de("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"}]]);/** 231 * @license lucide-react v0.462.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree. 235 */const ji=de("Euro",[["path",{d:"M4 10h12",key:"1y6xl8"}],["path",{d:"M4 14h9",key:"1loblj"}],["path",{d:"M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2",key:"1j6lzo"}]]);/** 236 * @license lucide-react v0.462.0 - ISC 237 * 238 * This source code is licensed under the ISC license. 239 * See the LICENSE file in the root directory of this source tree. 240 */const w4=de("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 241 * @license lucide-react v0.462.0 - ISC 242 * 243 * This source code is licensed under the ISC license. 244 * See the LICENSE file in the root directory of this source tree. 245 */const uo=de("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"}]]);/** 246 * @license lucide-react v0.462.0 - ISC 247 * 248 * This source code is licensed under the ISC license. 249 * See the LICENSE file in the root directory of this source tree. 250 */const ki=de("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"}]]);/** 251 * @license lucide-react v0.462.0 - ISC 252 * 253 * This source code is licensed under the ISC license. 254 * See the LICENSE file in the root directory of this source tree. 255 */const jf=de("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** 256 * @license lucide-react v0.462.0 - ISC 257 * 258 * This source code is licensed under the ISC license. 259 * See the LICENSE file in the root directory of this source tree. 260 */const ey=de("FileDown",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/** 261 * @license lucide-react v0.462.0 - ISC 262 * 263 * This source code is licensed under the ISC license. 264 * See the LICENSE file in the root directory of this source tree. 265 */const h0=de("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 266 * @license lucide-react v0.462.0 - ISC 267 * 268 * This source code is licensed under the ISC license. 269 * See the LICENSE file in the root directory of this source tree. 270 */const CT=de("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** 271 * @license lucide-react v0.462.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */const AT=de("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 276 * @license lucide-react v0.462.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree. 280 */const jT=de("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}
280]]);/** 281 * @license lucide-react v0.462.0 - ISC 282 * 283 * This source code is licensed under the ISC license. 284 * See the LICENSE file in the root directory of this source tree. 285 */const x9=de("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** 286 * @license lucide-react v0.462.0 - ISC 287 * 288 * This source code is licensed under the ISC license. 289 * See the LICENSE file in the root directory of this source tree. 290 */const C4=de("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 291 * @license lucide-react v0.462.0 - ISC 292 * 293 * This source code is licensed under the ISC license. 294 * See the LICENSE file in the root directory of this source tree. 295 */const kf=de("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** 296 * @license lucide-react v0.462.0 - ISC 297 * 298 * This source code is licensed under the ISC license. 299 * See the LICENSE file in the root directory of this source tree. 300 */const ty=de("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** 301 * @license lucide-react v0.462.0 - ISC 302 * 303 * This source code is licensed under the ISC license. 304 * See the LICENSE file in the root directory of this source tree. 305 */const f9=de("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** 306 * @license lucide-react v0.462.0 - ISC 307 * 308 * This source code is licensed under the ISC license. 309 * See the LICENSE file in the root directory of this source tree. 310 */const h9=de("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/** 311 * @license lucide-react v0.462.0 - ISC 312 * 313 * This source code is licensed under the ISC license. 314 * See the LICENSE file in the root directory of this source tree. 315 */const kT=de("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/** 316 * @license lucide-react v0.462.0 - ISC 317 * 318 * This source code is licensed under the ISC license. 319 * See the LICENSE file in the root directory of this source tree. 320 */const ar=de("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 321 * @license lucide-react v0.462.0 - ISC 322 * 323 * This source code is licensed under the ISC license. 324 * See the LICENSE file in the root directory of this source tree. 325 */const dp=de("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"}]]);/** 326 * @license lucide-react v0.462.0 - ISC 327 * 328 * This source code is licensed under the ISC license. 329 * See the LICENSE file in the root directory of this source tree. 330 */const ry=de("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"}]]);/** 331 * @license lucide-react v0.462.0 - ISC 332 * 333 * This source code is licensed under the ISC license. 334 * See the LICENSE file in the root directory of this source tree. 335 */const _T=de("MailCheck",[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]);/** 336 * @license lucide-react v0.462.0 - ISC 337 * 338 * This source code is licensed under the ISC license. 339 * See the LICENSE file in the root directory of this source tree. 340 */const $t=de("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"}]]);/** 341 * @license lucide-react v0.462.0 - ISC 342 * 343 * This source code is licensed under the ISC license. 344 * See the LICENSE file in the root directory of this source tree. 345 */const _r=de("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"}]]);/** 346 * @license lucide-react v0.462.0 - ISC 347 * 348 * This source code is licensed under the ISC license. 349 * See the LICENSE file in the root directory of this source tree. 350 */const A4=de("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/** 351 * @license lucide-react v0.462.0 - ISC 352 * 353 * This source code is licensed under the ISC license. 354 * See the LICENSE file in the root directory of this source tree. 355 */const ST=de("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/** 356 * @license lucide-react v0.462.0 - ISC 357 * 358 * This source code is licensed under the ISC license. 359 * See the LICENSE file in the root directory of this source tree. 360 */const BT=de("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 361 * @license lucide-react v0.462.0 - ISC 362 * 363 * This source code is licensed under the ISC license. 364 * See the LICENSE file in the root directory of this source tree. 365 */const NT=de("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** 366 * @license lucide-react v0.462.0 - ISC 367 * 368 * This source code is licensed under the ISC license. 369 * See the LICENSE file in the root directory of this source tree. 370 */const j4=de("MicVocal",[["path",{d:"m11 7.601-5.994 8.19a1 1 0 0 0 .1 1.298l.817.818a1 1 0 0 0 1.314.087L15.09 12",key:"80a601"}],["path",{d:"M16.5 21.174C15.5 20.5 14.372 20 13 20c-2.058 0-3.928 2.356-6 2-2.072-.356-2.775-3.369-1.5-4.5",key:"j0ngtp"}],["circle",{cx:"16",cy:"7",r:"5",key:"d08jfb"}]]);/** 371 * @license lucide-react v0.462.0 - ISC 372 * 373 * This source code is licensed under the ISC license. 374 * See the LICENSE file in the root directory of this source tree. 375 */const DT=de("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** 376 * @license lucide-react v0.462.0 - ISC 377 * 378 * This source code is licensed under the ISC license. 379 * See the LICENSE file in the root directory of this source tree. 380 */const FT=de("Move",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]]);/** 381 * @license lucide-react v0.462.0 - ISC 382 * 383 * This source code is licensed under the ISC license. 384 * See the LICENSE file in the root directory of this source tree. 385 */const PT=de("Music2",[["circle",{cx:"8",cy:"18",r:"4",key:"1fc0mg"}],["path",{d:"M12 18V2l7 4",key:"g04rme"}]]);/** 386 * @license lucide-react v0.462.0 - ISC 387 * 388 * This source code is licensed under the ISC license. 389 * See the LICENSE file in the root directory of this source tree. 390 */const ia=de("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/** 391 * @license lucide-react v0.462.0 - ISC 392 * 393 * This source code is licensed under the ISC license. 394 * See the LICENSE file in the root directory of this source tree. 395 */const OT=de("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/** 396 * @license lucide-react v0.462.0 - ISC 397 * 398 * This source code is licensed under the ISC license. 399 * See the LICENSE file in the root directory of this source tree. 400 */const p9=de("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/** 401 * @license lucide-react v0.462.0 - ISC 402 * 403 * This source code is licensed under the ISC license. 404 * See the LICENSE file in the root directory of this source tree. 405 */const TT=de("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"}]]);/** 406 * @license lucide-react v0.462.0 - ISC 407 * 408 * This source code is licensed under the ISC license. 409 * See the LICENSE file in the root directory of this source tree. 410 */const m9=de("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"}]]);/** 411 * @license lucide-react v0.462.0 - ISC 412 * 413 * This source code is licensed under the ISC license. 414 * See the LICENSE file in the root directory of this source tree. 415 */const ss=de("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** 416 * @license lucide-react v0.462.0 - ISC 417 * 418 * This source code is licensed under the ISC license. 419 * See the LICENSE file in the root directory of this source tree. 420 */const g9=de("Percent",[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]]);/** 421 * @license lucide-react v0.462.0 - ISC 422 * 423 * This source code is licensed under the ISC license. 424 * See the LICENSE file in the root directory of this source tree. 425 */const $T=de("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** 426 * @license lucide-react v0.462.0 - ISC 427 * 428 * This source code is licensed under the ISC license. 429 * See the LICENSE file in the root directory of this source tree. 430 */const IT=de("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 431 * @license lucide-react v0.462.0 - ISC 432 * 433 * This source code is licensed under the ISC license. 434 * See the LICENSE file in the root directory of this source tree. 435 */const Ht=de("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 436 * @license lucide-react v0.462.0 - ISC 437 * 438 * This source code is licensed under the ISC license. 439 * See the LICENSE file in the root directory of this source tree. 440 */const v9=de("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"}]]);/** 441 * @license lucide-react v0.462.0 - ISC 442 * 443 * This source code is licensed under the ISC license. 444 * See the LICENSE file in the root directory of this source tree. 445 */const _f=de("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/** 446 * @license lucide-react v0.462.0 - ISC 447 * 448 * This source code is licensed under the ISC license. 449 * See the LICENSE file in the root directory of this source tree. 450 */const Be=de("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 451 * @license lucide-react v0.462.0 - ISC 452 * 453 * This source code is licensed under the ISC license. 454 * See the LICENSE file in the root directory of this source tree. 455 */const aa=de("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** 456 * @license lucide-react v0.462.0 - ISC 457 * 458 * This source code is licensed under the ISC license. 459 * See the LICENSE file in the root directory of this source tree. 460 */const p0=de("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** 461 * @license lucide-react v0.462.0 - ISC 462 * 463 * This source code is licensed under the ISC license. 464 * See the LICENSE file in the root directory of this source tree. 465 */const Ur=de("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 466 * @license lucide-react v0.462.0 - ISC 467 * 468 * This source code is licensed under the ISC license. 469 * See the LICENSE file in the root directory of this source tree. 470 */const os=de("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** 471 * @license lucide-react v0.462.0 - ISC 472 * 473 * This source code is licensed under the ISC license. 474 * See the LICENSE file in the root directory of this source tree. 475 */const k4=de("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"}]]);/** 476 * @license lucide-react v0.462.0 - ISC 477 * 478 * This source code is licensed under the ISC license. 479 * See the LICENSE file in the root directory of this source tree. 480 */const MT=de("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:
480"1n3mei"}]]);/** 481 * @license lucide-react v0.462.0 - ISC 482 * 483 * This source code is licensed under the ISC license. 484 * See the LICENSE file in the root directory of this source tree. 485 */const uE=de("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"}]]);/** 486 * @license lucide-react v0.462.0 - ISC 487 * 488 * This source code is licensed under the ISC license. 489 * See the LICENSE file in the root directory of this source tree. 490 */const ha=de("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"}]]);/** 491 * @license lucide-react v0.462.0 - ISC 492 * 493 * This source code is licensed under the ISC license. 494 * See the LICENSE file in the root directory of this source tree. 495 */const RT=de("ShieldOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]]);/** 496 * @license lucide-react v0.462.0 - ISC 497 * 498 * This source code is licensed under the ISC license. 499 * See the LICENSE file in the root directory of this source tree. 500 */const dE=de("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"}]]);/** 501 * @license lucide-react v0.462.0 - ISC 502 * 503 * This source code is licensed under the ISC license. 504 * See the LICENSE file in the root directory of this source tree. 505 */const kn=de("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/** 506 * @license lucide-react v0.462.0 - ISC 507 * 508 * This source code is licensed under the ISC license. 509 * See the LICENSE file in the root directory of this source tree. 510 */const ny=de("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"}]]);/** 511 * @license lucide-react v0.462.0 - ISC 512 * 513 * This source code is licensed under the ISC license. 514 * See the LICENSE file in the root directory of this source tree. 515 */const iy=de("SquareUserRound",[["path",{d:"M18 21a6 6 0 0 0-12 0",key:"kaz2du"}],["circle",{cx:"12",cy:"11",r:"4",key:"1gt34v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** 516 * @license lucide-react v0.462.0 - ISC 517 * 518 * This source code is licensed under the ISC license. 519 * See the LICENSE file in the root directory of this source tree. 520 */const LT=de("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** 521 * @license lucide-react v0.462.0 - ISC 522 * 523 * This source code is licensed under the ISC license. 524 * See the LICENSE file in the root directory of this source tree. 525 */const ay=de("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** 526 * @license lucide-react v0.462.0 - ISC 527 * 528 * This source code is licensed under the ISC license. 529 * See the LICENSE file in the root directory of this source tree. 530 */const Gx=de("Tent",[["path",{d:"M3.5 21 14 3",key:"1szst5"}],["path",{d:"M20.5 21 10 3",key:"1310c3"}],["path",{d:"M15.5 21 12 15l-3.5 6",key:"1ddtfw"}],["path",{d:"M2 21h20",key:"1nyx9w"}]]);/** 531 * @license lucide-react v0.462.0 - ISC 532 * 533 * This source code is licensed under the ISC license. 534 * See the LICENSE file in the root directory of this source tree. 535 */const Wl=de("TicketCheck",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 536 * @license lucide-react v0.462.0 - ISC 537 * 538 * This source code is licensed under the ISC license. 539 * See the LICENSE file in the root directory of this source tree. 540 */const Pt=de("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);/** 541 * @license lucide-react v0.462.0 - ISC 542 * 543 * This source code is licensed under the ISC license. 544 * See the LICENSE file in the root directory of this source tree. 545 */const Vt=de("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
545],["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"}]]);/** 546 * @license lucide-react v0.462.0 - ISC 547 * 548 * This source code is licensed under the ISC license. 549 * See the LICENSE file in the root directory of this source tree. 550 */const zT=de("Trees",[["path",{d:"M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z",key:"1l6gj6"}],["path",{d:"M7 16v6",key:"1a82de"}],["path",{d:"M13 19v3",key:"13sx9i"}],["path",{d:"M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5",key:"1sj9kv"}]]);/** 551 * @license lucide-react v0.462.0 - ISC 552 * 553 * This source code is licensed under the ISC license. 554 * See the LICENSE file in the root directory of this source tree. 555 */const xE=de("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** 556 * @license lucide-react v0.462.0 - ISC 557 * 558 * This source code is licensed under the ISC license. 559 * See the LICENSE file in the root directory of this source tree. 560 */const bn=de("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 561 * @license lucide-react v0.462.0 - ISC 562 * 563 * This source code is licensed under the ISC license. 564 * See the LICENSE file in the root directory of this source tree. 565 */const UT=de("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/** 566 * @license lucide-react v0.462.0 - ISC 567 * 568 * This source code is licensed under the ISC license. 569 * See the LICENSE file in the root directory of this source tree. 570 */const y9=de("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** 571 * @license lucide-react v0.462.0 - ISC 572 * 573 * This source code is licensed under the ISC license. 574 * See the LICENSE file in the root directory of this source tree. 575 */const WT=de("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"}]]);/** 576 * @license lucide-react v0.462.0 - ISC 577 * 578 * This source code is licensed under the ISC license. 579 * See the LICENSE file in the root directory of this source tree. 580 */const _4=de("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"}]]);/** 581 * @license lucide-react v0.462.0 - ISC 582 * 583 * This source code is licensed under the ISC license. 584 * See the LICENSE file in the root directory of this source tree. 585 */const HT=de("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"}]]);/** 586 * @license lucide-react v0.462.0 - ISC 587 * 588 * This source code is licensed under the ISC license. 589 * See the LICENSE file in the root directory of this source tree. 590 */const id=de("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"}]]);/** 591 * @license lucide-react v0.462.0 - ISC 592 * 593 * This source code is licensed under the ISC license. 594 * See the LICENSE file in the root directory of this source tree. 595 */const Je=de("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"}]]);/** 596 * @license lucide-react v0.462.0 - ISC 597 * 598 * This source code is licensed under the ISC license. 599 * See the LICENSE file in the root directory of this source tree. 600 */const b9=de("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);/** 601 * @license lucide-react v0.462.0 - ISC 602 * 603 * This source code is licensed under the ISC license. 604 * See the LICENSE file in the root directory of this source tree. 605 */const _t=de("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 13,411 bytes, lines 605-620
605],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 606 * @license lucide-react v0.462.0 - ISC 607 * 608 * This source code is licensed under the ISC license. 609 * See the LICENSE file in the root directory of this source tree. 610 */const fE=de("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);/** 611 * @license lucide-react v0.462.0 - ISC 612 * 613 * This source code is licensed under the ISC license. 614 * See the LICENSE file in the root directory of this source tree. 615 */const KT=de("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);/** 616 * @license lucide-react v0.462.0 - ISC 617 * 618 * This source code is licensed under the ISC license. 619 * See the LICENSE file in the root directory of this source tree. 620 */const VT=de("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),hE="-",GT=e=>{const t=YT(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const l=o.split(hE);return l[0]===""&&l.length!==1&&l.shift(),S4(l,t)||qT(o)},getConflictingClassGroupIds:(o,l)=>{const c=r[o]||[];return l&&n[o]?[...c,...n[o]]:c}}},S4=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?S4(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(hE);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},E9=/^\[(.+)\]$/,qT=e=>{if(E9.test(e)){const t=E9.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},YT=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return XT(Object.entries(e.classGroups),r).forEach(([a,o])=>{sy(o,n,a,t)}),n},sy=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:w9(t,i);a.classGroupId=r;return}if(typeof i=="function"){if(ZT(i)){sy(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([a,o])=>{sy(o,w9(t,a),r,n)})})},w9=(e,t)=>{let r=e;return t.split(hE).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},ZT=e=>e.isThemeGetter,XT=(e,t)=>t?e.map(([r,n])=>{const i=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,l])=>[t+o,l])):a);return[r,i]}):e,QT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(a,o)=>{r.set(a,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let o=r.get(a);if(o!==void 0)return o;if((o=n.get(a))!==void 0)return i(a,o),o},set(a,o){r.has(a)?r.set(a,o):i(a,o)}}},B4="!",JT=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],a=t.length,o=l=>{const c=[];let u=0,d=0,x;for(let v=0;v<l.length;v++){let y=l[v];if(u===0){if(y===i&&(n||l.slice(v,v+a)===t)){c.push(l.slice(d,v)),d=v+a;continue}if(y==="/"){x=v;continue}}y==="["?u++:y==="]"&&u--}const f=c.length===0?l:l.substring(d),h=f.startsWith(B4),m=h?f.substring(1):f,p=x&&x>d?x-d:void 0;return{modifiers:c,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}};return r?l=>r({className:l,parseClassName:o}):o},e$=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},t$=e=>({cache:QT(e.cacheSize),parseClassName:JT(e),...GT(e)}),r$=/\s+/,n$=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(r$);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:d,hasImportantModifier:x,baseClassName:f,maybePostfixModifierPosition:h}=r(u);let m=!!h,p=n(m?f.substring(0,h):f);if(!p){if(!m){l=u+(l.length>0?" "+l:l);continue}if(p=n(f),!p){l=u+(l.length>0?" "+l:l);continue}m=!1}const v=e$(d).join(":"),y=x?v+B4:v,b=y+p;if(a.includes(b))continue;a.push(b);const g=i(p,m);for(let w=0;w<g.length;++w){const E=g[w];a.push(y+E)}l=u+(l.length>0?" "+l:l)}return l};function i$(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=N4(t))&&(n&&(n+=" "),n+=r);return n}const N4=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=N4(e[n]))&&(r&&(r+=" "),r+=t);return r};function a$(e,...t){let r,n,i,a=o;function o(c){const u=t.reduce((d,x)=>x(d),e());return r=t$(u),n=r.cache.get,i=r.cache.set,a=l,l(c)}function l(c){const u=n(c);if(u)return u;const d=n$(c,r);return i(c,d),d}return function(){return a(i$.apply(null,arguments))}}const at=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},D4=/^\[(?:([a-z-]+):)?(.+)\]$/i,s$=/^\d+\/\d+$/,o$=new Set(["px","full","screen"]),l$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,c$=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,u$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,d$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,x$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Di=e=>vl(e)||o$.has(e)||s$.test(e),wa=e=>bc(e,"length",b$),vl=e=>!!e&&!Number.isNaN(Number(e)),Vm=e=>bc(e,"number",vl),qc=e=>!!e&&Number.isInteger(Number(e)),f$=e=>e.endsWith("%")&&vl(e.slice(0,-1)),Fe=e=>D4.test(e),Ca=e=>l$.test(e),h$=new Set(["length","size","percentage"]),p$=e=>bc(e,h$,F4),m$=e=>bc(e,"position",F4),g$=new Set(["image","url"]),v$=e=>bc(e,g$,w$),y$=e=>bc(e,"",E$),Yc=()=>!0,bc=(e,t,r)=>{const n=D4.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},b$=e=>c$.test(e)&&!u$.test(e),F4=()=>!1,E$=e=>d$.test(e),w$=e=>x$.test(e),C$=()=>{const e=at("colors"),t=at("spacing"),r=at("blur"),n=at("brightness"),i=at("borderColor"),a=at("borderRadius"),o=at("borderSpacing"),l=at("borderWidth"),c=at("contrast"),u=at("grayscale"),d=at("hueRotate"),x=at("invert"),f=at("gap"),h=at("gradientColorStops"),m=at("gradientColorStopPositions"),p=at("inset"),v=at("margin"),y=at("opacity"),b=at("padding"),g=at("saturate"),w=at("scale"),E=at("sepia"),C=at("skew"),j=at("space"),S=at("translate"),_=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",Fe,t],B=()=>[Fe,t],T=()=>["",Di,wa],k=()=>["auto",vl,Fe],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],F=()=>["","0",Fe],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[vl,Fe];return{cacheSize:500,separator:":",theme:{colors:[Yc],spacing:[Di,wa],blur:["none","",Ca,Fe],brightness:D(),borderColor:[e],borderRadius:["none","","full",Ca,Fe],borderSpacing:B(),borderWidth:T(),contrast:D(),grayscale:F(),hueRotate:D(),invert:F(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[f$,wa],inset:I(),margin:I(),opacity:D(),padding:B(),saturate:D(),scale:D(),sepia:F(),skew:D(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",Fe]}],container:["container"],columns:[{columns:[Ca]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...$(),Fe]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",qc,Fe]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Fe]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:["first","last","none",qc,Fe]}],"grid-cols":[{"grid-cols":[Yc]}],"col-start-end":[{col:["auto",{span:["full",qc,Fe]},Fe]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[Yc]}],"row-start-end":[{row:["auto",{span:[qc,Fe]},Fe]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Fe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Fe]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Fe,t]}],"min-w":[{"min-w":[Fe,t,"min","max","fit"]}],"max-w":[{"max-w":[Fe,t,"none","full","min","max","fit","prose",{screen:[Ca]},Ca]}],h:[{h:[Fe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Fe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Fe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Fe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ca,wa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Vm]}],"font-family":[{font:[Yc]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Fe]}],"line-clamp":[{"line-clamp":["none",vl,Vm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Di,Fe]}],"list-image":[{"list-image":["none",Fe]}],"list-style-type":[{list:["none","disc","decimal",Fe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Di,wa]}],"underline-offset":[{"underline-offset":["auto",Di,Fe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Fe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),m$]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",p$]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},v$]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}
620],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}
vendor: 4,467 bytes, line 620
620],"divide-style":[{divide:W()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[Di,Fe]}],"outline-w":[{outline:[Di,wa]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:T()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Di,wa]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ca,y$]}],"shadow-color":[{shadow:[Yc]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Ca,Fe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[x]}],saturate:[{saturate:[g]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[x]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Fe]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",Fe]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",Fe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[qc,Fe]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Fe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Fe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Fe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Di,wa,Vm]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","
620none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},A$=a$(C$);function Wr(...e){return A$(Me(e))}const j$=cT,P4=A.forwardRef(({className:e,...t},r)=>s.jsx(u4,{ref:r,className:Wr("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));P4.displayName=u4.displayName;const k$=g4("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),O4=A.forwardRef(({className:e,variant:t,...r},n)=>s.jsx(d4,{ref:n,className:Wr(k$({variant:t}),e),...r}));O4.displayName=d4.displayName;const _$=A.forwardRef(({className:e,...t},r)=>s.jsx(h4,{ref:r,className:Wr("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));_$.displayName=h4.displayName;const T4=A.forwardRef(({className:e,...t},r)=>s.jsx(p4,{ref:r,className:Wr("absolute right-2 top-2 rounded-md p-1 text-foreground
620/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:s.jsx(_t,{className:"h-4 w-4"})}));T4.displayName=p4.displayName;const $4=A.forwardRef(({className:e,...t},r)=>s.jsx(x4,{ref:r,className:Wr("text-sm font-semibold",e),...t}));$4.displayName=x4.displayName;const I4=A.forwardRef(({className:e,...t},r)=>s.jsx(f4,{ref:r,className:Wr("text-sm opacity-90",e),...t}));I4.displayName=f4.displayName;function S$(){const{toasts:e}=iE();return s.jsxs(j$,{children:[e.map(function({id:t,title:r,description:n,action:i,...a}){return s.jsxs(O4,{...a,children:[s.jsxs("div",{className:"grid gap-1",children:[r&&s.jsx($4,{children:r}),n&&s.jsx(I4,{children:n})]}),i,s.jsx(T4,{})]},t)}),s.jsx(P4,{})]})}var C9=["light","dark"],B$="(prefers-color-scheme: dark)",N$=A.createContext(void 0),D$={setTheme:e=>{},themes:[]},F$=()=>{var e;return(e=A.useContext(N$))!=null?e:D$};A.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:i,defaultTheme:a,value:o,attrs:l,nonce:c})=>{let u=a==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(m=>`'${m}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,x=i?C9.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(m,p=!1,v=!0)=>{let y=o?o[m]:m,b=p?m+"|| ''":`'${y}'`,g="";return i&&v&&!p&&C9.includes(m)&&(g+=`d.style.colorScheme = '${m}';`),r==="class"?p||y?g+=`c.add(${b})`:g+="null":y&&(g+=`d[s](n,${b})`),g},h=e?`!function(){${d}${f(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${B$}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(a,!1,!1)+"}"}${x}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(a,!1,!1)};}${x}}catch(t){}}();`;return A.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:h}})});var P$=e=>{switch(e){case"success":return $$;case"info":return M$;case"warning":return I$;case"error":return R$;default:return null}},O$=Array(12).fill(0),T$=({visible:e,className:t})=>q.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},q.createElement("div",{className:"sonner-spinner"},O$.map((r,n)=>q.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),$$=q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},q.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),I$=q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},q.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),M$=q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},q.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),R$=q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},q.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),L$=q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},q.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),q.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),z$=()=>{let[e,t]=q.useState(document.hidden);return q.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},oy=1,U$=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
vendor: 1,050 bytes, line 620
620{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:oy++,a=this.toasts.find(l=>l.id===i),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),a?this.toasts=this.toasts.map(l=>l.id===i?(this.publish({...l,...e,id:i,title:r}),{...l,...e,id:i,dismissible:o,title:r}):l):this.addToast({title:r,...n,dismissible:o,id:i}),i},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
620this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),i=r!==void 0,a,o=n.then(async c=>{if(a=["resolve",c],q.isValidElement(c))i=!1,this.create({id:r,type:"default",message:c});else if(H$(c)&&!c.ok){i=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:r,type:"error",message:u,description:d})}else if(t.success!==void 0){i=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"success",message:u,description:d})}}).catch(async c=>{if(a=["reject",c],t.error!==void 0){i=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"error",message:u,description:d})}}).finally(()=>{var c;i&&(this.dismiss(r),r=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>o.then(()=>a[0]==="reject"?u(a[1]):c(a[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||oy++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Pr=new U$,W$=(e,t)=>{let r=(t==null?void 0:t.id)||oy++;return Pr.addToast({title:e,...t,id:r}),r},H$=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",K$=W$,V$=()=>Pr.toasts,G$=()=>Pr.getActiveToasts(),Gm=Object.assign(K$,{success:Pr.success,info:Pr.info,warning:Pr.warning,error:Pr.error,custom:Pr.custom,message:Pr.message,promise:Pr.promise,dismiss:Pr.dismiss,loading:Pr.loading},{getHistory:V$,getToasts:G$});function q$(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}q$(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
620left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
620:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
620--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 621`);function Z0(e){return e.label!==void 0}var Y$=3,Z$="32px",X$="16px",A9=4e3,Q$=356,J$=14,eI=20,tI=200;function $n(...e){return e.filter(Boolean).join(" ")}function rI(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var nI=e=>{var t,r,n,i,a,o,l,c,u,d,x;let{invert:f,toast:h,unstyled:m,interacting:p,setHeights:v,visibleToasts:y,heights:b,index:g,toasts:w,expanded:E,removeToast:C,defaultRichColors:j,closeButton:S,style:_,cancelButtonStyle:O,actionButtonStyle:I,className:B="",descriptionClassName:T="",duration:k,position:$,gap:W,loadingIcon:z,expandByDefault:L,classNames:F,icons:U,closeButtonAriaLabel:D="Close toast",pauseWhenPageIsHidden:N}=e,[K,R]=q.useState(null),[H,X]=q.useState(null),[ie,se]=q.useState(!1),[ne,ce]=q.useState(!1),[ae,Q]=q.useState(!1),[he,P]=q.useState(!1),[G,Z]=q.useState(!1),[V,M]=q.useState(0),[Y,ee]=q.useState(0),te=q.useRef(h.duration||k||A9),J=q.useRef(null),oe=q.useRef(null),pe=g===0,xe=g+1<=y,ve=h.type,Oe=h.dismissible!==!1,De=h.className||"",Et=h.descriptionClassName||"",ge=q.useMemo(()=>b.findIndex(_e=>_e.toastId===h.id)||0,[b,h.id]),He=q.useMemo(()=>{var _e;return(_e=h.closeButton)!=null?_e:S},[h.closeButton,S]),wt=q.useMemo(()=>h.duration||k||A9,[h.duration,k]),ze=q.useRef(0),br=q.useRef(0),Dn=q.useRef(0),qt=q.useRef(null),[No,Rc]=$.split("-"),ws=q.useMemo(()=>b.reduce((_e,Ke,et)=>et>
621=ge?_e:_e+Ke.height,0),[b,ge]),Do=z$(),Cs=h.invert||f,ln=ve==="loading";br.current=q.useMemo(()=>ge*W+ws,[ge,ws]),q.useEffect(()=>{te.current=wt},[wt]),q.useEffect(()=>{se(!0)},[]),q.useEffect(()=>{let _e=oe.current;if(_e){let Ke=_e.getBoundingClientRect().height;return ee(Ke),v(et=>[{toastId:h.id,height:Ke,position:h.position},...et]),()=>v(et=>et.filter(Fn=>Fn.toastId!==h.id))}},[v,h.id]),q.useLayoutEffect(()=>{if(!ie)return;let _e=oe.current,Ke=_e.style.height;_e.style.height="auto";let et=_e.getBoundingClientRect().height;_e.style.height=Ke,ee(et),v(Fn=>Fn.find(Pn=>Pn.toastId===h.id)?Fn.map(Pn=>Pn.toastId===h.id?{...Pn,height:et}:Pn):[{toastId:h.id,height:et,position:h.position},...Fn])},[ie,h.title,h.description,v,h.id]);let or=q.useCallback(()=>{ce(!0),M(br.current),v(_e=>_e.filter(Ke=>Ke.toastId!==h.id)),setTimeout(()=>{C(h)},tI)},[h,C,v,br]);q.useEffect(()=>{if(h.promise&&ve==="loading"||h.duration===1/0||h.type==="loading")return;let _e;return E||p||N&&Do?(()=>{if(Dn.current<ze.current){let Ke=new Date().getTime()-ze.current;te.current=te.current-Ke}Dn.current=new Date().getTime()})():te.current!==1/0&&(ze.current=new Date().getTime(),_e=setTimeout(()=>{var Ke;(Ke=h.onAutoClose)==null||Ke.call(h,h),or()},te.current)),()=>clearTimeout(_e)},[E,p,h,ve,N,Do,or]),q.useEffect(()=>{h.delete&&or()},[or,h.delete]);function fm(){var _e,Ke,et;return U!=null&&U.loading?q.createElement("div",{className:$n(F==null?void 0:F.loader,(_e=h==null?void 0:h.classNames)==null?void 0:_e.loader,"sonner-loader"),"data-visible":ve==="loading"},U.loading):z?q.createElement("div",{className:$n(F==null?void 0:F.loader,(Ke=h==null?void 0:h.classNames)==null?void 0:Ke.loader,"sonner-loader"),"data-visible":ve==="loading"},z):q.createElement(T$,{className:$n(F==null?void 0:F.loader,(et=h==null?void 0:h.classNames)==null?void 0:et.loader),visible:ve==="loading"})}return q.createElement("li",{tabIndex:0,ref:oe,className:$n(B,De,F==null?void 0:F.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,F==null?void 0:F.default,F==null?void 0:F[ve],(r=h==null?void 0:h.classNames)==null?void 0:r[ve]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:j,"data-styled":!(h.jsx||h.unstyled||m),"data-mounted":ie,"data-promise":!!h.promise,"data-swiped":G,"data-removed":ne,"data-visible":xe,"data-y-position":No,"data-x-position":Rc,"data-index":g,"data-front":pe,"data-swiping":ae,"data-dismissible":Oe,"data-type":ve,"data-invert":Cs,"data-swipe-out":he,"data-swipe-direction":H,"data-expanded":!!(E||L&&ie),style:{"--index":g,"--toasts-before":g,"--z-index":w.length-g,"--offset":`${ne?V:br.current}px`,"--initial-height":L?"auto":`${Y}px`,..._,...h.style},onDragEnd:()=>{Q(!1),R(null),qt.current=null},onPointerDown:_e=>{ln||!Oe||(J.current=new Date,M(br.current),_e.target.setPointerCapture(_e.pointerId),_e.target.tagName!=="BUTTON"&&(Q(!0),qt.current={x:_e.clientX,y:_e.clientY}))},onPointerUp:()=>{var _e,Ke,et,Fn;if(he||!Oe)return;qt.current=null;let Pn=Number(((_e=oe.current)==null?void 0:_e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ya=Number(((Ke=oe.current)==null?void 0:Ke.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),As=new Date().getTime()-((et=J.current)==null?void 0:et.getTime()),On=K==="x"?Pn:ya,ba=Math.abs(On)/As;if(Math.abs(On)>=eI||ba>.11){M(br.current),(Fn=h.onDismiss)==null||Fn.call(h,h),X(K==="x"?Pn>0?"right":"left":ya>0?"down":"up"),or(),P(!0),Z(!1);return}Q(!1),R(null)},onPointerMove:_e=>{var Ke,et,Fn,Pn;if(!qt.current||!Oe||((Ke=window.getSelection())==null?void 0:Ke.toString().length)>0)return;let ya=_e.clientY-qt.current.y,As=_e.clientX-qt.current.x,On=(et=e.swipeDirections)!=null?et:rI($);!K&&(Math.abs(As)>1||Math.abs(ya)>1)&&R(Math.abs(As)>Math.abs(ya)?"x":"y");let ba={x:0,y:0};K==="y"?(On.includes("top")||On.includes("bottom"))&&(On.includes("top")&&ya<0||On.includes("bottom")&&ya>0)&&(ba.y=ya):K==="x"&&(On.includes("left")||On.includes("right"))&&(On.includes("left")&&As<0||On.includes("right")&&As>0)&&(ba.x=As),(Math.abs(ba.x)>0||Math.abs(ba.y)>0)&&Z(!0),(Fn=oe.current)==null||Fn.style.setProperty("--swipe-amount-x",`${ba.x}px`),(Pn=oe.current)==null||Pn.style.setProperty("--swipe-amount-y",`${ba.y}px`)}},He&&!h.jsx?q.createElement("button",{"aria-label":D,"data-disabled":ln,"data-close-button":!0,onClick:ln||!Oe?()=>{}:()=>{var _e;or(),(_e=h.onDismiss)==null||_e.call(h,h)},className:$n(F==null?void 0:F.closeButton,(i=h==null?void 0:h.classNames)==null?void 0:i.closeButton)},(a=U==null?void 0:U.close)!=null?a:L$):null,h.jsx||A.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:q.createElement(q.Fragment,null,ve||h.icon||h.promise?q.createElement("div",{"data-icon":"",className:$n(F==null?void 0:F.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||fm():null,h.type!=="loading"?h.icon||(U==null?void 0:U[ve])||P$(ve):null):null,q.createElement("div",{"data-content":"",className:$n(F==null?void 0:F.content,(l=h==null?void 0:h.classNames)==null?void 0:l.content)},q.createElement("div",{"data-title":"",className:$n(F==null?void 0:F.title,(c=h==null?void 0:h.classNames)==null?void 0:c.title)},typeof h.title=="function"?h.title():h.title),h.description?q.createElement("div",{"data-description":"",className:$n(T,Et,F==null?void 0:F.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),A.isValidElement(h.cancel)?h.cancel:h.cancel&&Z0(h.cancel)?q.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||O,onClick:_e=>{var Ke,et;Z0(h.cancel)&&Oe&&((et=(Ke=h.cancel).onClick)==null||et.call(Ke,_e),or())},className:$n(F==null?void 0:F.cancelButton,(d=h==null?void 0:h.classNames)==null?void 0:d.cancelButton)},h.cancel.label):null,A.isValidElement(h.action)?h.action:h.action&&Z0(h.action)?q.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||I,onClick:_e=>{var Ke,et;Z0(h.action)&&((et=(Ke=h.action).onClick)==null||et.call(Ke,_e),!_e.defaultPrevented&&or())},className:$n(F==null?void 0:F.actionButton,(x=h==null?void 0:h.classNames)==null?void 0:x.actionButton)},h.action.label):null))};function j9(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function iI(e,t){let r={};return[e,t].forEach((n,i)=>{let a=i===1,o=a?"--mobile-offset":"--offset",l=a?X$:Z$;function c(u){["top","right","bottom","left"].forEach(d=>{r[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${o}-${u}`]=l:r[`${o}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):c(l)}),r}var aI=A.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:o,className:l,offset:c,mobileOffset:u,theme:d="light",richColors:x,duration:f,style:h,visibleToasts:m=Y$,toastOptions:p,dir:v=j9(),gap:y=J$,loadingIcon:b,icons:g,containerAriaLabel:w="Notifications",pauseWhenPageIsHidden:E}=e,[C,j]=q.useState([]),S=q.useMemo(()=>Array.from(new Set([n].concat(C.filter(N=>N.position).map(N=>N.position)))),[C,n]),[_,O]=q.useState([]),[I,B]=q.useState(!1),[T,k]=q.useState(!1),[$,W]=q.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
621k":"light"),z=q.useRef(null),L=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=q.useRef(null),U=q.useRef(!1),D=q.useCallback(N=>{j(K=>{var R;return(R=K.find(H=>H.id===N.id))!=null&&R.delete||Pr.dismiss(N.id),K.filter(({id:H})=>H!==N.id)})},[]);return q.useEffect(()=>Pr.subscribe(N=>{if(N.dismiss){j(K=>K.map(R=>R.id===N.id?{...R,delete:!0}:R));return}setTimeout(()=>{U_.flushSync(()=>{j(K=>{let R=K.findIndex(H=>H.id===N.id);return R!==-1?[...K.slice(0,R),{...K[R],...N},...K.slice(R+1)]:[N,...K]})})})}),[]),q.useEffect(()=>{if(d!=="system"){W(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let N=window.matchMedia("(prefers-color-scheme: dark)");try{N.addEventListener("change",({matches:K})=>{W(K?"dark":"light")})}catch{N.addListener(({matches:R})=>{try{W(R?"dark":"light")}catch(H){console.error(H)}})}},[d]),q.useEffect(()=>{C.length<=1&&B(!1)},[C]),q.useEffect(()=>{let N=K=>{var R,H;i.every(X=>K[X]||K.code===X)&&(B(!0),(R=z.current)==null||R.focus()),K.code==="Escape"&&(document.activeElement===z.current||(H=z.current)!=null&&H.contains(document.activeElement))&&B(!1)};return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[i]),q.useEffect(()=>{if(z.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,U.current=!1)}},[z.current]),q.createElement("section",{ref:t,"aria-label":`${w} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},S.map((N,K)=>{var R;let[H,X]=N.split("-");return C.length?q.createElement("ol",{key:N,dir:v==="auto"?j9():v,tabIndex:-1,ref:z,className:l,"data-sonner-toaster":!0,"data-theme":$,"data-y-position":H,"data-lifted":I&&C.length>1&&!a,"data-x-position":X,style:{"--front-toast-height":`${((R=_[0])==null?void 0:R.height)||0}px`,"--width":`${Q$}px`,"--gap":`${y}px`,...h,...iI(c,u)},onBlur:ie=>{U.current&&!ie.currentTarget.contains(ie.relatedTarget)&&(U.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||U.current||(U.current=!0,F.current=ie.relatedTarget)},onMouseEnter:()=>B(!0),onMouseMove:()=>B(!0),onMouseLeave:()=>{T||B(!1)},onDragEnd:()=>B(!1),onPointerDown:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||k(!0)},onPointerUp:()=>k(!1)},C.filter(ie=>!ie.position&&K===0||ie.position===N).map((ie,se)=>{var ne,ce;return q.createElement(nI,{key:ie.id,icons:g,index:se,toast:ie,defaultRichColors:x,duration:(ne=p==null?void 0:p.duration)!=null?ne:f,className:p==null?void 0:p.className,descriptionClassName:p==null?void 0:p.descriptionClassName,invert:r,visibleToasts:m,closeButton:(ce=p==null?void 0:p.closeButton)!=null?ce:o,interacting:T,position:N,style:p==null?void 0:p.style,unstyled:p==null?void 0:p.unstyled,classNames:p==null?void 0:p.classNames,cancelButtonStyle:p==null?void 0:p.cancelButtonStyle,actionButtonStyle:p==null?void 0:p.actionButtonStyle,removeToast:D,toasts:C.filter(ae=>ae.position==ie.position),heights:_.filter(ae=>ae.position==ie.position),setHeights:O,expandByDefault:a,gap:y,loadingIcon:b,expanded:I,pauseWhenPageIsHidden:E,swipeDirections:e.swipeDirections})})):null}))});const sI=({...e})=>{const{theme:t="system"}=F$();return s.jsx(aI,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var oI=f1[" useId ".trim().toString()]||(()=>{}),lI=0;function qm(e){const[t,r]=A.useState(oI());return ra(()=>{e||r(n=>n??String(lI++))},[e]),e||(t?`radix-${t}`:"")}const cI=["top","right","bottom","left"],ls=Math.min,Xr=Math.max,Sf=Math.round,X0=Math.floor,Ei=e=>({x:e,y:e}
vendor: 23,861 bytes, line 621
621),uI={left:"right",right:"left",bottom:"top",top:"bottom"},dI={start:"end",end:"start"};function ly(e,t,r){return Xr(e,ls(t,r))}function sa(e,t){return typeof e=="function"?e(t):e}function oa(e){return e.split("-")[0]}function Ec(e){return e.split("-")[1]}function pE(e){return e==="x"?"y":"x"}function mE(e){return e==="y"?"height":"width"}const xI=new Set(["top","bottom"]);function pi(e){return xI.has(oa(e))?"y":"x"}function gE(e){return pE(pi(e))}function fI(e,t,r){r===void 0&&(r=!1);const n=Ec(e),i=gE(e),a=mE(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Bf(o)),[o,Bf(o)]}function hI(e){const t=Bf(e);return[cy(e),t,cy(t)]}function cy(e){return e.replace(/start|end/g,t=>dI[t])}const k9=["left","right"],_9=["right","left"],pI=["top","bottom"],mI=["bottom","top"];function gI(e,t,r){switch(e){case"top":case"bottom":return r?t?_9:k9:t?k9:_9;case"left":case"right":return t?pI:mI;default:return[]}}function vI(e,t,r,n){const i=Ec(e);let a=gI(oa(e),r==="start",n);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(cy)))),a}function Bf(e){return e.replace(/left|right|bottom|top/g,t=>uI[t])}function yI(e){return{top:0,right:0,bottom:0,left:0,...e}}function M4(e){return typeof e!="number"?yI(e):{top:e,right:e,bottom:e,left:e}}function Nf(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function S9(e,t,r){let{reference:n,floating:i}=e;const a=pi(t),o=gE(t),l=mE(o),c=oa(t),u=a==="y",d=n.x+n.width/2-i.width/2,x=n.y+n.height/2-i.height/2,f=n[l]/2-i[l]/2;let h;switch(c){case"top":h={x:d,y:n.y-i.height};break;case"bottom":h={x:d,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:x};break;case"left":h={x:n.x-i.width,y:x};break;default:h={x:n.x,y:n.y}}switch(Ec(t)){case"start":h[o]-=f*(r&&u?-1:1);break;case"end":h[o]+=f*(r&&u?-1:1);break}return h}const bI=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:o}=r,l=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:x}=S9(u,n,c),f=n,h={},m=0;for(let p=0;p<l.length;p++){const{name:v,fn:y}=l[p],{x:b,y:g,data:w,reset:E}=await y({x:d,y:x,initialPlacement:n,placement:f,strategy:i,middlewareData:h,rects:u,platform:o,elements:{reference:e,floating:t}});d=b??d,x=g??x,h={...h,[v]:{...h[v],...w}},E&&m<=50&&(m++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(u=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:d,y:x}=S9(u,f,c)),p=-1)}return{x:d,y:x,placement:f,strategy:i,middlewareData:h}};async function ad(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:a,rects:o,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:x="floating",altBoundary:f=!1,padding:h=0}=sa(t,e),m=M4(h),v=l[f?x==="floating"?"reference":"floating":x],y=Nf(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(v)))==null||r?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),b=x==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,g=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),w=await(a.isElement==null?void 0:a.isElement(g))?await(a.getScale==null?void 0:a.getScale(g))||{x:1,y:1}:{x:1,y:1},E=Nf(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:g,strategy:c}):b);return{top:(y.top-E.top+m.top)/w.y,bottom:(E.bottom-y.bottom+m.bottom)/w.y,left:(y.left-E.left+m.left)/w.x,right:(E.right-y.right+m.right)/w.x}}const EI=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:a,platform:o,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=sa(e,t)||{};if(u==null)return{};const x=M4(d),f={x:r,y:n},h=gE(i),m=mE(h),p=await o.getDimensions(u),v=h==="y",y=v?"top":"left",b=v?"bottom":"right",g=v?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[h]-f[h]-a.floating[m],E=f[h]-a.reference[h],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let j=C?C[g]:0;(!j||!await(o.isElement==null?void 0:o.isElement(C)))&&(j=l.floating[g]||a.floating[m]);const S=w/2-E/2,_=j/2-p[m]/2-1,O=ls(x[y],_),I=ls(x[b],_),B=O,T=j-p[m]-I,k=j/2-p[m]/2+S,$=ly(B,k,T),W=!c.arrow&&Ec(i)!=null&&k!==$&&a.reference[m]/2-(k<B?O:I)-p[m]/2<0,z=W?k<B?k-B:k-T:0;return{[h]:f[h]+z,data:{[h]:$,centerOffset:k-$-z,...W&&{alignmentOffset:z}},reset:W}}}),wI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:a,rects:o,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:x=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...v}=sa(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const y=oa(i),b=pi(l),g=oa(l)===l,w=await(c.isRTL==null?void 0:c.isRTL(u.floating)),E=f||(g||!p?[Bf(l)]:hI(l)),C=m!=="none";!f&&C&&E.push(...vI(l,p,m,w));const j=[l,...E],S=await ad(t,v),_=[];let O=((n=a.flip)==null?void 0:n.overflows)||[];if(d&&_.push(S[y]),x){const k=fI(i,o,w);_.push(S[k[0]],S[k[1]])}if(O=[...O,{placement:i,overflows:_}],!_.every(k=>k<=0)){var I,B;const k=(((I=a.flip)==null?void 0:I.index)||0)+1,$=j[k];if($&&(!(x==="alignment"?b!==pi($):!1)||O.every(L=>L.overflows[0]>0&&pi(L.placement)===b)))return{data:{index:k,overflows:O},reset:{placement:$}};let W=(B=O.filter(z=>z.overflows[0]<=0).sort((z,L)=>z.overflows[1]-L.overflows[1])[0])==null?void 0:B.placement;if(!W)switch(h){case"bestFit":{var T;const z=(T=O.filter(L=>{if(C){const F=pi(L.placement);return F===b||F==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(F=>F>0).reduce((F,U)=>F+U,0)]).sort((L,F)=>L[1]-F[1])[0])==null?void 0:T[0];z&&(W=z);break}case"initialPlacement":W=l;break}if(i!==W)return{reset:{placement:W}}}return{}}}};function B9(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function N9(e){return cI.some(t=>e[t]>=0)}const CI=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...i}=sa(e,t);switch(n){case"referenceHidden":{const a=await ad(t,{...i,elementContext:"reference"}),o=B9(a,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:N9(o)}}}case"escaped":{const a=await ad(t,{...i,altBoundary:!0}),o=B9(a,r.floating);return{data:{escapedOffsets:o,escaped:N9(o)}}}default:return{}}}}},R4=new Set(["left","top"]);async function AI(e,t){const{placement:r,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=oa(r),l=Ec(r),c=pi(r)==="y",u=R4.has(o)?-1:1,d=a&&c?-1:1,x=sa(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:m}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return l&&typeof m=="number"&&(h=l==="end"?m*-1:m),c?{x:h*d,y:f*u}:{x:f*u,y:h*d}}const jI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:a,placement:o,middlewareData:l}=t,c=await AI(t,e);return o===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},kI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:v=>{let{x:y,y:b}=v;return{x:y,y:b}}},...c}=sa(e,t),u={x:r,y:n},d=await ad(t,c),x=pi(oa(i)),f=pE(x);let h=u[f],m=u[x];if(a){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=h+d[v],g=h-d[y];h=ly(b,h,g)}if(o){const v=x==="y"?"top":"left",y=x==="y"?"bottom":"right",b=m+d[v],g=m-d[y];m=ly(b,m,g)}const p=l.fn({...t,[f]:h,[x]:m});return{...p,data:{x:p.x-r,y:p.y-n,enabled:{[f]:a,[x]:o}}}}}},_I=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:a,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=sa(e,t),d={x:r,y:n},x=pi(i),f=pE(x);let h=d[f],m=d[x];const p=sa(l,t),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const g=f==="y"?"height":"width",w=a.reference[f]-a.floating[g]+v.mainAxis,E=a.reference[f]+a.reference[g]-v.mainAxis;h<w?h=w:h>E&&(h=E)}if(u){var y,b;const g=f==="y"?"width":"height",w=R4.has(oa(i)),E=a.reference[x]-a.floating[g]+(w&&((y=o.offset)==null?void 0:y[x])||0)+(w?0:v.crossAxis),C=a.reference[x]+a.reference[g]+(w?0:((b=o.offset)==null?void 0:b[x])||0)-(w?v.crossAxis:0);m<E?m=E:m>C&&(m=C)}return{[f]:h,[x]:m}}}},SI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:a,platform:o,elements:l}=t,{apply:c=()=>{},...u}=sa(e,t),d=await ad(t,u),x=oa(i),f=Ec(i),h=pi(i)==="y",{width:m,height:p}=a.floating;let v,y;x==="top"||x==="bottom"?(v=x,y=f===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(y=x,v=f==="end"?"top":"bottom");const b=p-d.top-d.bottom,g=m-d.left-d.right,w=ls(p-d[v],b),E=ls(m-d[y],g),C=!t.middlewareData.shift;let j=w,S=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(S=g),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(j=b),C&&!f){const O=Xr(d.left,0),I=Xr(d.right,0),B=Xr(d.top,0),T=Xr(d.bottom,0);h?S=m-2*(O!==0||I!==0?O+I:Xr(d.left,d.right)):j=p-2*(B!==0||T!==0?B+T:Xr(d.top,d.bottom))}await c({...t,availableWidth:S,availableHeight:j});const _=await o.getDimensions(l.floating);return m!==_.width||p!==_.height?{reset:{rects:!0}}:{}}}};function xp(){return typeof window<"u"}function wc(e){return L4(e)?(e.nodeName||"").toLowerCase():"#document"}function rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bi(e){var t;return(t=(L4(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function L4(e){return xp()?e instanceof Node||e instanceof rn(e).Node:!1}function ri(e){return xp()?e instanceof Element||e instanceof rn(e).Element:!1}function _i(e){return xp()?e instanceof HTMLElement||e instanceof rn(e).HTMLElement:!1}function D9(e){return!xp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rn(e).ShadowRoot}const BI=new Set(["inline","contents"]);function m0(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=ni(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!BI.has(i)}const NI=new Set(["table","td","th"]);function DI(e){return NI.has(wc(e))}const FI=[":popover-open",":modal"];function fp(e){return FI.some(t=>{try{return e.matches(t)}catch{return!1}})}const PI=["transform","translate","scale","rotate","perspective"],OI=["transform","translate","scale","rotate","perspective","filter"],TI=["paint","layout","strict","content"];function vE(e){const t=yE(),r=ri(e)?ni(e):e;return PI.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||OI.some(n=>(r.willChange||"").includes(n))||TI.some(n=>(r.contain||"").includes(n))}function $I(e){let t=cs(e);for(;_i(t)&&!Hl(t);){if(vE(t))return t;if(fp(t))return null;t=cs(t)}return null}function yE(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const II=new Set(["html","body","#document"]);function Hl(e){return II.has(wc(e))}function ni(e){return rn(e).getComputedStyle(e)}function hp(e){return ri(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function cs(e){if(wc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||D9(e)&&e.host||Bi(e);return D9(t)?t.host:t}function z4(e){const t=cs(e);return Hl(t)?e.ownerDocument?e.ownerDocument.body:e.body:_i(t)&&m0(t)?t:z4(t)}function sd(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=z4(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),o=rn(i);if(a){const l=uy(o);return t.concat(o,o.visualViewport||[],m0(i)?i:[],l&&r?sd(l):[])}return t.concat(i,sd(i,[],r))}function uy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function U4(e){const t=ni(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=_i(e),a=i?e.offsetWidth:r,o=i?e.offsetHeight:n,l=Sf(r)!==a||Sf(n)!==o;return l&&(r=a,n=o),{width:r,height:n,$:l}}function bE(e){return ri(e)?e:e.contextElement}function yl(e){const t=bE(e);if(!_i(t))return Ei(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:a}=U4(t);let o=(a?Sf(r.width):r.width)/n,l=(a?Sf(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const MI=Ei(0);function W4(e){const t=rn(e);return!yE()||!t.visualViewport?MI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function RI(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==rn(e)?!1:t}function xo(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),a=bE(e);let o=Ei(1);t&&(n?ri(n)&&(o=yl(n)):o=yl(e));const l=RI(a,r,n)?W4(a):Ei(0);let c=(i.left+l.x)/o.x,u=(i.top+l.y)/o.y,d=i.width/o.x,x=i.height/o.y;if(a){const f=rn(a),h=n&&ri(n)?rn(n):n;let m=f,p=uy(m);for(;p&&n&&h!==m;){const v=yl(p),y=p.getBoundingClientRect(),b=ni(p),g=y.left+(p.clientLeft+parseFloat(b.paddingLeft))*v.x,w=y.top+(p.clientTop+parseFloat(b.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,x*=v.y,c+=g,u+=w,m=rn(p),p=uy(m)}}return Nf({width:d,height:x,x:c,y:u})}function EE(e,t){const r=hp(e).scrollLeft;return t?t.left+r:xo(Bi(e)).left+r}function H4(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-(r?0:EE(e,n)),a=n.top+t.scrollTop;return{x:i,y:a}}function LI(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const a=i==="fixed",o=Bi(n),l=t?fp(t.floating):!1;if(n===o||l&&a)return r;let c={scrollLeft:0,scrollTop:0},u=Ei(1);const d=Ei(0),x=_i(n);if((x||!x&&!a)&&((wc(n)!=="body"||m0(o))&&(c=hp(n)),_i(n))){const h=xo(n);u=yl(n),d.x=h.x+n.clientLeft,d.y=h.y+n.clientTop}const f=o&&!x&&!a?H4(o,c,!0):Ei(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+f.x,y:r.y*u.y-c.scrollTop*u.y+d.y+f.y}}function zI(e){return Array.from(e.getClientRects())}function UI(e){const t=Bi(e),r=hp(e),n=e.ownerDocument.body,i=Xr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=Xr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+EE(e);const l=-r.scrollTop;return ni(n).direction==="rtl"&&(o+=Xr(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:o,y:l}}function WI(e,t){const r=rn(e),n=Bi(e),i=r.visualViewport;let a=n.clientWidth,o=n.clientHeight,l=0,c=0;if(i){a=i.width,o=i.height;const u=yE();(!u||u&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:l,y:c}}const HI=new Set(["absolute","fixed"]);function KI(e,t){const r=xo(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=_i(e)?yl(e):Ei(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,c=i*a.x,u=n*a.y;return{width:o,height:l,x:c,y:u}}function F9(e,t,r){let n;if(t==="viewport")n=WI(e,r);else if(t==="document")n=UI(Bi(e));else if(ri(t))n=KI(t,r);else{const i=W4(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Nf(n)}function K4(e,t){const r=cs(e);return r===t||!ri(r)||Hl(r)?!1:ni(r).position==="fixed"||K4(r,t)}function VI(e,t){const r=t.get(e);if(r)return r;let n=sd(e,[],!1).filter(l=>ri(l)&&wc(l)!=="body"),i=null;const a=ni(e).position==="fixed";let o=a?cs(e):e;for(;ri(o)&&!Hl(o);){const l=ni(o),c=vE(o);!c&&l.position==="fixed"&&(i=null),(a?!c&&!i:!c&&l.position==="static"&&!!i&&HI.has(i.position)||m0(o)&&!c&&K4(e,o))?n=n.filter(d=>d!==o):i=l,o=cs(o)}return t.set(e,n),n}function GI(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=[...r==="clippingAncestors"?fp(t)?[]:VI(t,this._c):[].concat(r),n],l=o[0],c=o.reduce((u,d)=>{const x=F9(t,d,i);return u.top=Xr(x.top,u.top),u.right=ls(x.right,u.right),u.bottom=ls(x.bottom,u.bottom),u.left=Xr(x.left,u.left),u},F9(t,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function qI(e){const{width:t,height:r}=U4(e);return{width:t,height:r}}function YI(e,t,r){const n=_i(t),i=Bi(t),a=r==="fixed",o=xo(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=Ei(0);function u(){c.x=EE(i)}if(n||!n&&!a)if((wc(t)!=="body"||m0(i))&&(l=hp(t)),n){const h=xo(t,!0,a,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else i&&u();a&&!n&&i&&u();const d=i&&!n&&!a?H4(i,l):Ei(0),x=o.left+l.scrollLeft-c.x-d.x,f=o.top+l.scrollTop-c.y-d.y;return{x,y:f,width:o.width,height:o.height}}function Ym(e){return ni(e).position==="static"}function P9(e,t){if(!_i(e)||ni(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Bi(e)===r&&(r=r.ownerDocument.body),r}function V4(e,t){const r=rn(e);if(fp(e))return r;if(!_i(e)){let i=cs(e);for(;i&&!Hl(i);){if(ri(i)&&!Ym(i))return i;i=cs(i)}return r}let n=P9(e,t);for(;n&&DI(n)&&Ym(n);)n=P9(n,t);return n&&Hl(n)&&Ym(n)&&!vE(n)?r:n||$I(e)||r}const ZI=async function(e){const t=this.getOffsetParent||V4,r=this.getDimensions,n=await r(e.floating);return{reference:YI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function XI(e){return ni(e).direction==="rtl"}const QI={convertOffsetParentRelativeRectToViewportRelativeRect:LI,getDocumentElement:Bi,getClippingRect:GI,getOffsetParent:V4,getElementRects:ZI,getClientRects:zI,getDimensions:qI,getScale:yl,isElement:ri,isRTL:XI};function G4(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function JI(e,t){let r=null,n;const i=Bi(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:d,top:x,width:f,height:h}=u;if(l||t(),!f||!h)return;const m=X0(x),p=X0(i.clientWidth-(d+f)),v=X0(i.clientHeight-(x+h)),y=X0(d),g={rootMargin:-m+"px "+-p+"px "+-v+"px "+-y+"px",threshold:Xr(0,ls(1,c))||1};let w=!0;function E(C){const j=C[0].intersectionRatio;if(j!==c){if(!w)return o();j?o(!1,j):n=setTimeout(()=>{o(!1,1e-7)},1e3)}j===1&&!G4(u,e.getBoundingClientRect())&&o(),w=!1}try{r=new IntersectionObserver(E,{...g,root:i.ownerDocument})}catch{r=new IntersectionObserver(E,g)}r.observe(e)}return o(!0),a}function eM(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=bE(e),d=i||a?[...u?sd(u):[],...sd(t)]:[];d.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const x=u&&l?JI(u,r):null;let f=-1,h=null;o&&(h=new ResizeObserver(y=>{let[b]=y;b&&b.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),r()}),u&&!c&&h.observe(u),h.observe(t));let m,p=c?xo(e):null;c&&v();function v(){const y=xo(e);p&&!G4(p,y)&&r(),p=y,m=requestAnimationFrame(v)}return r(),()=>{var y;d.forEach(b=>{i&&b.removeEventListener("scroll",r),a&&b.removeEventListener("resize",r)}),x==null||x(),(y=h)==null||y.disconnect(),h=null,c&&cancelAnimationFrame(m)}}const tM=jI,rM=kI,nM=wI,iM=SI,aM=CI,O9=EI,sM=_I,oM=(e,t,r)=>{const n=new Map,i={platform:QI,...r},a={...i.platform,_c:n};return bI(e,t,{...i,platform:a})};var lM=typeof document<"u",cM=function(){},qx=lM?A.useLayoutEffect:cM;function Df(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Df(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const a=i[n];if(!(a==="_owner"&&e.$$typeof)&&!Df(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function q4(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function T9(e,t){const r=q4(e);return Math.round(t*r)/r}function Zm(e){const t=A.useRef(e);return qx(()=>{t.current=e}),t}function uM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,x]=A.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=A.useState(n);Df(f,n)||h(n);const[m,p]=A.useState(null),[v,y]=A.useState(null),b=A.useCallback(L=>{L!==C.current&&(C.current=L,p(L))},[]),g=A.useCallback(L=>{L!==j.current&&(j.current=L,y(L))},[]),w=a||m,E=o||v,C=A.useRef(null),j=A.useRef(null),S=A.useRef(d),_=c!=null,O=Zm(c),I=Zm(i),B=Zm(u),T=A.useCallback(()=>{if(!C.current||!j.current)return;const L={placement:t,strategy:r,middleware:f};I.current&&(L.platform=I.current),oM(C.current,j.current,L).then(F=>{const U={...F,isPositioned:B.current!==!1};k.current&&!Df(S.current,U)&&(S.current=U,d0.flushSync(()=>{x(U)}))})},[f,t,r,I,B]);qx(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,x(L=>({...L,isPositioned:!1})))},[u]);const k=A.useRef(!1);qx(()=>(k.current=!0,()=>{k.current=!1}),[]),qx(()=>{if(w&&(C.current=w),E&&(j.current=E),w&&E){if(O.current)return O.current(w,E,T);T()}},[w,E,T,O,_]);const $=A.useMemo(()=>({reference:C,floating:j,setReference:b,setFloating:g}),[b,g]),W=A.useMemo(()=>({reference:w,floating:E}),[w,E]),z=A.useMemo(()=>{const L={position:r,left:0,top:0};if(!W.floating)return L;const F=T9(W.floating,d.x),U=T9(W.floating,d.y);return l?{...L,transform:"translate("+F+"px, "+U+"px)",...q4(W.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:F,top:U}},[r,l,W.floating,d.x,d.y]);return A.useMemo(()=>({...d,update:T,refs:$,elements:W,floatingStyles:z}),[d,T,$,W,z])}const dM=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?O9({element:n.current,padding:i}).fn(r):{}:n?O9({element:n,padding:i}).fn(r):{}}}},xM=(e,t)=>({...tM(e),options:[e,t]}),fM=(e,t)=>({...rM(e),options:[e,t]}),hM=(e,t)=>({...sM(e),options:[e,t]}),pM=(e,t)=>({...nM(e),options:[e,t]}),mM=(e,t)=>({...iM(e),options:[e,t]}),gM=(e,t)=>({...aM(e),options:[e,t]}),vM=(e,t)=>({...dM(e),options:[e,t]});var yM="Arrow",Y4=A.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...a}=e;return s.jsx(It.svg,{...a,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});Y4.displayName=yM;var bM=Y4;function EM(e){const[t,r]=A.useState(void 0);return ra(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,l;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,l=u.blockSize}else o=e.offsetWidth,l=e.offsetHeight;r({width:o,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Z4="Popper",[X4,Q4]=x0(Z4),[I9e,J4]=X4(Z4),e3="PopperAnchor",t3=A.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,a=J4(e3,r),o=A.useRef(null),l=kr(t,o);return A.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:s.jsx(It.div,{...i,ref:l})});t3.displayName=e3;var wE="PopperContent",[wM,CM]=X4(wE),r3=A.forwardRef((e,t)=>{var ie,se,ne,ce,ae,Q;const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:x="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:m,...p}=e,v=J4(wE,r),[y,b]=A.useState(null),g=kr(t,he=>b(he)),[w,E]=A.useState(null),C=EM(w),j=(C==null?void 0:C.width)??0,S=(C==null?void 0:C.height)??0,_=n+(a!=="center"?"-"+a:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},I=Array.isArray(u)?u:[u],B=I.length>
vendor: 9,099 bytes, line 621
6210,T={padding:O,boundary:I.filter(jM),altBoundary:B},{refs:k,floatingStyles:$,placement:W,isPositioned:z,middlewareData:L}=uM({strategy:"fixed",placement:_,whileElementsMounted:(...he)=>eM(...he,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[xM({mainAxis:i+S,alignmentAxis:o}),c&&fM({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?hM():void 0,...T}),c&&pM({...T}),mM({...T,apply:({elements:he,rects:P,availableWidth:G,availableHeight:Z})=>{const{width:V,height:M}=P.reference,Y=he.floating.style;Y.setProperty("--radix-popper-available-width",`${G}px`),Y.setProperty("--radix-popper-available-height",`${Z}px`),Y.setProperty("--radix-popper-anchor-width",`${V}px`),Y.setProperty("--radix-popper-anchor-height",`${M}px`)}}),w&&vM({element:w,padding:l}),kM({arrowWidth:j,arrowHeight:S}),f&&gM({strategy:"referenceHidden",...T})]}),[F,U]=a3(W),D=Ai(m);ra(()=>{z&&(D==null||D())},[z,D]);const N=(ie=L.arrow)==null?void 0:ie.x,K=(se=L.arrow)==null?void 0:se.y,R=((ne=L.arrow)==null?void 0:ne.centerOffset)!==0,[H,X]=A.useState();return ra(()=>{y&&X(window.getComputedStyle(y).zIndex)},[y]),s.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:z?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[(ce=L.transformOrigin)==null?void 0:ce.x,(ae=L.transformOrigin)==null?void 0:ae.y].join(" "),...((Q=L.hide)==null?void 0:Q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(wM,{scope:r,placedSide:F,onArrowChange:E,arrowX:N,arrowY:K,shouldHideArrow:R,children:s.jsx(It.div,{"data-side":F,"data-align":U,...p,ref:g,style:{...p.style,animation:z?void 0:"none"}})})})});r3.displayName=wE;var n3="PopperArrow",AM={top:"bottom",right:"left",bottom:"top",left:"right"},i3=A.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,a=CM(n3,n),o=AM[a.placedSide];return s.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:s.jsx(bM,{...i,ref:r,style:{...i.style,display:"block"}})})});i3.displayName=n3;function jM(e){return e!==null}var kM=e=>({name:"transformOrigin",options:e,fn(t){var v,y,b;const{placement:r,rects:n,middlewareData:i}=t,o=((v=i.arrow)==null?void 0:v.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,d]=a3(r),x={start:"0%",center:"50%",end:"100%"}[d],f=(((y=i.arrow)==null?void 0:y.x)??0)+l/2,h=(((b=i.arrow)==null?void 0:b.y)??0)+c/2;let m="",p="";return u==="bottom"?(m=o?x:`${f}px`,p=`${-c}px`):u==="top"?(m=o?x:`${f}px`,p=`${n.floating.height+c}px`):u==="right"?(m=`${-c}px`,p=o?x:`${h}px`):u==="left"&&(m=`${n.floating.width+c}px`,p=o?x:`${h}px`),{data:{x:m,y:p}}}});function a3(e){const[t,r="center"]=e.split("-");return[t,r]}var _M=t3,SM=r3,BM=i3,[pp,M9e]=x0("Tooltip",[Q4]),CE=Q4(),s3="TooltipProvider",NM=700,$9="tooltip.open",[DM,o3]=pp(s3),l3=e=>{const{__scopeTooltip:t,delayDuration:r=NM,skipDelayDuration:n=300,disableHoverableContent:i=!1,children:a}=e,o=A.useRef(!0),l=A.useRef(!1),c=A.useRef(0);return A.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),s.jsx(DM,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:A.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:A.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:A.useCallback(u=>{l.current=u},[]),disableHoverableContent:i,children:a})};l3.displayName=s3;var c3="Tooltip",[R9e,mp]=pp(c3),dy="TooltipTrigger",FM=A.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,i=mp(dy,r),a=o3(dy,r),o=CE(r),l=A.useRef(null),c=kr(t,l,i.onTriggerChange),u=A.useRef(!1),d=A.useRef(!1),x=A.useCallback(()=>u.current=!1,[]);return A.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),s.jsx(_M,{asChild:!0,...o,children:s.jsx(It.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...n,ref:c,onPointerMove:ft(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:ft(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:ft(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:ft(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:ft(e.onBlur,i.onClose),onClick:ft(e.onClick,i.onClose)})})});FM.displayName=dy;var PM="TooltipPortal",[L9e,OM]=pp(PM,{forceMount:void 0}),Kl="TooltipContent",u3=A.forwardRef((e,t)=>{const r=OM(Kl,e.__scopeTooltip),{forceMount:n=r.forceMount,side:i="top",...a}=e,o=mp(Kl,e.__scopeTooltip);return s.jsx(yc,{present:n||o.open,children:o.disableHoverableContent?s.jsx(d3,{side:i,...a,ref:t}):s.jsx(TM,{side:i,...a,ref:t})})}),TM=A.forwardRef((e,t)=>{const r=mp(Kl,e.__scopeTooltip),n=o3(Kl,e.__scopeTooltip),i=A.useRef(null),a=kr(t,i),[o,l]=A.useState(null),{trigger:c,onClose:u}=r,d=i.current,{onPointerInTransitChange:x}=n,f=A.useCallback(()=>{l(null),x(!1)},[x]),h=A.useCallback((m,p)=>{const v=m.currentTarget,y={x:m.clientX,y:m.clientY},b=LM(y,v.getBoundingClientRect()),g=zM(y,b),w=UM(p.getBoundingClientRect()),E=HM([...g,...w]);l(E),x(!0)},[x]);return A.useEffect(()=>()=>f(),[f]),A.useEffect(()=>{if(c&&d){const m=v=>h(v,d),p=v=>h(v,c);return c.addEventListener("pointerleave",m),d.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",m),d.removeEventListener("pointerleave",p)}}},[c,d,h,f]),A.useEffect(()=>{if(o){const m=p=>{const v=p.target,y={x:p.clientX,y:p.clientY},b=(c==null?void 0:c.contains(v))||(d==null?void 0:d.contains(v)),g=!WM(y,o);b?f():g&&(f(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,d,o,u,f]),s.jsx(d3,{...e,ref:a})}),[$M,IM]=pp(c3,{isInside:!1}),MM=EO("TooltipContent"),d3=A.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...l}=e,c=mp(Kl,r),u=CE(r),{onClose:d}=c;return A.useEffect(()=>(document.addEventListener($9,d),()=>document.removeEventListener($9,d)),[d]),A.useEffect(()=>{if(c.trigger){const x=f=>{const h=f.target;h!=null&&h.contains(c.trigger)&&d()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[c.trigger,d]),s.jsx(sp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:x=>x.preventDefault(),onDismiss:d,children:s.jsxs(SM,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(MM,{children:n}),s.jsx($M,{scope:r,isInside:!0,children:s.jsx(KO,{id:c.contentId,role:"tooltip",children:i||n})})]})})});u3.displayName=Kl;var x3="TooltipArrow",RM=A.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,i=CE(r);return IM(x3,r).isInside?null:s.jsx(BM,{...i,...n,ref:t})});RM.displayName=x3;function LM(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,i,a)){case a:return"left";case i:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function zM(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function UM(e){const{top:t,right:r,bottom:n,left:i}=e;return[{x:i,y:t},{x:r,y:t},{x:r,y:n},{x:i,y:n}]}function WM(e,t){const{x:r,y:n}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const l=t[a],c=t[o],u=l.x,d=l.y,x=c.x,f=c.y;d>n!=f>n&&r<(x-u)*(n-d)/(f-d)+u&&(i=!i)}return i}function HM(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),KM(t)}function KM(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const i=e[n];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const i=e[n];for(;r.length>=2;){const a=r[r.length-1],o=r[r.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))r.pop();else break}r.push(i)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var VM=l3,f3=u3;const GM=VM,qM=A.forwardRef(({className:e,sideOffset:t=4,...r},n)=>
vendor: 8,864 bytes, line 621
621s.jsx(f3,{ref:n,sideOffset:t,className:Wr("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));qM.displayName=f3.displayName;var gp=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},vp=typeof window>"u"||"Deno"in globalThis;function Ln(){}function YM(e,t){return typeof e=="function"?e(t):e}function ZM(e){return typeof e=="number"&&e>=0&&e!==1/0}function XM(e,t){return Math.max(e+(t||0)-Date.now(),0)}function xy(e,t){return typeof e=="function"?e(t):e}function QM(e,t){return typeof e=="function"?e(t):e}function I9(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:l}=e;if(o){if(n){if(t.queryHash!==AE(o,t.options))return!1}else if(!ld(t.queryKey,o))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||a&&!a(t))}function M9(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(od(t.options.mutationKey)!==od(a))return!1}else if(!ld(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function AE(e,t){return((t==null?void 0:t.queryKeyHashFn)||od)(e)}function od(e){return JSON.stringify(e,(t,r)=>fy(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function ld(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>ld(e[r],t[r])):!1}function h3(e,t){if(e===t)return e;const r=R9(e)&&R9(t);if(r||fy(e)&&fy(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),o=a.length,l=r?[]:{},c=new Set(n);let u=0;for(let d=0;d<o;d++){const x=r?d:a[d];(!r&&c.has(x)||r)&&e[x]===void 0&&t[x]===void 0?(l[x]=void 0,u++):(l[x]=h3(e[x],t[x]),l[x]===e[x]&&e[x]!==void 0&&u++)}return i===o&&u===i?e:l}return t}function R9(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function fy(e){if(!L9(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!L9(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function L9(e){return Object.prototype.toString.call(e)==="[object Object]"}function JM(e){return new Promise(t=>{setTimeout(t,e)})}function eR(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?h3(e,t):t}function tR(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function rR(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var jE=Symbol();function p3(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===jE?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ys,Ta,kl,wj,nR=(wj=class extends gp{constructor(){super();Ue(this,Ys);Ue(this,Ta);Ue(this,kl);Ne(this,kl,t=>{if(!vp&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){ue(this,Ta)||this.setEventListener(ue(this,kl))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,Ta))==null||t.call(this),Ne(this,Ta,void 0))}setEventListener(t){var r;Ne(this,kl,t),(r=ue(this,Ta))==null||r.call(this),Ne(this,Ta,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){ue(this,Ys)!==t&&(Ne(this,Ys,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof ue(this,Ys)=="boolean"?ue(this,Ys):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ys=new WeakMap,Ta=new WeakMap,kl=new WeakMap,wj),m3=new nR,_l,$a,Sl,Cj,iR=(Cj=class extends gp{constructor(){super();Ue(this,_l,!0);Ue(this,$a);Ue(this,Sl);Ne(this,Sl,t=>{if(!vp&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){ue(this,$a)||this.setEventListener(ue(this,Sl))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,$a))==null||t.call(this),Ne(this,$a,void 0))}setEventListener(t){var r;Ne(this,Sl,t),(r=ue(this,$a))==null||r.call(this),Ne(this,$a,t(this.setOnline.bind(this)))}setOnline(t){ue(this,_l)!==t&&(Ne(this,_l,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return ue(this,_l)}},_l=new WeakMap,$a=new WeakMap,Sl=new WeakMap,Cj),Ff=new iR;function aR(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}function sR(e){return Math.min(1e3*2**e,3e4)}function g3(e){return(e??"online")==="online"?Ff.isOnline():!0}var v3=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Xm(e){return e instanceof v3}function y3(e){let t=!1,r=0,n=!1,i;const a=aR(),o=p=>{var v;n||(f(new v3(p)),(v=e.abort)==null||v.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>m3.isFocused()&&(e.networkMode==="always"||Ff.isOnline())&&e.canRun(),d=()=>g3(e.networkMode)&&e.canRun(),x=p=>{var v;n||(n=!0,(v=e.onSuccess)==null||v.call(e,p),i==null||i(),a.resolve(p))},f=p=>{var v;n||(n=!0,(v=e.onError)==null||v.call(e,p),i==null||i(),a.reject(p))},h=()=>new Promise(p=>{var v;i=y=>{(n||u())&&p(y)},(v=e.onPause)==null||v.call(e)}).then(()=>{var p;i=void 0,n||(p=e.onContinue)==null||p.call(e)}),m=()=>{if(n)return;let p;const v=r===0?e.initialPromise:void 0;try{p=v??e.fn()}catch(y){p=Promise.reject(y)}Promise.resolve(p).then(x).catch(y=>{var C;if(n)return;const b=e.retry??(vp?0:3),g=e.retryDelay??sR,w=typeof g=="function"?g(r,y):g,E=b===!0||typeof b=="number"&&r<b||typeof b=="function"&&b(r,y);if(t||!E){f(y);return}r++,(C=e.onFail)==null||C.call(e,r,y),JM(w).then(()=>u()?void 0:h()).then(()=>{t?f(y):m()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?m():h().then(m),a)}}var oR=e=>setTimeout(e,0);function lR(){let e=[],t=0,r=l=>{l()},n=l=>{l()},i=oR;const a=l=>{t?e.push(l):i(()=>{r(l)})},o=()=>{const l=e;e=[],l.length&&i(()=>{n(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{a(()=>{l(...c)})},schedule:a,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{i=l}}}var Cr=lR(),Zs,Aj,b3=(Aj=class{constructor(){Ue(this,Zs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ZM(this.gcTime)&&Ne(this,Zs,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vp?1/0:5*60*1e3))}clearGcTimeout(){ue(this,Zs)&&(clearTimeout(ue(this,Zs)),Ne(this,Zs,void 0))}},Zs=new WeakMap,Aj),Bl,Xs,pn,Qs,dr,i0,Js,Un,Pi,jj,cR=(jj=class extends b3{constructor(t){super();Ue(this,Un);Ue(this,Bl);Ue(this,Xs);Ue(this,pn);Ue(this,Qs);Ue(this,dr);Ue(this,i0);Ue(this,Js);Ne(this,Js,!1),Ne(this,i0,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ne(this,Qs,t.client),Ne(this,pn,ue(this,Qs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ne(this,Bl,dR(this.options)),this.state=t.state??ue(this,Bl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=ue(this,dr))==null?void 0:t.promise}setOptions(t){this.options={...ue(this,i0),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,pn).remove(this)}setData(t,r){const n=eR(this.state.data,t,this.options);return lr(this,Un,Pi).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){lr(this,Un,Pi).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=ue(this,dr))==null?void 0:n.promise;return(i=ue(this,dr))==null||i.cancel(t),r?r.then(Ln).catch(Ln):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(ue(this,Bl))}isActive(){return this.observers.some(t=>QM(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===jE||this.state.dataUpdateCount+this.state.errorUpdate
621Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>xy(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!XM(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,dr))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,dr))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),ue(this,pn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(ue(this,dr)&&(ue(this,Js)?ue(this,dr).cancel({revert:!0}):ue(this,dr).cancelRetry()),this.scheduleGc()),ue(this,pn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||lr(this,Un,Pi).call(this,{type:"invalidate"})}fetch(t,r){var u,d,x;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(ue(this,dr))return ue(this,dr).continueRetry(),ue(this,dr).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(Ne(this,Js,!0),n.signal)})},a=()=>{const f=p3(this.options,r),m=(()=>{const p={client:ue(this,Qs),queryKey:this.queryKey,meta:this.meta};return i(p),p})();return Ne(this,Js,!1),this.options.persister?this.options.persister(f,m,this):f(m)},l=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:ue(this,Qs),state:this.state,fetchFn:a};return i(f),f})();(u=this.options.behavior)==null||u.onFetch(l,this),Ne(this,Xs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&lr(this,Un,Pi).call(this,{type:"fetch",meta:(x=l.fetchOptions)==null?void 0:x.meta});const c=f=>{var h,m,p,v;Xm(f)&&f.silent||lr(this,Un,Pi).call(this,{type:"error",error:f}),Xm(f)||((m=(h=ue(this,pn).config).onError)==null||m.call(h,f,this),(v=(p=ue(this,pn).config).onSettled)==null||v.call(p,this.state.data,f,this)),this.scheduleGc()};return Ne(this,dr,y3({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var h,m,p,v;if(f===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(y){c(y);return}(m=(h=ue(this,pn).config).onSuccess)==null||m.call(h,f,this),(v=(p=ue(this,pn).config).onSettled)==null||v.call(p,f,this.state.error,this),this.scheduleGc()},onError:c,onFail:(f,h)=>{lr(this,Un,Pi).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{lr(this,Un,Pi).call(this,{type:"pause"})},onContinue:()=>{lr(this,Un,Pi).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),ue(this,dr).start()}},Bl=new WeakMap,Xs=new WeakMap,pn=new WeakMap,Qs=new WeakMap,dr=new WeakMap,i0=new WeakMap,Js=new WeakMap,Un=new WeakSet,Pi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...uR(n.data,this.options),fetchMeta:t.meta??null};case"success":return Ne(this,Xs,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Xm(i)&&i.revert&&ue(this,Xs)?{...ue(this,Xs),fetchStatus:"idle"}
vendor: 5,129 bytes, line 621
621:{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Cr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),ue(this,pn).notify({query:this,type:"updated",action:t})})},jj);function uR(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:g3(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function dR(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var ui,kj,xR=(kj=class extends gp{constructor(t={}){super();Ue(this,ui);this.config=t,Ne(this,ui,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??AE(i,r);let o=this.get(a);return o||(o=new cR({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){ue(this,ui).has(t.queryHash)||(ue(this,ui).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=ue(this,ui).get(t.queryHash);r&&(t.destroy(),r===t&&ue(this,ui).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Cr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ue(this,ui).get(t)}getAll(){return[...ue(this,ui).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>I9(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>I9(t,n)):r}notify(t){Cr.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Cr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Cr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ui=new WeakMap,kj),di,Er,eo,xi,Aa,_j,fR=(_j=class extends b3{constructor(t){super();Ue(this,xi);Ue(this,di);Ue(this,Er);Ue(this,eo);this.mutationId=t.mutationId,Ne(this,Er,t.mutationCache),Ne(this,di,[]),this.state=t.state||hR(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){ue(this,di).includes(t)||(ue(this,di).push(t),this.clearGcTimeout(),ue(this,Er).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ne(this,di,ue(this,di).filter(r=>r!==t)),this.scheduleGc(),ue(this,Er).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ue(this,di).length||(this.state.status==="pending"?this.scheduleGc():ue(this,Er).remove(this))}continue(){var t;return((t=ue(this,eo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,l,c,u,d,x,f,h,m,p,v,y,b,g,w,E,C,j,S;const r=()=>{lr(this,xi,Aa).call(this,{type:"continue"})};Ne(this,eo,y3({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(_,O)=>{lr(this,xi,Aa).call(this,{type:"failed",failureCount:_,error:O})},onPause:()=>{lr(this,xi,Aa).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,Er).canRun(this)}));const n=this.state.status==="pending",i=!ue(this,eo).canStart();try{if(n)r();else{lr(this,xi,Aa).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(a=ue(this,Er).config).onMutate)==null?void 0:o.call(a,t,this));const O=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));O!==this.state.context&&lr(this,xi,Aa).call(this,{type:"pending",context:O,variables:t,isPaused:i})}const _=await ue(this,eo).start();return await((d=(u=ue(this,Er).config).onSuccess)==null?void 0:d.call(u,_,t,this.state.context,this)),await((f=(x=this.options).onSuccess)==null?void 0:f.call(x,_,t,this.state.context)),await((m=(h=ue(this,Er).config).onSettled)==null?void 0:m.call(h,_,null,this.state.variables,this.state.context,this)),await((v=(p=this.options).onSettled)==null?void 0:v.call(p,_,null,t,this.state.context)),lr(this,xi,Aa).call(this,{type:"success",data:_}),_}catch(_){try{throw await((b=(y=ue(this,Er).config).onError)==null?void 0:b.call(y,_,t,this.state.context,this)),await((w=(g=this.options).onError)==null?void 0:w.call(g,_,t,this.state.context)),await((C=(E=ue(this,Er).config).onSettled)==null?void 0:C.call(E,void 0,_,this.state.variables,this.state.context,this)),await((S=(j=this.options).onSettled)==null?void 0:S.call(j,void 0,_,t,this.state.context)),_}finally{lr(this,xi,Aa).call(this,{type:"error",error:_})}}finally{ue(this,Er).runNext(this)}}},di=new WeakMap,Er=new WeakMap,eo=new WeakMap,xi=new WeakSet,Aa=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};
621case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Cr.batch(()=>{ue(this,di).forEach(n=>{n.onMutationUpdate(t)}),ue(this,Er).notify({mutation:this,type:"updated",action:t})})},_j);function hR(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mi,Wn,a0,Sj,pR=(Sj=class extends gp{constructor(t={}){super();Ue(this,Mi);Ue(this,Wn);Ue(this,a0);this.config=t,Ne(this,Mi,new Set),Ne(this,Wn,new Map),Ne(this,a0,0)}build(t,r,n){const i=new fR({mutationCache:this,mutationId:++N0(this,a0)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){ue(this,Mi).add(t);const r=Q0(t);if(typeof r=="string"){const n=ue(this,Wn).get(r);n?n.push(t):ue(this,Wn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(ue(this,Mi).delete(t)){const r=Q0(t);if(typeof r=="string"){const n=ue(this,Wn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&ue(this,Wn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Q0(t);if(typeof r=="string"){const n=ue(this,Wn).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Q0(t);if(typeof r=="string"){const i=(n=ue(this,Wn).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Cr.batch(()=>{ue(this,Mi).forEach(t=>{this.notify({type:"removed",mutation:t})}),ue(this,Mi).clear(),ue(this,Wn).clear()})}getAll(){return Array.from(ue(this,Mi))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>M9(r,n))}findAll(t={}){return this.getAll().filter(r=>M9(t,r))}notify(t){Cr.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 6,930 bytes, lines 621-630
621r.state.isPaused);return Cr.batch(()=>Promise.all(t.map(r=>r.continue().catch(Ln))))}},Mi=new WeakMap,Wn=new WeakMap,a0=new WeakMap,Sj);function Q0(e){var t;return(t=e.options.scope)==null?void 0:t.id}function z9(e){return{onFetch:(t,r)=>{var d,x,f,h,m;const n=t.options,i=(f=(x=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:x.fetchMore)==null?void 0:f.direction,a=((h=t.state.data)==null?void 0:h.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let p=!1;const v=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},y=p3(t.options,t.fetchOptions),b=async(g,w,E)=>{if(p)return Promise.reject();if(w==null&&g.pages.length)return Promise.resolve(g);const j=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:w,direction:E?"backward":"forward",meta:t.options.meta};return v(I),I})(),S=await y(j),{maxPages:_}=t.options,O=E?rR:tR;return{pages:O(g.pages,S,_),pageParams:O(g.pageParams,w,_)}};if(i&&a.length){const g=i==="backward",w=g?mR:U9,E={pages:a,pageParams:o},C=w(n,E);l=await b(E,C,g)}else{const g=e??a.length;do{const w=c===0?o[0]??n.initialPageParam:U9(n,l);if(c>0&&w==null)break;l=await b(l,w),c++}while(c<g)}return l};t.options.persister?t.fetchFn=()=>{var p,v;return(v=(p=t.options).persister)==null?void 0:v.call(p,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function U9(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function mR(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Ct,Ia,Ma,Nl,Dl,Ra,Fl,Pl,Bj,gR=(Bj=class{constructor(e={}){Ue(this,Ct);Ue(this,Ia);Ue(this,Ma);Ue(this,Nl);Ue(this,Dl);Ue(this,Ra);Ue(this,Fl);Ue(this,Pl);Ne(this,Ct,e.queryCache||new xR),Ne(this,Ia,e.mutationCache||new pR),Ne(this,Ma,e.defaultOptions||{}),Ne(this,Nl,new Map),Ne(this,Dl,new Map),Ne(this,Ra,0)}mount(){N0(this,Ra)._++,ue(this,Ra)===1&&(Ne(this,Fl,m3.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Ct).onFocus())})),Ne(this,Pl,Ff.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Ct).onOnline())})))}unmount(){var e,t;N0(this,Ra)._--,ue(this,Ra)===0&&((e=ue(this,Fl))==null||e.call(this),Ne(this,Fl,void 0),(t=ue(this,Pl))==null||t.call(this),Ne(this,Pl,void 0))}isFetching(e){return ue(this,Ct).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,Ia).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=ue(this,Ct).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=ue(this,Ct).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(xy(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return ue(this,Ct).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=ue(this,Ct).get(n.queryHash),a=i==null?void 0:i.state.data,o=YM(t,a);if(o!==void 0)return ue(this,Ct).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Cr.batch(()=>ue(this,Ct).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=ue(this,Ct).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=ue(this,Ct);Cr.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=ue(this,Ct);return Cr.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Cr.batch(()=>ue(this,Ct).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Ln).catch(Ln)}invalidateQueries(e,t={}){return Cr.batch(()=>(ue(this,Ct).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Cr.batch(()=>ue(this,Ct).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(Ln)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Ln)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=ue(this,Ct).build(this,t);return r.isStaleByTime(xy(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ln).catch(Ln)}fetchInfiniteQuery(e){return e.behavior=z9(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ln).catch(Ln)}ensureInfiniteQueryData(e){return e.behavior=z9(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ff.isOnline()?ue(this,Ia).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Ct)}getMutationCache(){return ue(this,Ia)}getDefaultOptions(){return ue(this,Ma)}setDefaultOptions(e){Ne(this,Ma,e)}setQueryDefaults(e,t){ue(this,Nl).set(od(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ue(this,Nl).values()],r={};return t.forEach(n=>{ld(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){ue(this,Dl).set(od(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ue(this,Dl).values()],r={};return t.forEach(n=>{ld(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...ue(this,Ma).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=AE(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===jE&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,Ma).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Ct).clear(),ue(this,Ia).clear()}},Ct=new WeakMap,Ia=new WeakMap,Ma=new WeakMap,Nl=new WeakMap,Dl=new WeakMap,Ra=new WeakMap,Fl=new WeakMap,Pl=new WeakMap,Bj),vR=A.createContext(void 0),yR=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(vR.Provider,{value:e,children:t}));/** 622 * @remix-run/router v1.23.0 623 * 624 * Copyright (c) Remix Software Inc. 625 * 626 * This source code is licensed under the MIT license found in the 627 * LICENSE.md file in the root directory of this source tree. 628 * 629 * @license MIT 630 */function cd(){return cd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 5,028 bytes, line 630
630for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cd.apply(this,arguments)}var Ua;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ua||(Ua={}));const W9="popstate";function bR(e){e===void 0&&(e={});function t(n,i){let{pathname:a,search:o,hash:l}=n.location;return hy("",{pathname:a,search:o,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:Pf(i)}return wR(t,r,null,e)}function Ot(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function E3(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ER(){return Math.random().toString(36).substr(2,8)}function H9(e,t){return{usr:e.state,key:e.key,idx:t}}function hy(e,t,r,n){return r===void 0&&(r=null),cd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Cc(t):t,{state:r,key:t&&t.key||n||ER()})}function Pf(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Cc(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function wR(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,l=Ua.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(cd({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function x(){l=Ua.Pop;let v=d(),y=v==null?null:v-u;u=v,c&&c({action:l,location:p.location,delta:y})}function f(v,y){l=Ua.Push;let b=hy(p.location,v,y);u=d()+1;let g=H9(b,u),w=p.createHref(b);try{o.pushState(g,"",w)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(w)}a&&c&&c({action:l,location:p.location,delta:1})}function h(v,y){l=Ua.Replace;let b=hy(p.location,v,y);u=d();let g=H9(b,u),w=p.createHref(b);o.replaceState(g,"",w),a&&c&&c({action:l,location:p.location,delta:0})}function m(v){let y=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof v=="string"?v:Pf(v);return b=b.replace(/ $/,"%20"),Ot(y,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,y)}let p={get action(){return l},get location(){return e(i,o)},listen(v){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(W9,x),c=v,()=>{i.removeEventListener(W9,x),c=null}},createHref(v){return t(i,v)},createURL:m,encodeLocation(v){let y=m(v);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:h,go(v){return o.go(v)}};return p}var K9;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(K9||(K9={}));function CR(e,t,r){return r===void 0&&(r="/"),AR(e,t,r,!1)}function AR(e,t,r,n){let i=typeof t=="string"?Cc(t):t,a=kE(i.pathname||"/",r);if(a==null)return null;let o=w3(e);jR(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=$R(a);l=OR(o[c],u,n)}return l}function w3(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(a,o,l)=>{let c={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};c.relativePath.startsWith("/")&&(Ot(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let u=ts([n,c.relativePath]),d=r.concat(c);a.children&&a.children.length>0&&(Ot(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),w3(a.children,t,d,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:FR(u,a.index),routesMeta:d})};return e.forEach((a,o)=>{var l;if(a.path===""||!((l=a.path)!=null&&l.includes("?")))i(a,o);else for(let c of C3(a.path))i(a,o,c)}),t}function C3(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=C3(n.join("/")),l=[];return l.push(...o.map(c=>c===""?a:[a,c].join("/"))),i&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function jR(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:PR(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const kR=/^:[\w-]+$/,_R=3,SR=2,BR=1,NR=10,DR=-2,V9=e=>e==="*";function FR(e,t){let r=e.split("/"),n=r.length;return r.some(V9)&&(n+=DR),t&&(n+=SR),r.filter(i=>!V9(i)).reduce((i,a)=>i+(kR.test(a)?_R:a===""?BR:NR),n)}function PR(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function OR(e,t,r){let{routesMeta:n}=e,i={},a="/",o=[];for(let l=0;l<n.length;++l){let c=n[l],u=l===n.length-1,d=a==="/"?t:t.slice(a.length)||"/",x=G9({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),f=c.route;if(!x&&u&&r&&!n[n.length-1].route.index&&(x=G9({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!x)return null;
vendor: 9,263 bytes, lines 630-639
630Object.assign(i,x.params),o.push({params:i,pathname:ts([a,x.pathname]),pathnameBase:LR(ts([a,x.pathnameBase])),route:f}),x.pathnameBase!=="/"&&(a=ts([a,x.pathnameBase]))}return o}function G9(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=TR(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:n.reduce((u,d,x)=>{let{paramName:f,isOptional:h}=d;if(f==="*"){let p=l[x]||"";o=a.slice(0,a.length-p.length).replace(/(.)\/+$/,"$1")}const m=l[x];return h&&!m?u[f]=void 0:u[f]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function TR(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),E3(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(n.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function $R(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return E3(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function kE(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function IR(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?Cc(e):e;return{pathname:r?r.startsWith("/")?r:MR(r,t):t,search:zR(n),hash:UR(i)}}function MR(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Qm(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function RR(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function A3(e,t){let r=RR(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function j3(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=Cc(e):(i=cd({},e),Ot(!i.pathname||!i.pathname.includes("?"),Qm("?","pathname","search",i)),Ot(!i.pathname||!i.pathname.includes("#"),Qm("#","pathname","hash",i)),Ot(!i.search||!i.search.includes("#"),Qm("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,l;if(o==null)l=r;else{let x=t.length-1;if(!n&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),x-=1;i.pathname=f.join("/")}l=x>=0?t[x]:"/"}let c=IR(i,l),u=o&&o!=="/"&&o.endsWith("/"),d=(a||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const ts=e=>e.join("/").replace(/\/\/+/g,"/"),LR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),zR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,UR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function WR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const k3=["post","put","patch","delete"];new Set(k3);const HR=["get",...k3];new Set(HR);/** 631 * React Router v6.30.1 632 * 633 * Copyright (c) Remix Software Inc. 634 * 635 * This source code is licensed under the MIT license found in the 636 * LICENSE.md file in the root directory of this source tree. 637 * 638 * @license MIT 639 */function ud(){return ud=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ud.apply(this,arguments)}const _E=A.createContext(null),KR=A.createContext(null),jo=A.createContext(null),yp=A.createContext(null),hs=A.createContext({outlet:null,matches:[],isDataRoute:!1}),_3=A.createContext(null);function VR(e,t){let{relative:r}=t===void 0?{}:t;g0()||Ot(!1);let{basename:n,navigator:i}=A.useContext(jo),{hash:a,pathname:o,search:l}=B3(e,{relative:r}),c=o;return n!=="/"&&(c=o==="/"?n:ts([n,o])),i.createHref({pathname:c,search:l,hash:a})}function g0(){return A.useContext(yp)!=null}function ps(){return g0()||Ot(!1),A.useContext(yp).location}function S3(e){A.useContext(jo).static||A.useLayoutEffect(e)}function ms(){let{isDataRoute:e}=A.useContext(hs);return e?sL():GR()}function GR(){g0()||Ot(!1);let e=A.useContext(_E),{basename:t,future:r,navigator:n}=A.useContext(jo),{matches:i}=A.useContext(hs),{pathname:a}=ps(),o=JSON.stringify(A3(i,r.v7_relativeSplatPath)),l=A.useRef(!1);return S3(()=>{l.current=!0}),A.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){n.go(u);return}let x=j3(u,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(x.pathname=x.pathname==="/"?t:ts([t,x.pathname])),(d.replace?n.replace:n.push)(x,d.state,d)},[t,n,o,a,e])}function qR(){let{matches:e}=A.useContext(hs),t=e[e.length-1];return t?t.params:{}}function B3(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=A.useContext(jo),{matches:i}=A.useContext(hs),{pathname:a}=ps(),o=JSON.stringify(A3(i,n.v7_relativeSplatPath));return A.useMemo(()=>j3(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function YR(e,t){return ZR(e,t)}function ZR(e,t,r,n){g0()||Ot(!1);let{navigator:i}=A.useContext(jo),{matches:a}=A.useContext(hs),o=a[a.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=ps(),d;if(t){var x;let v=typeof t=="string"?Cc(t):t;c==="/"||(x=v.pathname)!=null&&x.startsWith(c)||Ot(!1),d=v}else d=u;let f=d.pathname||"/",h=f;if(c!=="/"){let v=c.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(v.length).join("/")}let m=CR(e,{pathname:h}),p=tL(m&&m.map(v=>Object.assign({},v,{params:Object.assign({},l,v.params),pathname:ts([c,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?c:ts([c,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),a,r,n);return t&&p?A.createElement(yp.Provider,{value:{location:ud({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Ua.Pop}},p):p}function XR(){let e=aL(),t=WR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),r?A.createElement("pre",{style:i},r):null,null)}const QR=A.createElement(XR,null);class JR extends A.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?A.createElement(hs.Provider,{value:this.props.routeContext},A.createElement(_3.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function eL(e){let{routeContext:t,match:r,children:n}=e,i=A.useContext(_E);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),A.createElement(hs.Provider,{value:t},n)}function tL(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,l=(i=r)==null?void 0:i.errors;if(l!=null){let d=o.findIndex(x=>x.route.id&&(l==null?void 0:l[x.route.id])!==void 0);d>=0||Ot(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<o.length;d++){let x=o[d];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(u=d),x.route.id){let{loaderData:f,errors:h}=r,m=x.route.loader&&f[x.route.id]===void 0&&(!h||h[x.route.id]===void 0);if(x.route.lazy||m){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,x,f)=>{let h,m=!1,p=null,v=null;r&&(h=l&&x.route.id?l[x.route.id]:void 0,p=x.route.errorElement||QR,c&&(u<0&&f===0?(m=!0,v=null):u===f&&(m=!0,v=x.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,f+1)),b=()=>{let g;return h?g=p:m?g=v:x.route.Component?g=A.createElement(x.route.Component,null):x.route.element?g=x.route.element:g=d,A.createElement(eL,{match:x,routeC
639ontext:{outlet:d,matches:y,isDataRoute:r!=null},children:g})};return r&&(x.route.ErrorBoundary||x.route.errorElement||f===0)?A.createElement(JR,{location:r.location,revalidation:r.revalidation,component:p,error:h,children:b(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):b()},null)}var N3=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(N3||{}),Of=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Of||{});function rL(e){let t=A.useContext(_E);return t||Ot(!1),t}function nL(e){let t=A.useContext(KR);return t||Ot(!1),t}function iL(e){let t=A.useContext(hs);return t||Ot(!1),t}function D3(e){let t=iL(),r=t.matches[t.matches.length-1];return r.route.id||Ot(!1),r.route.id}function aL(){var e;let t=A.useContext(_3),r=nL(Of.UseRouteError),n=D3(Of.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function sL(){let{router:e}=rL(N3.UseNavigateStable),t=D3(Of.UseNavigateStable),r=A.useRef(!1);return S3(()=>{r.current=!0}),A.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,ud({fromRouteId:t},a)))},[e,t])}function oL(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Re(e){Ot(!1)}function lL(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Ua.Pop,navigator:a,static:o=!1,future:l}=e;g0()&&Ot(!1);let c=t.replace(/^\/*/,"/"),u=A.useMemo(()=>({basename:c,navigator:a,static:o,future:ud({v7_relativeSplatPath:!1},l)}),[c,l,a,o]);typeof n=="string"&&(n=Cc(n));let{pathname:d="/",search:x="",hash:f="",state:h=null,key:m="default"}=n,p=A.useMemo(()=>{let v=kE(d,c);return v==null?null:{location:{pathname:v,search:x,hash:f,state:h,key:m},navigationType:i}},[c,d,x,f,h,m,i]);return p==null?null:A.createElement(jo.Provider,{value:u},A.createElement(yp.Provider,{children:r,value:p}))}function cL(e){let{children:t,location:r}=e;return YR(py(t),r)}new Promise(()=>{});function py(e,t){t===void 0&&(t=[]);let r=[];return A.Children.forEach(e,(n,i)=>{if(!A.isValidElement(n))return;let a=[...t,i];if(n.type===A.Fragment){r.push.apply(r,py(n.props.children,a));return}n.type!==Re&&Ot(!1),!n.props.index||!n.props.children||Ot(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=py(n.props.children,a)),r.push(o)}),r}/** 640 * React Router DOM v6.30.1 641 * 642 * Copyright (c) Remix Software Inc. 643 * 644 * This source code is licensed under the MIT license found in the 645 * LICENSE.md file in the root directory of this source tree. 646 * 647 * @license MIT 648 */function my(){return my=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},my.apply(this,arguments)}function uL(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function dL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function xL(e,t){return e.button===0&&(!t||t==="_self")&&!dL(e)}function gy(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function fL(e,t){let r=gy(e);return t&&t.forEach((n,i)=>{r.has(i)||t.getAll(i).forEach(a=>{r.append(i,a)})}),r}const hL=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],pL="6";try{window.__reactRouterVersion=pL}catch{}const mL="startTransition",q9=f1[mL];function gL(e){let{basename:t,children:r,future:n,window:i}=e,a=A.useRef();a.current==null&&(a.current=bR({window:i,v5Compat:!0}));let o=a.current,[l,c]=A.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},d=A.useCallback(x=>{u&&q9?q9(()=>c(x)):c(x)},[c,u]);return A.useLayoutEffect(()=>o.listen(d),[o,d]),A.useEffect(()=>oL(n),[n]),A.createElement(lL,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:o,future:n})}const vL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,we=A.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:l,target:c,to:u,preventScrollReset:d,viewTransition:x}=t,f=uL(t,hL),{basename:h}=A.useContext(jo),m,p=!1;if(typeof u=="string"&&yL.test(u)&&(m=u,vL))try{let g=new URL(window.location.href),w=u.startsWith("//")?new URL(g.protocol+u):new URL(u),E=kE(w.pathname,h);w.origin===g.origin&&E!=null?u=E+w.search+w.hash:p=!0}catch{}let v=VR(u,{relative:i}),y=bL(u,{replace:o,state:l,target:c,preventScrollReset:d,relative:i,viewTransition:x});function b(g){n&&n(g),g.defaultPrevented||y(g)}return A.createElement("a",my({},f,{href:m||v,onClick:p||a?n:b,ref:r,target:c}))});var Y9;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Y9||(Y9={}));var Z9;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Z9||(Z9={}));function bL(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:l}=t===void 0?{}:t,c=ms(),u=ps(),d=B3(e,{relative:o});return A.useCallback(x=>{if(xL(x,r)){x.preventDefault();let f=n!==void 0?n:Pf(u)===Pf(d);c(e,{replace:f,state:i,preventScrollReset:a,relative:o,viewTransition:l})}},[u,c,d,n,i,r,e,a,o,l])}function EL(e){let t=A.useRef(gy(e)),r=A.useRef(!1),n=ps(),i=A.useMemo(()=>fL(n.search,r.current?null:t.current),[n.search]),a=ms(),o=A.useCallback((l,c)=>{const u=gy(typeof l=="function"?l(i):l);r.current=!0,a("?"+u,c)},[a,i]);return[i,o]}const Se=e=>typeof e=="string",Zc=()=>{let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r},X9=e=>e==null?"":""+e,wL=(e,t,r)=>{e.forEach(n=>{t[n]&&(r[n]=t[n])})},CL=/###/g,Q9=e=>e&&e.indexOf("###")>-1?e.replace(CL,"."):e,J9=e=>!e||Se(e),Nu=(e,t,r)=>{const n=Se(t)?t.split("."):t;let i=0;for(;i<n.length-1;){if(J9(e))return{};const a=Q9(n[i]);!e[a]&&r&&(e[a]=new r),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++i}return J9(e)?{}:{obj:e,k:Q9(n[i])}},e8=(e,t,r)=>{const{obj:n,k:i}=Nu(e,t,Object);if(n!==void 0||t.length===1){n[i]=r;return}let a=t[t.length-1],o=t.slice(0,t.length-1),l=Nu(e,o,Object);for(;l.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),l=Nu(e,o,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${a}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${a}`]=r},AL=(e,t,r,n)=>{const{obj:i,k:a}=Nu(e,t,Object);i[a]=i[a]||[],i[a].push(r)},Tf=(e,t)=>{const{obj:r,k:n}=Nu(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},jL=(e,t,r)=>{const n=Tf(e,r);return n!==void 0?n:Tf(t,r)},F3=(e,t,r)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?Se(e[n])||e[n]instanceof String||Se(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):F3(e[n],t[n],r):e[n]=t[n]);return e},js=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var kL={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const _L=e=>Se(e)?e.replace(/[&<>
648"'\/]/g,t=>kL[t]):e;class SL{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const BL=[" ",",","?","!",";"],NL=new SL(20),DL=(e,t,r)=>{t=t||"",r=r||"";const n=BL.filter(o=>t.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=NL.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(e);if(!a){const o=e.indexOf(r);o>0&&!i.test(e.substring(0,o))&&(a=!0)}return a},vy=(e,t,r=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const n=t.split(r);let i=e;for(let a=0;a<n.length;){if(!i||typeof i!="object")return;let o,l="";for(let c=a;c<n.length;++c)if(c!==a&&(l+=r),l+=n[c],o=i[l],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&c<n.length-1)continue;a+=c-a+1;break}i=o}return i},dd=e=>e==null?void 0:e.replace("_","-"),FL={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var r,n;(n=(r=console==null?void 0:console[e])==null?void 0:r.apply)==null||n.call(r,console,t)}};class $f{constructor(t,r={}){this.init(t,r)}init(t,r={}){this.prefix=r.prefix||"i18next:",this.logger=t||FL,this.options=r,this.debug=r.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,n,i){return i&&!this.debug?null:(Se(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new $f(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new $f(this.logger,t)}}var mi=new $f;let bp=class{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t,...r){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,a])=>{for(let o=0;o<a;o++)i(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,a])=>{for(let o=0;o<a;o++)i.apply(i,[t,...r])})}};class t8 extends bp{constructor(t,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n,i={}){var u,d;const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,r],n&&(Array.isArray(n)?l.push(...n):Se(n)&&a?l.push(...n.split(a)):l.push(n)));const c=Tf(this.data,l);return!c&&!r&&!n&&t.indexOf(".")>-1&&(t=l[0],r=l[1],n=l.slice(2).join(".")),c||!o||!Se(n)?c:vy((d=(u=this.data)==null?void 0:u[t])==null?void 0:d[r],n,a)}addResource(t,r,n,i,a={silent:!1}){const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[t,r];n&&(l=l.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(l=t.split("."),i=r,r=l[1]),this.addNamespaces(r),e8(this.data,l,i),a.silent||this.emit("added",t,r,n,i)}addResources(t,r,n,i={silent:!1}){for(const a in n)(Se(n[a])||Array.isArray(n[a]))&&this.addResource(t,r,a,n[a],{silent:!0});i.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,i,a,o={silent:!1,skipCopy:!1}){let l=[t,r];t.indexOf(".")>-1&&(l=t.split("."),i=n,n=r,r=l[1]),this.addNamespaces(r);let c=Tf(this.data,l)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?F3(c,n,a):c={...c,...n}
vendor: 1,272 bytes, line 648
648,e8(this.data,l,c),o.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var P3={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,i){return e.forEach(a=>{var o;t=((o=this.processors[a])==null?void 0:o.process(t,r,n,i))??t}),t}};const O3=Symbol("i18next/PATH_KEY");function PL(){const e=[],t=Object.create(null);let r;return t.get=(n,i)=>{var a;return(a=r==null?void 0:r.revoke)==null||a.call(r),i===O3?e:(e.push(i),r=Proxy.revocable(n,t),r.proxy)},Proxy.revocable(Object.create(null),t).proxy}function yy(e,t){const{[O3]:r}=e(PL());return r.join((t==null?void 0:t.keySeparator)??".")}const r8={},Jm=e=>!Se(e)&&typeof e!="boolean"&&typeof e!="number";class If extends bp{constructor(t,r={}){super(),wL(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
648i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=mi.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,r={interpolation:{}}){const n={...r};if(t==null)return!1;const i=this.resolve(t,n);if((i==null?void 0:i.res)===void 0)return!1;const a=Jm(i.res);return!(n.returnObjects===!1&&a)}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,l=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!DL(t,n,i);if(o&&!l){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:Se(a)?[a]:a};const u=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),t=u.join(i)}return{key:t,namespaces:Se(a)?[a]:a}}translate(t,r,n){let i=typeof r=="object"?{...r}:r;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),t==null)return"";typeof t=="function"&&(t=yy(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]);const a=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:l,namespaces:c}=this.extractFromKey(t[t.length-1],i),u=c[c.length-1];let d=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const x=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((x==null?void 0:x.toLowerCase())==="cimode")return f?a?{res:`${u}${d}${l}`,usedKey:l,exactUsedKey:l,usedLng:x,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${d}${l}`:a?{res:l,usedKey:l,exactUsedKey:l,usedLng:x,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:l;const h=this.resolve(t,i);let m=h==null?void 0:h.res;const p=(h==null?void 0:h.usedKey)||l,v=(h==null?void 0:h.exactUsedKey)||l,y=["[object Number]","[object Function]","[object RegExp]"],b=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,w=i.count!==void 0&&!Se(i.count),E=If.hasDefaultValue(i),C=w?this.pluralResolver.getSuffix(x,i.count,i):"",j=i.ordinal&&w?this.pluralResolver.getSuffix(x,i.count,{ordinal:!1}):"",S=w&&!i.ordinal&&i.count===0,_=S&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${C}`]||i[`defaultValue${j}`]||i.defaultValue;let O=m;g&&!m&&E&&(O=_);const I=Jm(O),B=Object.prototype.toString.apply(O);
vendor: 18,031 bytes, line 648
648if(g&&O&&I&&y.indexOf(B)<0&&!(Se(b)&&Array.isArray(O))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const T=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,O,{...i,ns:c}):`key '${l} (${this.language})' returned an object instead of string.`;return a?(h.res=T,h.usedParams=this.getUsedParamsDetails(i),h):T}if(o){const T=Array.isArray(O),k=T?[]:{},$=T?v:p;for(const W in O)if(Object.prototype.hasOwnProperty.call(O,W)){const z=`${$}${o}${W}`;E&&!m?k[W]=this.translate(z,{...i,defaultValue:Jm(_)?_[W]:void 0,joinArrays:!1,ns:c}):k[W]=this.translate(z,{...i,joinArrays:!1,ns:c}),k[W]===z&&(k[W]=O[W])}m=k}}else if(g&&Se(b)&&Array.isArray(m))m=m.join(b),m&&(m=this.extendTranslation(m,t,i,n));else{let T=!1,k=!1;!this.isValidLookup(m)&&E&&(T=!0,m=_),this.isValidLookup(m)||(k=!0,m=l);const W=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&k?void 0:m,z=E&&_!==m&&this.options.updateMissing;if(k||T||z){if(this.logger.log(z?"updateKey":"missingKey",x,u,l,z?_:m),o){const D=this.resolve(l,{...i,keySeparator:!1});D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let L=[];const F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&F&&F[0])for(let D=0;D<F.length;D++)L.push(F[D]);else this.options.saveMissingTo==="all"?L=this.languageUtils.toResolveHierarchy(i.lng||this.language):L.push(i.lng||this.language);const U=(D,N,K)=>{var H;const R=E&&K!==m?K:W;this.options.missingKeyHandler?this.options.missingKeyHandler(D,u,N,R,z,i):(H=this.backendConnector)!=null&&H.saveMissing&&this.backendConnector.saveMissing(D,u,N,R,z,i),this.emit("missingKey",D,u,N,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?L.forEach(D=>{const N=this.pluralResolver.getSuffixes(D,i);S&&i[`defaultValue${this.options.pluralSeparator}zero`]&&N.indexOf(`${this.options.pluralSeparator}zero`)<0&&N.push(`${this.options.pluralSeparator}zero`),N.forEach(K=>{U([D],l+K,i[`defaultValue${K}`]||_)})}):U(L,l,_))}m=this.extendTranslation(m,t,i,h,n),k&&m===l&&this.options.appendNamespaceToMissingKey&&(m=`${u}${d}${l}`),(k||T)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${l}`:l,T?m:void 0,i))}return a?(h.res=m,h.usedParams=this.getUsedParamsDetails(i),h):m}extendTranslation(t,r,n,i,a){var c,u;if((c=this.i18nFormat)!=null&&c.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const d=Se(t)&&(((u=n==null?void 0:n.interpolation)==null?void 0:u.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let x;if(d){const h=t.match(this.interpolator.nestingRegexp);x=h&&h.length}let f=n.replace&&!Se(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,n.lng||this.language||i.usedLng,n),d){const h=t.match(this.interpolator.nestingRegexp),m=h&&h.length;x<m&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,(...h)=>(a==null?void 0:a[0])===h[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${r[0]}`),null):this.translate(...h,r),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,l=Se(o)?[o]:o;return t!=null&&(l!=null&&l.length)&&n.applyPostProcessor!==!1&&(t=P3.handle(l,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t,r={}){let n,i,a,o,l;return Se(t)&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(c,r),d=u.key;i=d;let x=u.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const f=r.count!==void 0&&!Se(r.count),h=f&&!r.ordinal&&r.count===0,m=r.context!==void 0&&(Se(r.context)||typeof r.context=="number")&&r.context!=="",p=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);x.forEach(v=>{var y,b;this.isValidLookup(n)||(l=v,!r8[`${p[0]}-${v}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((b=this.utils)!=null&&b.hasLoadedNamespace(l))&&(r8[`${p[0]}-${v}`]=!0,this.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(g=>{var C;if(this.isValidLookup(n))return;o=g;const w=[d];if((C=this.i18nFormat)!=null&&C.addLookupKeys)this.i18nFormat.addLookupKeys(w,d,g,v,r);else{let j;f&&(j=this.pluralResolver.getSuffix(g,r.count,r));const S=`${this.options.pluralSeparator}zero`,_=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(r.ordinal&&j.indexOf(_)===0&&w.push(d+j.replace(_,this.options.pluralSeparator)),w.push(d+j),h&&w.push(d+S)),m){const O=`${d}${this.options.contextSeparator||"_"}${r.context}`;w.push(O),f&&(r.ordinal&&j.indexOf(_)===0&&w.push(O+j.replace(_,this.options.pluralSeparator)),w.push(O+j),h&&w.push(O+S))}}let E;for(;E=w.pop();)this.isValidLookup(n)||(a=E,n=this.getResource(g,v,E,r))}))})}),{res:n,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n,i={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(t,r,n,i):this.resourceStore.getResource(t,r,n,i)}getUsedParamsDetails(t={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!Se(t.replace);let i=n?t.replace:t;if(n&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const a of r)delete i[a]}return i}static hasDefaultValue(t){const r="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}class n8{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=mi.create("languageUtils")}getScriptPartFromCode(t){if(t=dd(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=dd(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(Se(t)&&t.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(t)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;const i=this.getScriptPartFromCode(n);if(this.isSupportedCode(i))return r=i;const a=this.getLanguagePartFromCode(n);if(this.isSupportedCode(a))return r=a;r=this.options.supportedLngs.find(o=>{if(o===a)return o;if(!(o.indexOf("-")<0&&a.indexOf("-")<0)&&(o.indexOf("-")>0&&a.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===a||o.indexOf(a)===0&&a.length>1))return o})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),Se(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],t),i=[],a=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return Se(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):Se(t)&&a(this.formatLanguageCode(t)),n.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}const i8={zero:0,one:1,two:2,few:3,many:4,other:5},a8={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class OL{constructor(t,r={}){this.languageUtils=t,this.options=r,this.logger=mi.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,r={}){const n=dd(t==="dev"?"en":t),i=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let o;try{o=new Intl.PluralRules(n,{type:i})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),a8;if(!t.match(/-|_/))return a8;const c=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(c,r)}return this.pluralRulesCache[a]=o,o}needsPlural(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,r,n={}){return this.getSuffixes(t,n).map(i=>`${r}${i}`)}getSuffixes(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),n?n.resolvedOptions().pluralCategories.sort((i,a)=>i8[i]-i8[a]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,r,n={}){const i=this.getRule(t,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",r,n))}}const s8=(e,t,r,n=".",i=!0)=>{let a=jL(e,t,r);return!a&&i&&Se(r)&&(a=vy(e,r,n),a===void 0&&(a=vy(t,r,n))),a},eg=e=>e.replace(/\$/g,"$$$$");class o8{constructor(t={}){var r;this.logger=mi.create("interpolator"),this.options=t,this.format=((r=t==null?void 0:t.interpolation)==null?void 0:r.format)||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:a,prefixEscaped:o,suffix:l,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:x,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:m,nestingSuffixEscaped:p,nestingOptionsSeparator:v,maxReplaces:y,alwaysFormat:b}=t.interpolation;this.escape=r!==void 0?r:_L,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?js(a):o||"{{",this.suffix=l?js(l):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=f?js(f):h||js("$t("),this.nestingSuffix=m?js(m):p||js(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=y||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,n)=>(r==null?void 0:r.source)===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,r,n,i){var h;let a,o,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(m.indexOf(this.formatSeparator)<0){const b=s8(r,c,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,n,{...i,...r,interpolationkey:m}):b}const p=m.split(this.formatSeparator),v=p.shift().trim(),y=p.join(this.formatSeparator).trim();return this.format(s8(r,c,v,this.options.keySeparator,this.options.ignoreJSONStructure),y,n,{...i,...r,interpolationkey:v})};this.resetRegExp();const d=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,x=((h=i==null?void 0:i.interpolation)==null?void 0:h.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>eg(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?eg(this.escape(m)):eg(m)}].forEach(m=>{for(l=0;a=m.regex.exec(t);){const p=a[1].trim();if(o=u(p),o===void 0)if(typeof d=="function"){const y=d(t,a,i);o=Se(y)?y:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))o="";else if(x){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),o="";else!Se(o)&&!this.useRawValueToEscape&&(o=X9(o));const v=m.safeValue(o);if(t=t.replace(a[0],v),x?(m.regex.lastIndex+=o.length,m.regex.lastIndex-=a[0].length):m.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,r,n={}){let i,a,o;const l=(c,u)=>{const d=this.nestingOptionsSeparator;if(c.indexOf(d)<0)return c;const x=c.split(new RegExp(`${js(d)}[ ]*{`));let f=`{${x[1]}`;c=x[0],f=this.interpolate(f,o);const h=f.match(/'/g),m=f.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!m||((m==null?void 0:m.length)??0)%2!==0)&&(f=f.replace(/'/g,'"'));try{o=JSON.parse(f),u&&(o={...u,...o})}catch(p){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,p),`${c}${d}${f}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,c};for(;i=this.nestingRegexp.exec(t);){let c=[];o={...n},o=o.replace&&!Se(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const u=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(u!==-1&&(c=i[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),i[1]=i[1].slice(0,u)),a=r(l.call(this,i[1].trim(),o),o),a&&i[0]===t&&!Se(a))return a;Se(a)||(a=X9(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),a=""),c.length&&(a=c.reduce((d,x)=>this.format(d,x,n.lng,{...n,interpolationkey:i[1].trim()}),a.trim())),t=t.replace(i[0],a),this.regexp.lastIndex=0}return t}}const TL=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);t==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[l,...c]=o.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=l.trim();r[d]||(r[d]=u),u==="false"&&(r[d]=!1),u==="true"&&(r[d]=!0),isNaN(u)||(r[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:r}},l8=e=>{const t={};return(r,n,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const o=n+JSON.stringify(a);let l=t[o];return l||(l=e(dd(n),i),t[o]=l),l(r)}},$L=e=>(t,r,n)=>e(dd(r),n)(t);class IL{constructor(t={}){this.logger=mi.create("formatter"),this.options=t,this.init(t)}init(t,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const n=r.cacheInBuiltFormats?l8:$L;this.formats={number:n((i,a)=>{const o=new Intl.NumberFormat(i,{...a});return l=>o.format(l)}),currency:n((i,a)=>{const o=new Intl.NumberFormat(i,{...a,style:"currency"});return l=>o.format(l)}),datetime:n((i,a)=>{const o=new Intl.DateTimeFormat(i,{...a});return l=>o.format(l)}),relativetime:n((i,a)=>{const o=new Intl.RelativeTimeFormat(i,{...a});return l=>o.format(l,a.range||"day")}),list:n((i,a)=>{const o=new Intl.ListFormat(i,{...a});return l=>o.format(l)})}}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=l8(r)}format(t,r,n,i={}){const a=r.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(l=>l.indexOf(")")>-1)){const l=a.findIndex(c=>c.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,l)].join(this.formatSeparator)}return a.reduce((l,c)=>{var x;const{formatName:u,formatOptions:d}=TL(c);if(this.formats[u]){let f=l;try{const h=((x=i==null?void 0:i.formatParams)==null?void 0:x[i.interpolationkey])||{},m=h.locale||h.lng||i.locale||i.lng||n;f=this.formats[u](l,m,{...d,...i,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const ML=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class RL extends bp{constructor(t,r,n,i={}){var a,o;super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=mi.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(o=(a=this.backend)==null?void 0:a.init)==null||o.call(a,n,i.backend,i)}queueLoad(t,r,n,i){const a={},o={},l={},c={};return t.forEach(u=>{let d=!0;r.forEach(x=>{const f=`${u}|${x}
648`;!n.reload&&this.store.hasResourceBundle(u,x)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?o[f]===void 0&&(o[f]=!0):(this.state[f]=1,d=!1,o[f]===void 0&&(o[f]=!0),a[f]===void 0&&(a[f]=!0),c[x]===void 0&&(c[x]=!0)))}),d||(l[u]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(c)}}loaded(t,r,n){const i=t.split("|"),a=i[0],o=i[1];r&&this.emit("failedLoading",a,o,r),!r&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&n&&(this.state[t]=0);const l={};this.queue.forEach(c=>{AL(c.loaded,[a],o),ML(c,t),r&&c.errors.push(r),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{l[u]||(l[u]={});const d=c.loaded[u];d.length&&d.forEach(x=>{l[u][x]===void 0&&(l[u][x]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(c=>!c.done)}read(t,r,n,i=0,a=this.retryTimeout,o){if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:i,wait:a,callback:o});return}this.readingCalls++;const l=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(u&&d&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,n,i+1,a*2,o)},a);return}o(u,d)},c=this.backend[n].bind(this.backend);if(c.length===2){try{const u=c(t,r);u&&typeof u.then=="function"?u.then(d=>l(null,d)).catch(l):l(null,u)}catch(u){l(u)}return}return c(t,r,l)}prepareLoading(t,r,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Se(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Se(r)&&(r=[r]);const a=this.queueLoad(t,r,n,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t,r=""){const n=t.split("|"),i=n[0],a=n[1];this.read(i,a,"read",void 0,void 0,(o,l)=>{o&&this.logger.warn(`${r}loading namespace ${a} for language ${i} failed`,o),!o&&l&&this.logger.log(`${r}loaded namespace ${a} for language ${i}`,l),this.loaded(t,o,l)})}saveMissing(t,r,n,i,a,o={},l=()=>{}){var c,u,d,x,f;if((u=(c=this.services)==null?void 0:c.utils)!=null&&u.hasLoadedNamespace&&!((x=(d=this.services)==null?void 0:d.utils)!=null&&x.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((f=this.backend)!=null&&f.create){const h={...o,isUpdate:a},m=this.backend.create.bind(this.backend);if(m.length<6)try{let p;m.length===5?p=m(t,r,n,i,h):p=m(t,r,n,i),p&&typeof p.then=="function"?p.then(v=>l(null,v)).catch(l):l(null,p)}catch(p){l(p)}else m(t,r,n,i,l,h)}!t||!t[0]||this.store.addResource(t[0],r,n,i)}}}const tg=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Se(e[1])&&(t.defaultValue=e[1]),Se(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(n=>{t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),c8=e=>{var t,r;return Se(e.ns)&&(e.ns=[e.ns]),Se(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Se(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((r=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:r.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},J0=()=>{},LL=e=>
648{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})},T3="__i18next_supportNoticeShown",zL=()=>typeof globalThis<"u"&&!!globalThis[T3],UL=()=>{typeof globalThis<"u"&&(globalThis[T3]=!0)},WL=e=>{var t,r,n,i,a,o,l,c,u;return!!(((n=(r=(t=e==null?void 0:e.modules)==null?void 0:t.backend)==null?void 0:r.name)==null?void 0:n.indexOf("Locize"))>0||((l=(o=(a=(i=e==null?void 0:e.modules)==null?void 0:i.backend)==null?void 0:a.constructor)==null?void 0:o.name)==null?void 0:l.indexOf("Locize"))>0||(u=(c=e==null?void 0:e.options)==null?void 0:c.backend)!=null&&u.backends&&e.options.backend.backends.some(d=>{var x,f,h;return((x=d==null?void 0:d.name)==null?void 0:x.indexOf("Locize"))>0||((h=(f=d==null?void 0:d.constructor)==null?void 0:f.name)==null?void 0:h.indexOf("Locize"))>0}))};class Du extends bp{constructor(t={},r){if(super(),this.options=c8(t),this.services={},this.logger=mi,this.modules={external:[]},LL(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(t={},r){this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(Se(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const n=tg();this.options={...n,...this.options,...c8(t)},this.options.interpolation={...n.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!WL(this)&&!zL()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("ð i18next is maintained with support from Locize â consider powering your project with managed localization (AI, CDN, integrations): https://locize.com ð"),UL());const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?mi.init(i(this.modules.logger),this.options):mi.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=IL;const d=new n8(this.options);this.store=new t8(this.options.resources,this.options);const x=this.services;x.logger=mi,x.resourceStore=this.store,x.languageUtils=d,x.pluralResolver=new OL(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(x.formatter=i(u),x.formatter.init&&x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new o8(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new RL(i(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(h,...m)=>{this.emit(h,...m)}),this.modules.languageDetector&&(x.languageDetector=i(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=i(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new If(this.services,this.options),this.translator.on("*",(h,...m)=>{this.emit(h,...m)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=J0),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const l=Zc(),c=()=>{const u=(d,x)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit
vendor: 8,657 bytes, line 648
648("initialized",this.options),l.resolve(x),r(d,x)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),l}loadResources(t,r=J0){var a,o;let n=r;const i=Se(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const l=[],c=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(x=>{x!=="cimode"&&l.indexOf(x)<0&&l.push(x)})};i?c(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>c(d)),(o=(a=this.options.preload)==null?void 0:a.forEach)==null||o.call(a,u=>c(u)),this.services.backendConnector.load(l,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(u)})}else n(null)}reloadResources(t,r,n){const i=Zc();return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),n||(n=J0),this.services.backendConnector.reload(t,r,a=>{i.resolve(),n(a)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&P3.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,r){this.isLanguageChangingTo=t;const n=Zc();this.emit("languageChanging",t);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,c)=>{c?this.isLanguageChangingTo===t&&(i(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,n.resolve((...u)=>this.t(...u)),r&&r(l,(...u)=>this.t(...u))},o=l=>{var d,x;!t&&!l&&this.services.languageDetector&&(l=[]);const c=Se(l)?l:l&&l[0],u=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(Se(l)?[l]:l);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),(x=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||x.call(d,u)),this.loadResources(u,f=>{a(f,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),n}getFixedT(t,r,n){const i=(a,o,...l)=>{let c;typeof o!="object"?c=this.options.overloadTranslationOptionHandler([a,o].concat(l)):c={...o},c.lng=c.lng||i.lng,c.lngs=c.lngs||i.lngs,c.ns=c.ns||i.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||n||i.keyPrefix);const u=this.options.keySeparator||".";let d;return c.keyPrefix&&Array.isArray(a)?d=a.map(x=>(typeof x=="function"&&(x=yy(x,{...this.options,...o})),`${c.keyPrefix}${u}${x}`)):(typeof a=="function"&&(a=yy(a,{...this.options,...o})),d=c.keyPrefix?`${c.keyPrefix}${u}${a}`:a),this.t(d,c)};return Se(t)?i.lng=t:i.lngs=t,i.ns=r,i.keyPrefix=n,i}t(...t){var r;return(r=this.translator)==null?void 0:r.translate(...t)}exists(...t){var r;return(r=this.translator)==null?void 0:r.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(l,c)=>{const u=this.services.backendConnector.state[`${l}|${c}`];return u===-1||u===0||u===2};if(r.precheck){const l=r.precheck(this,o);if(l!==void 0)return l}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,t)&&(!i||o(a,t)))}loadNamespaces(t,r){const n=Zc();return this.options.ns?(Se(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){const n=Zc();Se(t)&&(t=[t]);const i=this.options.preload||[],a=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(t){var i,a;if(t||(t=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const o=new Intl.Locale(t);if(o&&o.getTextInfo){const l=o.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((a=this.services)==null?void 0:a.languageUtils)||new n8(tg());return t.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},r){const n=new Du(t,r);return n.createInstance=Du.createInstance,n}cloneInstance(t={},r=J0){const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},a=new Du(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const l=Object.keys(this.store.data).reduce((c,u)=>(c[u]={...this.store.data[u]},c[u]=Object.keys(c[u]).reduce((d,x)=>(d[x]={...c[u][x]},d),c[u]),c),{});a.store=new t8(l,i),a.services.resourceStore=a.store}if(t.interpolation){const c={...tg().interpolation,...this.options.interpolation,...t.interpolation},u={...i,interpolation:c};a.services.interpolator=new o8(u)}return a.translator=new If(a.services,i),a.translator.on("*",(l,...c)=>{a.emit(l,...c)}),a.init(i,r),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const yr=Du.createInstance();yr.createInstance;yr.dir;yr.init;yr.loadResources;yr.reloadResources;yr.use;yr.changeLanguage;yr.getFixedT;yr.t;yr.exists;yr.setDefaultNamespace;yr.hasLoadedNamespace;yr.loadNamespaces;yr.loadLanguages;const HL=(e,t,r,n)=>{var a,o,l,c;const i=[r,{code:t,...n||{}}];if((o=(a=e==null?void 0:e.services)==null?void 0:a.logger)!=null&&o.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);fo(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),(c=(l=e==null?void 0:e.services)==null?void 0:l.logger)!=null&&c.warn?e.services.logger.warn(...i):console!=null&&console.warn&&console.warn(...i)},u8={},$3=(e,t,r,n)=>{fo(r)&&u8[r]||(fo(r)&&(u8[r]=new Date),HL(e,t,r,n))},I3=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},by=(e,t,r)=>{e.loadNamespaces(t,I3(e,r))},d8=(e,t,r,n)=>{if(fo(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return by(e,r,n);r.forEach(i=>
648{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,I3(e,n))},KL=(e,t,r={})=>!t.languages||!t.languages.length?($3(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(n,i)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,e))return!1}}),fo=e=>typeof e=="string",VL=e=>typeof e=="object"&&e!==null,GL=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,qL={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"â¦","…":"â¦","/":"/","/":"/"},YL=e=>qL[e],ZL=e=>e.replace(GL,YL);let Ey={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:ZL,transDefaultProps:void 0};const XL=(e={})=>{Ey={...Ey,...e}},QL=()=>Ey;let M3;const JL=e=>{M3=e},ez=()=>M3,tz={type:"3rdParty",init(e){XL(e.options.react),JL(e)}},rz=A.createContext();class nz{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var R3={exports:{}},L3={};/** 649 * @license React 650 * use-sync-external-store-shim.production.js 651 * 652 * Copyright (c) Meta Platforms, Inc. and affiliates. 653 * 654 * This source code is licensed under the MIT license found in the 655 * LICENSE file in the root directory of this source tree. 656 */var Vl=A;function iz(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var az=typeof Object.is=="function"?Object.is:iz,sz=Vl.useState,oz=Vl.useEffect,lz=Vl.useLayoutEffect,cz=Vl.useDebugValue;function uz(e,t){var r=t(),n=sz({inst:{value:r,getSnapshot:t}}),i=n[0].inst,a=n[1];return lz(function(){i.value=r,i.getSnapshot=t,rg(i)&&a({inst:i})},[e,r,t]),oz(function(){return rg(i)&&a({inst:i}),e(function(){rg(i)&&a({inst:i})})},[e]),cz(r),r}function rg(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!az(e,r)}catch{return!0}}function dz(e,t){return t()}var xz=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?dz:uz;L3.useSyncExternalStore=Vl.useSyncExternalStore!==void 0?Vl.useSyncExternalStore:xz;R3.exports=L3;var fz=R3.exports;const hz=(e,t)=>fo(t)?t:VL(t)&&fo(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,pz={t:hz,ready:!1},mz=()=>()=>{},ii=(e,t={})=>{var _,O,I;const{i18n:r}=t,{i18n:n,defaultNS:i}=A.useContext(rz)||{},a=r||n||ez();a&&!a.reportNamespaces&&(a.reportNamespaces=new nz),a||$3(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const o=A.useMemo(()=>{var B;return{...QL(),...(B=a==null?void 0:a.options)==null?void 0:B.react,...t}},[a,t]),{useSuspense:l,keyPrefix:c}=o,u=i||((_=a==null?void 0:a.options)==null?void 0:_.defaultNS),d=fo(u)?[u]:u||["translation"],x=A.useMemo(()=>d,d);(I=(O=a==null?void 0:a.reportNamespaces)==null?void 0:O.addUsedNamespaces)==null||I.call(O,x);const f=A.useRef(0),h=A.useCallback(B=>{if(!a)return mz;const{bindI18n:T,bindI18nStore:k}=o,$=()=>{f.current+=1,B()};return T&&a.on(T,$),k&&a.store.on(k,$),()=>{T&&T.split(" ").forEach(W=>a.off(W,$)),k&&k.split(" ").forEach(W=>a.store.off(W,$))}},[a,o]),m=A.useRef(),p=A.useCallback(()=>{if(!a)return pz;const B=!!(a.isInitialized||a.initializedStoreOnce)&&x.every(L=>KL(L,a,o)),T=t.lng||a.language,k=f.current,$=m.current;if($&&$.ready===B&&$.lng===T&&$.keyPrefix===c&&$.revision===k)return $;const z={t:a.getFixedT(T,o.nsMode==="fallback"?x:x[0],c),ready:B,lng:T,keyPrefix:c,revision:k};return m.current=z,z},[a,x,c,o,t.lng]),[v,y]=A.useState(0),{t:b,ready:g}=fz.useSyncExternalStore(h,p,p);A.useEffect(()=>{if(a&&!g&&!l){const B=()=>y(T=>T+1);t.lng?d8(a,t.lng,x,B):by(a,x,B)}},[a,t.lng,x,g,l,v]);const w=a||{},E=A.useRef(null),C=A.useRef(),j=B=>{const T=Object.getOwnPropertyDescriptors(B);T.__original&&delete T.__original;const k=Object.create(Object.getPrototypeOf(B),T);if(!Object.prototype.hasOwnProperty.call(k,"__original"))try{Object.defineProperty(k,"__original",{value:B,writable:!1,enumerable:!1,
656configurable:!1})}catch{}return k},S=A.useMemo(()=>{const B=w,T=B==null?void 0:B.language;let k=B;B&&(E.current&&E.current.__original===B?C.current!==T?(k=j(B),E.current=k,C.current=T):k=E.current:(k=j(B),E.current=k,C.current=T));const $=[b,k,g];return $.t=b,$.i18n=k,$.ready=g,$},[b,w,g,w.resolvedLanguage,w.language,w.languages]);if(a&&l&&!g)throw new Promise(B=>{const T=()=>B();t.lng?d8(a,t.lng,x,T):by(a,x,T)});return S},gz="/assets/hero-crowd-DcyF74tY.png";function vz(){const{t:e}=ii();return s.jsxs("section",{className:"relative min-h-screen flex flex-col items-center justify-center overflow-hidden grain-overlay","aria-label":"Hero",children:[s.jsxs("div",{className:"absolute inset-[-10%] w-[120%] h-[120%] xerox-overlay cyan-tint",children:[s.jsx("img",{src:gz,alt:"Spirit Festival â Tausende Besucher feiern bei einem Punk-Festival",className:"w-full h-full object-cover will-change-transform xerox-img",fetchPriority:"high",ref:t=>{if(!t)return;const r=()=>{const i=window.scrollY*.3;t.style.transform=`translateY(${i}px)`};window.addEventListener("scroll",r,{passive:!0}),r()}}),s.jsx("div",{className:"hero-overlay absolute inset-0"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-background/70 via-background/25 to-background/70"})]}),s.jsxs("div",{className:"relative z-10 text-center px-4 max-w-5xl mx-auto",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 px-5 py-1.5 -rotate-2 tape-label text-xs font-bold tracking-[0.2em] uppercase mb-6 animate-fade-up",style:{animationDelay:"0.2s",opacity:0},children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-primary-foreground/70"}),e("hero.badge")]}),s.jsxs("h1",{className:"font-grunge text-7xl sm:text-8xl md:text-[11rem] leading-[0.82] tracking-tight animate-fade-up",style:{animationDelay:"0.4s",opacity:0},"aria-label":"Spirit Festival",children:[s.jsx("span",{className:"grunge-eroded block -rotate-1 text-primary drop-shadow-[6px_6px_0_hsl(220_14%_4%)]",children:"SPIRIT"}),s.jsx("span",{className:"grunge-eroded block rotate-[0.6deg] text-foreground drop-shadow-[6px_6px_0_hsl(220_14%_4%)]",children:"FESTIVAL"})]}),s.jsx("p",{className:"font-tech text-base md:text-lg text-foreground/75 mt-6 mb-8 max-w-xl mx-auto tracking-wide uppercase animate-fade-up",style:{animationDelay:"0.6s",opacity:0}
656,children:e("hero.subtitle")}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center animate-fade-up",style:{animationDelay:"0.8s",opacity:0},children:[s.jsxs(we,{to:"/events",className:"inline-flex items-center justify-center gap-2 px-8 py-4 bg-primary text-primary-foreground rounded-xl font-bold text-lg hover:opacity-90 transition-all duration-200 glow-primary",children:[s.jsx(Pt,{size:20}),e("hero.buyTickets")]}),s.jsxs(we,{to:"/lineup",className:"inline-flex items-center justify-center gap-2 px-8 py-4 glass border border-border rounded-xl font-medium text-lg hover:border-primary/50 transition-all duration-200",children:[s.jsx(IT,{size:18}),e("hero.lineup")]})]})]}),s.jsxs("div",{className:"absolute bottom-8 left-1/2 -translate-x-1/2 flex flex-col items-center gap-2 text-muted-foreground animate-float transition-opacity duration-500","aria-hidden":"true",ref:t=>{if(!t)return;const r=()=>{const n=Math.max(0,1-window.scrollY/300);t.style.opacity=String(n)};window.addEventListener("scroll",r,{passive:!0}),r()},children:[s.jsx("span",{className:"text-xs tracking-widest uppercase",children:e("hero.scroll")}),s.jsx(mr,{size:20,className:"animate-bounce"})]})]})}function yz({targetDate:e,eventName:t}){const[r,n]=A.useState({days:0,hours:0,minutes:0,seconds:0});A.useEffect(()=>{const a=()=>{const l=new Date(e).getTime()-Date.now();if(l<=0){n({days:0,hours:0,minutes:0,seconds:0});return}n({days:Math.floor(l/864e5),hours:Math.floor(l%864e5/36e5),minutes:Math.floor(l%36e5/6e4),seconds:Math.floor(l%6e4/1e3)})};a();const o=setInterval(a,1e3);return()=>clearInterval(o)},[e]);const i=[{label:"TAGE",value:r.days},{label:"STD",value:r.hours},{label:"MIN",value:r.minutes},{label:"SEK",value:r.seconds}];return s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-sm text-muted-foreground tracking-widest uppercase mb-4",children:t}),s.jsx("div",{className:"flex items-center justify-center gap-3 md:gap-6",role:"timer","aria-label":`Countdown bis ${t}`,children:i.map((a,o)=>s.jsxs("div",{className:"flex items-center gap-3 md:gap-6",children:[s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("div",{className:"glass rounded-xl w-16 h-16 md:w-24 md:h-24 flex items-center justify-center glow-primary border border-primary/30",children:s.jsx("span",{className:"font-tech text-2xl md:text-4xl font-bold text-primary",children:String(a.value).padStart(2,"0")})}),s.jsx("span",{className:"text-[9px] md:text-xs text-muted-foreground tracking-widest mt-2 font-tech",children:a.label})]}),o<i.length-1&&s.jsx("span",{className:"font-tech text-xl md:text-3xl text-primary/60 -mt-6 animate-glow-pulse",children:":"})]},a.label))})]})}function bz(){const{t:e}=ii();return s.jsx("section",{className:"py-16 border-b border-border bg-card/50","aria-label":"Countdown",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx(yz,{targetDate:"2027-08-19T00:00:00",eventName:"SPIRIT FESTIVAL 2027 â 19.â21. August · Festwiesen Loburg"}),s.jsx("div",{className:"text-center mt-8",children:s.jsxs(we,{to:"/events",className:"inline-flex items-center gap-2 px-6 py-3 bg-primary text-primary-foreground rounded-xl font-bold hover:opacity-90 transition-opacity glow-primary",children:[s.jsx(Pt,{size:18}),e("hero.secureTicket")]})})]})})}function Ce({children:e,className:t="",delay:r=0}){const n=A.useRef(null);return A.useEffect(()=>{const i=n.current;if(!i)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){i.classList.add("revealed");return}const o=new IntersectionObserver(l=>{l.forEach(c=>{c.isIntersecting&&(setTimeout(()=>{c.target.classList.add("revealed")},r),o.unobserve(c.target))})},{threshold:.1});return o.observe(i),()=>o.disconnect()},[r]),s.jsx("div",{ref:n,className:`scroll-reveal ${t}`,children:e})}function Ez(){const{t:e}=ii(),t=[{value:"6.000+",label:e("stats.visitors"),icon:Je},{value:"40+",label:e("stats.bands"),icon:ia},{value:"3",label:e("stats.days"),icon:LT},{value:"20",label:e("stats.yearsExp"),icon:Lr}];return s.jsx("section",{className:"py-16","aria-label":"Spirit Festival in Zahlen",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6",children:t.map((r,n)=>s.jsx(Ce,{delay:n*100,children:s.jsxs("div",{className:"text-center p-6 glass-light rounded-2xl border border-border hover:border-primary/30 transition-all duration-300 group",children:[s.jsx(r.icon,{className:"mx-auto mb-3 text-primary group-hover:scale-110 transition-transform",size:28}),s.jsx("div",{className:"font-display text-4xl md:text-5xl text-primary text-glow-primary",children:r.value}),s.jsx("div",{className:"text-sm text-muted-foreground mt-1",children:r.label})]})},r.label))})})})}const wz=1,Cz="089e5756-4889-49eb-81e2-6fab4e1bcbcb",Az="00ad90eb-066c-4de9-bf8e-eb51401bc797",jz="/__l5e/assets-v1/089e5756-4889-49eb-81e2-6fab4e1bcbcb/spirit-festival-2027-plakat.jpg",kz="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/089e5756-4889-49eb-81e2-6fab4e1bcbcb/spirit-festival-2027-plakat.jpg",_z="spirit-festival-2027-plakat.jpg",Sz=812599,Bz="image/jpeg",Nz="2026-08-26T11:15:19Z",Dz={ver
656sion:wz,asset_id:Cz,project_id:Az,url:jz,r2_key:kz,original_filename:_z,size:Sz,content_type:Bz,created_at:Nz};function Fz(){const{t:e}=ii(),t=[{icon:Lr,label:e("event.labelDate"),value:e("event.date")},{icon:_r,label:e("event.labelLocation"),value:e("event.location")},{icon:ia,label:e("event.labelMusic"),value:e("event.music")},{icon:Je,label:e("event.labelVisitors"),value:e("event.visitors")}];return s.jsx("section",{className:"py-20 bg-card/30","aria-labelledby":"events-heading",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx(Ce,{children:s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-2",children:e("event.saveTheDate")}),s.jsx("h2",{className:"font-grunge text-5xl md:text-7xl",id:"events-heading",children:e("event.title")}),s.jsx("div",{className:"w-24 h-0.5 bg-primary mx-auto mt-4 glow-primary"})]})}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-10 items-center max-w-5xl mx-auto",children:[s.jsx(Ce,{children:s.jsx("div",{className:"relative rounded-sm overflow-hidden border-2 border-primary/40 shadow-2xl shadow-black/70",children:s.jsx("img",{src:Dz.url,alt:"Spirit Festival 2027 â offizielles Plakat, 20 Jahre Punkrock, 19.â21.08.2027 Festwiesen Loburg",className:"w-full object-contain",loading:"lazy"})})}),s.jsx(Ce,{delay:150,children:s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"space-y-4",children:t.map(({icon:r,label:n,value:i})=>s.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-xl gradient-card border border-border",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center text-primary shrink-0",children:s.jsx(r,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:n}),s.jsx("p",{className:"text-sm font-semibold",children:i})]})]},n))}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:e("event.description")}),s.jsxs("div",{className:"flex flex-wrap gap-3",children:[s.jsxs(we,{to:"/lineup",className:"inline-flex items-center gap-2 px-6 py-3 bg-primary text-primary-foreground rounded-xl font-bold hover:opacity-90 transition-opacity glow-primary",children:[e("event.fullLineup")," ",s.jsx(Af,{size:16})]}),s.jsxs("a",{href:"https://www.facebook.com/events/611223565412000",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-6 py-3 border border-border rounded-xl font-medium hover:border-primary/50 hover:text-primary transition-all","aria-label":`${e("event.facebookEvent")} (${e("common.openNewTab")})`,children:[s.jsx(jf,{size:16}),e("event.facebookEvent")]})]})]})]})})]})]})})}const z3="/assets/stage-concert-BRLNl5xN.png";function Pz(){return s.jsx("section",{className:"py-0","aria-label":"Bühnenimpression",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsx(Ce,{children:s.jsxs("div",{className:"relative overflow-hidden rounded-2xl border border-border aspect-[21/9] group",children:[s.jsx("div",{className:"absolute inset-[-20%] w-[140%] h-[140%]",children:s.jsx("img",{src:z3,alt:"Punk-Band live auf der Bühne mit Pyrotechnik und jubelnder Menge",className:"w-full h-full object-cover transition-transform duration-[2000ms] ease-out will-change-transform group-hover:scale-105",loading:"lazy",style:{transform:"translateY(var(--parallax-offset, 0px))"},onLoad:e=>{const t=e.currentTarget,r=t.closest("section");if(!r)return;const n=()=>{const i=r.getBoundingClientRect(),a=window.innerHeight,o=(a-i.top)/(a+i.height),c=(Math.max(0,Math.min(1,o))-.5)*60;t.style.setProperty("--parallax-offset",`${c}px`)};window.addEventListener("scroll",n,{passive:!0}),n()}})}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/80 via-transparent to-transparent pointer-events-none"})]})})})})}function Oz(e){return Object.prototype.toString.call(e)==="[object Object]"}function x8(e){return Oz(e)||Array.isArray(e)}function Tz(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function SE(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==a?!1:r.every(o=>{const l=e[o],c=t[o];return typeof l=="function"?`${l}`==`${c}`:!x8(l)||!x8(c)?l===c:SE(l,c)})}function f8(e){return e.concat().sort((t,r)=>t.name>
vendor: 7,628 bytes, line 656
656r.name?1:-1).map(t=>t.options)}function $z(e,t){if(e.length!==t.length)return!1;const r=f8(e),n=f8(t);return r.every((i,a)=>{const o=n[a];return SE(i,o)})}function BE(e){return typeof e=="number"}function wy(e){return typeof e=="string"}function Ep(e){return typeof e=="boolean"}function h8(e){return Object.prototype.toString.call(e)==="[object Object]"}function gt(e){return Math.abs(e)}function NE(e){return Math.sign(e)}function Fu(e,t){return gt(e-t)}function Iz(e,t){if(e===0||t===0||gt(e)<=gt(t))return 0;const r=Fu(gt(e),gt(t));return gt(r/e)}function Mz(e){return Math.round(e*100)/100}function xd(e){return fd(e).map(Number)}function Qn(e){return e[v0(e)]}function v0(e){return Math.max(0,e.length-1)}function DE(e,t){return t===v0(e)}function p8(e,t=0){return Array.from(Array(e),(r,n)=>t+n)}function fd(e){return Object.keys(e)}function U3(e,t){return[e,t].reduce((r,n)=>(fd(n).forEach(i=>{const a=r[i],o=n[i],l=h8(a)&&h8(o);r[i]=l?U3(a,o):o}),r),{})}function Cy(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function Rz(e,t){const r={start:n,center:i,end:a};function n(){return 0}function i(c){return a(c)/2}function a(c){return t-c}function o(c,u){return wy(e)?r[e](c):e(t,c,u)}return{measure:o}}function hd(){let e=[];function t(i,a,o,l={passive:!0}){let c;if("addEventListener"in i)i.addEventListener(a,o,l),c=()=>i.removeEventListener(a,o,l);else{const u=i;u.addListener(o),c=()=>u.removeListener(o)}return e.push(c),n}function r(){e=e.filter(i=>i())}const n={add:t,clear:r};return n}function Lz(e,t,r,n){const i=hd(),a=1e3/60;let o=null,l=0,c=0;function u(){i.add(e,"visibilitychange",()=>{e.hidden&&m()})}function d(){h(),i.clear()}function x(v){if(!c)return;o||(o=v,r(),r());const y=v-o;for(o=v,l+=y;l>=a;)r(),l-=a;const b=l/a;n(b),c&&(c=t.requestAnimationFrame(x))}function f(){c||(c=t.requestAnimationFrame(x))}function h(){t.cancelAnimationFrame(c),o=null,l=0,c=0}function m(){o=null,l=0}return{init:u,destroy:d,start:f,stop:h,update:r,render:n}}function zz(e,t){const r=t==="rtl",n=e==="y",i=n?"y":"x",a=n?"x":"y",o=!n&&r?-1:1,l=d(),c=x();function u(m){const{height:p,width:v}=m;return n?p:v}function d(){return n?"top":r?"right":"left"}function x(){return n?"bottom":r?"left":"right"}function f(m){return m*o}return{scroll:i,cross:a,startEdge:l,endEdge:c,measureSize:u,direction:f}}function ho(e=0,t=0){const r=gt(e-t);function n(u){return u<e}function i(u){return u>t}function a(u){return n(u)||i(u)}function o(u){return a(u)?n(u)?e:t:u}function l(u){return r?u-r*Math.ceil((u-t)/r):u}return{length:r,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:n,removeOffset:l}}function W3(e,t,r){const{constrain:n}=ho(0,e),i=e+1;let a=o(t);function o(f){return r?gt((i+f)%i):n(f)}function l(){return a}function c(f){return a=o(f),x}function u(f){return d().set(l()+f)}function d(){return W3(e,l(),r)}const x={get:l,set:c,add:u,clone:d};return x}function Uz(e,t,r,n,i,a,o,l,c,u,d,x,f,h,m,p,v,y,b){const{cross:g,direction:w}=e,E=["INPUT","SELECT","TEXTAREA"],C={passive:!1},j=hd(),S=hd(),_=ho(50,225).constrain(h.measure(20)),O={mouse:300,touch:400},I={mouse:500,touch:600},B=m?43:25;let T=!1,k=0,$=0,W=!1,z=!1,L=!1,F=!1;function U(Q){if(!b)return;function he(G){(Ep(b)||b(Q,G))&&X(G)}const P=t;j.add(P,"dragstart",G=>G.preventDefault(),C).add(P,"touchmove",()=>{},C).add(P,"touchend",()=>{}).add(P,"touchstart",he).add(P,"mousedown",he).add(P,"touchcancel",se).add(P,"contextmenu",se).add(P,"click",ne,!0)}function D(){j.clear(),S.clear()}function N(){const Q=F?r:t;S.add(Q,"touchmove",ie,C).add(Q,"touchend",se).add(Q,"mousemove",ie,C).add(Q,"mouseup",se)}function K(Q){const he=Q.nodeName||"";return E.includes(he)}function R(){return(m?I:O)[F?"mouse":"touch"]}function H(Q,he){const P=x.add(NE(Q)*-1),G=d.byDistance(Q,!m).distance;return m||gt(Q)<_?G:v&&he?G*.5:d.byIndex(P.get(),0).distance}function X(Q){const he=Cy(Q,n);F=he,L=m&&he&&!Q.buttons&&T,T=Fu(i.get(),o.get())>=2,!(he&&Q.button!==0)&&(K(Q.target)||(W=!0,a.pointerDown(Q),u.useFriction(0).useDuration(0),i.set(o),N(),k=a.readPoint(Q),$=a.readPoint(Q,g),f.emit("pointerDown")))}function ie(Q){if(!Cy(Q,n)&&Q.touches.length>=2)return se(Q);const P=a.readPoint(Q),G=a.readPoint(Q,g),Z=Fu(P,k),V=Fu(G,$);if(!z&&!F&&(!Q.cancelable||(z=Z>V,!z)))return se(Q);const M=a.pointerMove(Q);Z>p&&(L=!0),u.useFriction(.3).useDuration(.75),l.start(),i.add(w(M)),Q.preventDefault()}function se(Q){const P=d.byDistance(0,!1).index!==x.get(),G=a.pointerUp(Q)*R(),Z=H(w(G),P),V=Iz(G,Z),M=B-10*V,Y=y+V/50;z=!1,W=!1,S.clear(),u.useDuration(M).useFriction(Y),c.distance(Z,!m),F=!1,f.emit("pointerUp")}function ne(Q){L&&(Q.stopPropagation(),Q.preventDefault(),L=!1)}function ce(){return W}return{init:U,destroy:D,pointerDown:ce}}function Wz(e,t){let n,i;function a(x){return x.timeStamp}function o(x,f){const m=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(Cy(x,t)?x:x.touches[0])[m]}function l(x){return n=x,i=x,o(x)}function c(x){const f=o(x)-o(i),h=a(x)-a(n)>170;return i=x,h&&(n=x),f}function u(x){if(!n||!i)return 0;const f=o(i)-o(n),h=a(x)-a(n),m=a(x)-a(i)>170,p=f/h;return h&&!m&>(p)>.1?p:0}return{pointerDown:l,pointerMove:c,pointerUp:u,readPoint:o}}function Hz(){function e(r){const{offsetTop:n,offsetLeft:i,offsetWidth:a,offsetHeight:o}=r;return{top:n,right:i+a,bottom:n+o,left:i,width:a,height:o}}return{measure:e}}function Kz(e){function t(n){return e*(n/100)}return{measure:t}}function Vz(e,t,r,n,i,a,o){const l=[e].concat(n);let c,u,d=[],x=!1;function f(v){return i.measureSize(o.measure(v))}function h(v){if(!a)return;u=f(e),d=n.map(f);function y(b){for(const g of b){if(x)return;const w=g.target===e,E=n.indexOf(g.target),C=w?u:d[E],j=f(w?e:n[E]);if(gt(j-C)>=.5){v.reInit(),t.emit("resize");break}}}c=new ResizeObserver(b=>{(Ep(a)||a(v,b))&&y(b)}),r.requestAnimationFrame(()=>{l.forEach(b=>c.observe(b))})}function m(){x=!0,c&&c.disconnect()}return{init:h,destroy:m}}function Gz(e,t,r,n,i,a){let o=0,l=0,c=i,u=a,d=e.get(),x=0;function f(){const C=n.get()-e.get(),j=!c;let S=0;return j?(o=0,r.set(n),e.set(n),S=C):(r.set(e),o+=C/c,o*=u,d+=o,e.add(o),S=d-x),l=NE(S),x=d,E}function h(){const C=n.get()-t.get();return gt(C)<.001}function m(){return c}function p(){return l}function v(){return o}function y(){return g(i)}function b(){return w(a)}function g(C){return c=C,E}function w(C){return u=C,E}const E={direction:p,duration:m,velocity:v,seek:f,settled:h,useBaseFriction:b,useBaseDuration:y,useFriction:w,useDuration:g};return E}function qz(e,t,r,n,i){const a=i.measure(10),o=i.measure(50),l=ho(.1,.99);let c=!1;function u(){return!(c||!e.reachedAny(r.get())||!e.reachedAny(t.get()))}function d(h){if(!u())return;const m=e.reachedMin(t.get())?"min":"max",p=gt(e[m]-t.get()),v=r.get()-t.get(),y=l.constrain(p/o);r.subtract(v*y),!h&>(v)<a&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())}function x(h){c=!h}return{shouldConstrain:u,constrain:d,toggleActive:x}}function Yz(e,t,r,n,i){const a=ho(-t+e,0),o=x(),l=d(),c=f();function u(m,p){return Fu(m,p)<=1}function d(){const m=o[0],p=Qn(o),v=o.lastIndexOf(m),y=o.indexOf(p)+1;return ho(v,y)}function x(){return r.map((m,p)=>{const{min:v,max:y}=a,b=a.constrain(m),g=!p,w=DE(r,p);return g?y:w||u(v,b)?v:u(y,b)?y:b}).map(m=>parseFloat(m.toFixed(3)))}function f(){if(t<=e+i)return[a.max];if(n==="keepSnaps")return o;const{min:m,max:p}=l;return o.slice(m,p)}return{snapsContained:c,scrollContainLimit:l}}function Zz(e,t,r){const n=t[0],i=r?n-e:Qn(t);return{limit:ho(i,n)}}function Xz(e,t,r,n){const a=t.min+.1,o=t.max+.1,{reachedMin:l,reachedMax:c}=ho(a,o);function u(f){return f===1?c(r.get()):f===-1?l(r.get()):!1}function d(f){if(!u(f))return;const h=e*(f*-1);
vendor: 11,033 bytes, line 656
656n.forEach(m=>m.add(h))}return{loop:d}}function Qz(e){const{max:t,length:r}=e;function n(a){const o=a-t;return r?o/-r:0}return{get:n}}function Jz(e,t,r,n,i){const{startEdge:a,endEdge:o}=e,{groupSlides:l}=i,c=x().map(t.measure),u=f(),d=h();function x(){return l(n).map(p=>Qn(p)[o]-p[0][a]).map(gt)}function f(){return n.map(p=>r[a]-p[a]).map(p=>-gt(p))}function h(){return l(u).map(p=>p[0]).map((p,v)=>p+c[v])}return{snaps:u,snapsAligned:d}}function eU(e,t,r,n,i,a){const{groupSlides:o}=i,{min:l,max:c}=n,u=d();function d(){const f=o(a),h=!e||t==="keepSnaps";return r.length===1?[a]:h?f:f.slice(l,c).map((m,p,v)=>{const y=!p,b=DE(v,p);if(y){const g=Qn(v[0])+1;return p8(g)}if(b){const g=v0(a)-Qn(v)[0]+1;return p8(g,Qn(v)[0])}return m})}return{slideRegistry:u}}function tU(e,t,r,n,i){const{reachedAny:a,removeOffset:o,constrain:l}=n;function c(m){return m.concat().sort((p,v)=>gt(p)-gt(v))[0]}function u(m){const p=e?o(m):l(m),v=t.map((b,g)=>({diff:d(b-p,0),index:g})).sort((b,g)=>gt(b.diff)-gt(g.diff)),{index:y}=v[0];return{index:y,distance:p}}function d(m,p){const v=[m,m+r,m-r];if(!e)return m;if(!p)return c(v);const y=v.filter(b=>NE(b)===p);return y.length?c(y):Qn(v)-r}function x(m,p){const v=t[m]-i.get(),y=d(v,p);return{index:m,distance:y}}function f(m,p){const v=i.get()+m,{index:y,distance:b}=u(v),g=!e&&a(v);if(!p||g)return{index:y,distance:m};const w=t[y]-b,E=m+d(w,0);return{index:y,distance:E}}return{byDistance:f,byIndex:x,shortcut:d}}function rU(e,t,r,n,i,a,o){function l(x){const f=x.distance,h=x.index!==t.get();a.add(f),f&&(n.duration()?e.start():(e.update(),e.render(1),e.update())),h&&(r.set(t.get()),t.set(x.index),o.emit("select"))}function c(x,f){const h=i.byDistance(x,f);l(h)}function u(x,f){const h=t.clone().set(x),m=i.byIndex(h.get(),f);l(m)}return{distance:c,index:u}}function nU(e,t,r,n,i,a,o,l){const c={passive:!0,capture:!0};let u=0;function d(h){if(!l)return;function m(p){if(new Date().getTime()-u>10)return;o.emit("slideFocusStart"),e.scrollLeft=0;const b=r.findIndex(g=>g.includes(p));BE(b)&&(i.useDuration(0),n.index(b,0),o.emit("slideFocus"))}a.add(document,"keydown",x,!1),t.forEach((p,v)=>{a.add(p,"focus",y=>{(Ep(l)||l(h,y))&&m(v)},c)})}function x(h){h.code==="Tab"&&(u=new Date().getTime())}return{init:d}}function pu(e){let t=e;function r(){return t}function n(c){t=o(c)}function i(c){t+=o(c)}function a(c){t-=o(c)}function o(c){return BE(c)?c:c.get()}return{get:r,set:n,add:i,subtract:a}}function H3(e,t){const r=e.scroll==="x"?o:l,n=t.style;let i=null,a=!1;function o(f){return`translate3d(${f}px,0px,0px)`}function l(f){return`translate3d(0px,${f}px,0px)`}function c(f){if(a)return;const h=Mz(e.direction(f));h!==i&&(n.transform=r(h),i=h)}function u(f){a=!f}function d(){a||(n.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:d,to:c,toggleActive:u}}function iU(e,t,r,n,i,a,o,l,c){const d=xd(i),x=xd(i).reverse(),f=y().concat(b());function h(j,S){return j.reduce((_,O)=>_-i[O],S)}function m(j,S){return j.reduce((_,O)=>h(_,S)>0?_.concat([O]):_,[])}function p(j){return a.map((S,_)=>({start:S-n[_]+.5+j,end:S+t-.5+j}))}function v(j,S,_){const O=p(S);return j.map(I=>{const B=_?0:-r,T=_?r:0,k=_?"end":"start",$=O[I][k];return{index:I,loopPoint:$,slideLocation:pu(-1),translate:H3(e,c[I]),target:()=>l.get()>$?B:T}})}function y(){const j=o[0],S=m(x,j);return v(S,r,!1)}function b(){const j=t-o[0]-1,S=m(d,j);return v(S,-r,!0)}function g(){return f.every(({index:j})=>{const S=d.filter(_=>_!==j);return h(S,t)<=.1})}function w(){f.forEach(j=>{const{target:S,translate:_,slideLocation:O}=j,I=S();I!==O.get()&&(_.to(I),O.set(I))})}function E(){f.forEach(j=>j.translate.clear())}return{canLoop:g,clear:E,loop:w,loopPoints:f}}function aU(e,t,r){let n,i=!1;function a(c){if(!r)return;function u(d){for(const x of d)if(x.type==="childList"){c.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(d=>{i||(Ep(r)||r(c,d))&&u(d)}),n.observe(e,{childList:!0})}function o(){n&&n.disconnect(),i=!0}return{init:a,destroy:o}}function sU(e,t,r,n){const i={};let a=null,o=null,l,c=!1;function u(){l=new IntersectionObserver(m=>{c||(m.forEach(p=>{const v=t.indexOf(p.target);i[v]=p}),a=null,o=null,r.emit("slidesInView"))},{root:e.parentElement,threshold:n}),t.forEach(m=>l.observe(m))}function d(){l&&l.disconnect(),c=!0}function x(m){return fd(i).reduce((p,v)=>{const y=parseInt(v),{isIntersecting:b}=i[y];return(m&&b||!m&&!b)&&p.push(y),p},[])}function f(m=!0){if(m&&a)return a;if(!m&&o)return o;const p=x(m);return m&&(a=p),m||(o=p),p}return{init:u,destroy:d,get:f}}function oU(e,t,r,n,i,a){const{measureSize:o,startEdge:l,endEdge:c}=e,u=r[0]&&i,d=m(),x=p(),f=r.map(o),h=v();function m(){if(!u)return 0;const b=r[0];return gt(t[l]-b[l])}function p(){if(!u)return 0;const b=a.getComputedStyle(Qn(n));return parseFloat(b.getPropertyValue(`margin-${c}`))}function v(){return r.map((b,g,w)=>{const E=!g,C=DE(w,g);return E?f[g]+d:C?f[g]+x:w[g+1][l]-b[l]}).map(gt)}return{slideSizes:f,slideSizesWithGaps:h,startGap:d,endGap:x}}function lU(e,t,r,n,i,a,o,l,c){const{startEdge:u,endEdge:d,direction:x}=e,f=BE(r);function h(y,b){return xd(y).filter(g=>g%b===0).map(g=>y.slice(g,g+b))}function m(y){return y.length?xd(y).reduce((b,g,w)=>{const E=Qn(b)||0,C=E===0,j=g===v0(y),S=i[u]-a[E][u],_=i[u]-a[g][d],O=!n&&C?x(o):0,I=!n&&j?x(l):0,B=gt(_-I-(S+O));return w&&B>t+c&&b.push(g),j&&b.push(y.length),b},[]).map((b,g,w)=>{const E=Math.max(w[g-1]||0);return y.slice(E,b)}):[]}function p(y){return f?h(y,r):m(y)}return{groupSlides:p}}function cU(e,t,r,n,i,a,o){const{align:l,axis:c,direction:u,startIndex:d,loop:x,duration:f,dragFree:h,dragThreshold:m,inViewThreshold:p,slidesToScroll:v,skipSnaps:y,containScroll:b,watchResize:g,watchSlides:w,watchDrag:E,watchFocus:C}=a,j=2,S=Hz(),_=S.measure(t),O=r.map(S.measure),I=zz(c,u),B=I.measureSize(_),T=Kz(B),k=Rz(l,B),$=!x&&!!b,W=x||!!b,{slideSizes:z,slideSizesWithGaps:L,startGap:F,endGap:U}=oU(I,_,O,r,W,i),D=lU(I,B,v,x,_,O,F,U,j),{snaps:N,snapsAligned:K}=Jz(I,k,_,O,D),R=-Qn(N)+Qn(L),{snapsContained:H,scrollContainLimit:X}=Yz(B,R,K,b,j),ie=$?H:K,{limit:se}=Zz(R,ie,x),ne=W3(v0(ie),d,x),ce=ne.clone(),ae=xd(r),Q=({dragHandler:ge,scrollBody:He,scrollBounds:wt,options:{loop:ze}})=>{ze||wt.constrain(ge.pointerDown()),He.seek()},he=({scrollBody:ge,translate:He,location:wt,offsetLocation:ze,previousLocation:br,scrollLooper:Dn,slideLooper:qt,dragHandler:No,animation:Rc,eventHandler:ws,scrollBounds:Do,options:{loop:Cs}},ln)=>{const or=ge.settled(),fm=!Do.shouldConstrain(),_e=Cs?or:or&&fm,Ke=_e&&!No.pointerDown();Ke&&Rc.stop();const et=wt.get()*ln+br.get()*(1-ln);ze.set(et),Cs&&(Dn.loop(ge.direction()),qt.loop()),He.to(ze.get()),Ke&&ws.emit("settle"),_e||ws.emit("scroll")},P=Lz(n,i,()=>Q(Et),ge=>he(Et,ge)),G=.68,Z=ie[ne.get()],V=pu(Z),M=pu(Z),Y=pu(Z),ee=pu(Z),te=Gz(V,Y,M,ee,f,G),J=tU(x,ie,R,se,ee),oe=rU(P,ne,ce,te,J,ee,o),pe=Qz(se),xe=hd(),ve=sU(t,r,o,p),{slideRegistry:Oe}=eU($,b,ie,X,D,ae),De=nU(e,r,Oe,oe,te,xe,o,C),Et={ownerDocument:n,ownerWindow:i,eventHandler:o,containerRect:_,slideRects:O,animation:P,axis:I,dragHandler:Uz(I,e,n,i,ee,Wz(I,i),V,P,oe,te,J,ne,o,T,h,m,y,G,E),eventStore:xe,percentOfView:T,index:ne,indexPrevious:ce,limit:se,location:V,offsetLocation:Y,previousLocation:M,options:a,resizeHandler:Vz(t,o,i,r,I,g,S),scrollBody:te,scrollBounds:qz(se,Y,ee,te,T),scrollLooper:Xz(R,se,Y,[V,Y,M,ee]),scrollProgress:pe,scrollSnapList:ie.map(pe.get),scrollSnaps:ie,scrollTarget:J,scrollTo:oe,slideLooper:iU(I,B,R,z,L,N,ie,Y,r),slideFocus:De,slidesHandler:aU(t,o,w),slidesInView:ve,slideIndexes:ae,slideRegistry:Oe,slidesToScroll:D,target:ee,translate:H3(I,t)};return Et}function uU(){let e={},t;function r(u){t=u}function n(u){return e[u]||[]}function i(u){return n(u).forEach(d=>d(t,u)),c}function a(u,d){return e[u]=n(u).concat([d]),c}function o(u,d){return e[u]=n(u).filter(x=>x!==d),c}function l(){e={}}const c={init:r,emit:i,off:o,on:a,clear:l};return c}const dU={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function xU(e){function t(a,o){return U3(a,o||{})}function r(a){const o=a.breakpoints||{},l=fd(o).filter(c=>e.matchMedia(c).matches).map(c=>o[c]).reduce((c,u)=>t(c,u),{});return t(a,l)}function n(a){return a.map(o=>fd(o.breakpoints||{})).reduce((o,l)=>o.concat(l),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:n}}function fU(e){let t=[];function r(a,o){return t=o.filter(({options:l})=>e.optionsAtMedia(l).active!==!1),t.forEach(l=>l.init(a,e)),o.reduce((l,c)=>Object.assign(l,{[c.name]:c}),{})}function n(){t=t.filter(a=>a.destroy())}return{init:r,destroy:n}}function Mf(e,t,r){const n=e.ownerDocument,i=n.defaultView,a=xU(i),o=fU(a),l=hd(),c=uU(),{mergeOptions:u,optionsAtMedia:d,optionsMediaQueries:x}=a,{on:f,off:h,emit:m}=c,p=I;let v=!1,y,b=u(dU,Mf.globalOptions),g=u(b),w=[],E,C,j;function S(){const{container:ae,slides:Q}=g;C=(wy(ae)?e.querySelector(ae):ae)||e.children[0];const P=wy(Q)?C.querySelectorAll(Q):Q;j=[].slice.call(P||C.children)}function _(ae){const Q=cU(e,C,j,n,i,ae,c);if(ae.loop&&!Q.slideLooper.canLoop()){const he=Object.assign({},ae,{loop:!1});return _(he)}return Q}function O(ae,Q){v||(b=u(b,ae),g=d(b),w=Q||w,S(),y=_(g),x([b,...w.map(({options:he})=>he)]).forEach(he=>l.add(he,"change",I)),g.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(ce),y.eventHandler.init(ce),y.resizeHandler.init(ce),y.slidesHandler.init(ce),y.options.loop&&y.slideLooper.loop(),C.offsetParent&&j.length&&y.dragHandler.init(ce),E=o.init(ce,w)))}function I(ae,Q){const he=D();B(),O(u({startIndex:he},ae),Q),c.emit("reInit")}function B(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),o.destroy(),l.clear()}function T(){v||(v=!0,l.clear(),B(),c.emit("destroy"),c.clear())}function k(ae,Q,he){!g.active||v||(y.scrollBody.useBaseFriction().useDuration(Q===!0?0:g.duration),y.scrollTo.index(ae,he||0))}function $(ae){const Q=y.index.add(1).get();k(Q,ae,-1)}function W(ae){const Q=y.index.add(-1).get();k(Q,ae,1)}function z(){return y.index.add(1).get()!==D()}function L(){return y.index.add(-1).get()!==D()}function F(){return y.scrollSnapList}function U(){return y.scrollProgress.get(y.offsetLocation.get())}function D(){return y.index.get()}function N(){return y.indexPrevious.get()}function K(){return y.slidesInView.get()}function R(){return y.slidesInView.get(!1)}function H(){return E}function X(){return y}function ie(){return e}function se(){return C}function ne(){return j}const ce={canScrollNext:z,canScrollPrev:L,containerNode:se,internalEngine:X,destroy:T,off:h,on:f,emit:m,plugins:H,previousScrollSnap:N,reInit:p,rootNode:ie,scrollNext:$,scrollPrev:W,scrollProgress:U,scrollSnapList:F,scrollTo:k,selectedScrollSnap:D,slideNo
656des:ne,slidesInView:K,slidesNotInView:R};return O(t,r),setTimeout(()=>c.emit("init"),0),ce}Mf.globalOptions=void 0;function FE(e={},t=[]){const r=A.useRef(e),n=A.useRef(t),[i,a]=A.useState(),[o,l]=A.useState(),c=A.useCallback(()=>{i&&i.reInit(r.current,n.current)},[i]);return A.useEffect(()=>{SE(r.current,e)||(r.current=e,c())},[e,c]),A.useEffect(()=>{$z(n.current,t)||(n.current=t,c())},[t,c]),A.useEffect(()=>{if(Tz()&&o){Mf.globalOptions=FE.globalOptions;const u=Mf(o,r.current,n.current);return a(u),()=>u.destroy()}else a(void 0)},[o,a]),[l,i]}FE.globalOptions=void 0;const hU="/assets/gallery-crowd-1-BQ4BH6bM.jpg",pU="/assets/gallery-band-1-DKCQmj0v.jpg",mU="/assets/gallery-singer-BY2XDkUr.jpg",gU="/assets/gallery-crowd-2-Cnwwfq_q.jpg",vU="/assets/gallery-guitarist-B-dV8Ety.jpg",m8=[{src:hU,alt:"Riesige Menschenmenge beim Spirit Festival bei Nacht"},{src:z3,alt:"Punk-Band live auf der Bühne mit Pyrotechnik"},{src:mU,alt:"Sängerin mit Irokesenfrisur reiÃt die Faust in die Luft"},{src:pU,alt:"Band mit Saxophon und Gitarren auf der Spirit Festival Bühne"},{src:gU,alt:"Crowdsurfing beim Spirit Festival â Sänger über der Menge"},{src:vU,alt:"Gitarrist auf der Spirit Festival Bühne"}];function yU(){const{t:e}=ii(),[t,r]=FE({loop:!0,align:"start",slidesToScroll:1}),[n,i]=A.useState(!1),[a,o]=A.useState(!0),[l,c]=A.useState(0),u=A.useCallback(()=>r==null?void 0:r.scrollPrev(),[r]),d=A.useCallback(()=>r==null?void 0:r.scrollNext(),[r]),x=A.useCallback(()=>{r&&(i(r.canScrollPrev()),o(r.canScrollNext()),c(r.selectedScrollSnap()))},[r]);return A.useEffect(()=>{if(!r)return;x(),r.on("select",x),r.on("reInit",x);let f;const h=()=>{f=setInterval(()=>r.scrollNext(),4e3)},m=()=>clearInterval(f);return h(),r.on("pointerDown",m),r.on("pointerUp",h),()=>{m(),r.off("select",x),r.off("reInit",x),r.off("pointerDown",m),r.off("pointerUp",h)}},[r,x]),s.jsx("section",{className:"py-20","aria-labelledby":"gallery-heading",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx(Ce,{children:s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("span",{className:"text-xs text-primary tracking-widest uppercase block mb-2 flex items-center justify-center gap-2",children:[s.jsx(b4,{size:12}),e("gallery.photoCredit")]}),s.jsx("h2",{className:"font-grunge text-5xl md:text-7xl",id:"gallery-heading",children:e("gallery.heading")}),s.jsx("div",{className:"w-24 h-0.5 bg-primary mx-auto mt-4 glow-primary"})]})}),s.jsxs("div",{className:"relative max-w-6xl mx-auto",children:[s.jsx("div",{className:"overflow-hidden rounded-2xl",ref:t,children:s.jsx("div",{className:"flex gap-4",children:m8.map((f,h)=>s.jsx("div",{className:"flex-[0_0_80%] sm:flex-[0_0_55%] md:flex-[0_0_42%] min-w-0",children:s.jsxs("div",{className:"relative overflow-hidden rounded-2xl border border-border group aspect-[4/3]",children:[s.jsx("img",{src:f.src,alt:f.alt,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105",loading:"lazy"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]})},h))})}),s.jsx("button",{onClick:u,disabled:!n,className:"absolute left-2 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full glass border border-border flex items-center justify-center text-foreground hover:border-primary/50 hover:text-primary transition-all disabled:opacity-30 disabled:pointer-events-none z-10","aria-label":"Vorheriges Bild",children:s.jsx(yT,{size:20})}),s.jsx("button",{onClick:d,disabled:!a,className:"absolute right-2 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full glass border border-border flex items-center justify-center text-foreground hover:border-primary/50 hover:text-primary transition-all disabled:opacity-30 disabled:pointer-events-none z-10","aria-label":"Nächstes Bild",children:s.jsx(zl,{size:20})}),s.jsx("div",{className:"flex justify-center gap-2 mt-6",children:m8.map((f,h)=>s.jsx("button",{onClick:()=>r==null?void 0:r.scrollTo(h),className:`w-2 h-2 rounded-full transition-all duration-300 ${h===l?"bg-primary w-6 glow-primary":"bg-muted-foreground
656/30 hover:bg-muted-foreground/50"}`,"aria-label":`Bild ${h+1}`},h))})]})]})})}const Yx="/assets/gelaendeplan-Cn0-Odw2.png";function bU(){const{t:e}=ii();return s.jsx("section",{className:"py-20 bg-card/30 border-y border-border","aria-labelledby":"gelaendeplan-heading",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx(Ce,{children:s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-2",children:e("map.subtitle")}),s.jsx("h2",{className:"font-grunge text-5xl md:text-7xl",id:"gelaendeplan-heading",children:e("map.heading")}),s.jsx("div",{className:"w-24 h-0.5 bg-primary mx-auto mt-4 glow-primary"}),s.jsx("p",{className:"text-muted-foreground mt-4 text-sm max-w-lg mx-auto",children:e("map.description")})]})}),s.jsxs(Ce,{delay:100,children:[s.jsx("div",{className:"max-w-2xl mx-auto rounded-2xl overflow-hidden border border-border shadow-2xl shadow-black/60",children:s.jsx("img",{src:Yx,alt:"Geländeplan Spirit Festival â Mainstage, Stage II, Camping Areas IâIII, Biergarten, Einlass, Parkplätze und Sanitäranlagen",className:"w-full h-auto",loading:"lazy"})}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-3 mt-6",children:[s.jsxs(we,{to:"/lageplan",className:"inline-flex items-center gap-2 px-6 py-3 bg-primary text-primary-foreground rounded-xl font-bold hover:opacity-90 transition-opacity glow-primary",children:[s.jsx(_r,{size:16}),e("map.openFull")]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Festwiesen, 39279 Loburg bei Magdeburg"})]})]})]})})}function EU(){const{t:e}=ii();return s.jsx("section",{id:"newsletter",className:"py-20 bg-primary/5 border-y border-primary/20","aria-labelledby":"newsletter-heading",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsx(Ce,{children:s.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-2",children:e("footer.newsletterSub")}),s.jsx("h2",{className:"font-grunge text-5xl md:text-6xl mb-4",id:"newsletter-heading",children:e("footer.newsletterHeading")}),s.jsx("p",{className:"text-muted-foreground mb-8",children:e("footer.newsletterSub")}),s.jsxs("form",{onSubmit:t=>t.preventDefault(),className:"flex flex-col sm:flex-row gap-3","aria-label":e("footer.newsletterHeading"),children:[s.jsx("input",{type:"email",placeholder:e("footer.newsletterPlaceholder"),required:!0,className:"flex-1 bg-background border border-border rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50","aria-label":e("footer.newsletterPlaceholder")}),s.jsx("button",{type:"submit",className:"px-6 py-3 bg-primary text-primary-foreground rounded-xl font-bold hover:opacity-90 transition-opacity glow-primary whitespace-nowrap",children:e("footer.subscribe")})]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-3",children:s.jsx(we,{to:"/datenschutz",className:"text-primary hover:underline",children:e("footer.legalLinks.datenschutz")})})]})})})})}function wU(){return s.jsxs("main",{id:"main-content",children:[s.jsx(vz,{}),s.jsx(bz,{}),s.jsx(Ez,{}),s.jsx(Fz,{}),s.jsx(Pz,{}),s.jsx(yU,{}),s.jsx(bU,{}),s.jsx(EU,{})]})}var hi=function(){return hi=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},hi.apply(this,arguments)};function Ac(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function CU(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function l(d){try{u(n.next(d))}catch(x){o(x)}}function c(d){try{u(n.throw(d))}catch(x){o(x)}}function u(d){d.done?a(d.value):i(d.value).then(l,c)}u((n=n.apply(e,t||[])).next())})}function AU(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}const jU=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);
656class PE extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class kU extends PE{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class g8 extends PE{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class v8 extends PE{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Ay;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Ay||(Ay={}));class _U{constructor(t,{headers:r={},customFetch:n,region:i=Ay.Any}={}){this.url=t,this.headers=r,this.region=i,this.fetch=jU(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return CU(this,arguments,void 0,function*(r,n={}){var i;let a,o;try{const{headers:l,method:c,body:u,signal:d,timeout:x}=n;let f={},{region:h}=n;h||(h=this.region);const m=new URL(`${this.url}/${r}`);h&&h!=="any"&&(f["x-region"]=h,m.searchParams.set("forceFunctionRegion",h));let p;u&&(l&&!Object.prototype.hasOwnProperty.call(l,"Content-Type")||!l)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",p=u):typeof u=="string"?(f["Content-Type"]="text/plain",p=u):typeof FormData<"u"&&u instanceof FormData?p=u:(f["Content-Type"]="application/json",p=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?p=JSON.stringify(u):p=u;let v=d;x&&(o=new AbortController,a=setTimeout(()=>o.abort(),x),d?(v=o.signal,d.addEventListener("abort",()=>o.abort())):v=o.signal);const y=yield this.fetch(m.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),l),body:p,signal:v}).catch(E=>{throw new kU(E)}),b=y.headers.get("x-relay-error");if(b&&b==="true")throw new g8(y);if(!y.ok)throw new v8(y);let g=((i=y.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),w;return g==="application/json"?w=yield y.json():g==="application/octet-stream"||g==="application/pdf"?w=yield y.blob():g==="text/event-stream"?w=y:g==="multipart/form-data"?w=yield y.formData():w=yield y.text(),{data:w,error:null,response:y}}catch(l){return{data:null,error:l,response:l instanceof v8||l instanceof g8?l.context:void 0}}finally{a&&clearTimeout(a)}})}}var SU=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
656de=e.code}},BU=class{constructor(e){var t,r,n;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(n=e.urlLengthLimit)!==null&&n!==void 0?n:8e3,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var r=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const n=this.fetch;let i=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async a=>{let o=null,l=null,c=null,u=a.status,d=a.statusText;if(a.ok){var x,f;if(r.method!=="HEAD"){var h;const y=await a.text();y===""||(r.headers.get("Accept")==="text/csv"||r.headers.get("Accept")&&(!((h=r.headers.get("Accept"))===null||h===void 0)&&h.includes("application/vnd.pgrst.plan+text"))?l=y:l=JSON.parse(y))}const p=(x=r.headers.get("Prefer"))===null||x===void 0?void 0:x.match(/count=(exact|planned|estimated)/),v=(f=a.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");p&&v&&v.length>1&&(c=parseInt(v[1])),r.isMaybeSingle&&r.method==="GET"&&Array.isArray(l)&&(l.length>1?(o={code:"PGRST116",details:`Results contain ${l.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},l=null,c=null,u=406,d="Not Acceptable"):l.length===1?l=l[0]:l=null)}else{var m;const p=await a.text();try{o=JSON.parse(p),Array.isArray(o)&&a.status===404&&(l=[],o=null,u=200,d="OK")}catch{a.status===404&&p===""?(u=204,d="No Content"):o={message:p}}if(o&&r.isMaybeSingle&&(!(o==null||(m=o.details)===null||m===void 0)&&m.includes("0 rows"))&&(o=null,u=200,d="OK"),o&&r.shouldThrowOnError)throw new SU(o)}return{error:o,data:l,count:c,status:u,statusText:d}});return this.shouldThrowOnError||(i=i.catch(a=>{var o;let l="",c="",u="";const d=a==null?void 0:a.cause;if(d){var x,f,h,m;const y=(x=d==null?void 0:d.message)!==null&&x!==void 0?x:"",b=(f=d==null?void 0:d.code)!==null&&f!==void 0?f:"";l=`${(h=a==null?void 0:a.name)!==null&&h!==void 0?h:"FetchError"}: ${a==null?void 0:a.message}`,l+=` 657 658Caused by: ${(m=d==null?void 0:d.name)!==null&&m!==void 0?m:"Error"}: ${y}`,b&&(l+=` (${b})`),d!=null&&d.stack&&(l+=` 659${d.stack}`)}else{var p;l=(p=a==null?void 0:a.stack)!==null&&p!==void 0?p:""}const v=this.url.toString().length;return(a==null?void 0:a.name)==="AbortError"||(a==null?void 0:a.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",v>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${v} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",v>this.urlLengthLimit&&(c+=`. Your request URL is ${v} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{error:{message:`${(o=a==null?void 0:a.name)!==null&&o!==void 0?o:"FetchError"}: ${a==null?void 0:a.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}})),i.then(e,t)}returns(){return this}overrideTypes(){return this}},NU=class extends BU{select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:i=n}={}){const a=i?`${i}.order`:"order",o=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const i=typeof n>"u"?"offset":`${n}.offset`,a=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(a,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
659explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:i=!1,format:a="text"}={}){var o;const l=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,i?"wal":null].filter(Boolean).join("|"),c=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${a}; for="${c}"; options=${l};`),a==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const y8=new RegExp("[,()]");var Ko=class extends NU{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&y8.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&y8.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let i="";n==="plain"?i="pl":n==="phrase"?i="ph":n==="websearch"&&(i="w");const a=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${i}fts${a}.${t}`),this}match(e){return Object.entries(e).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},DU=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:i=8e3}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},i=r?"HEAD":"GET";let a=!1;const o=(e??"*").split("").map(u=>/\s/.test(u)&&!a?"":(u==='"'&&(a=!a),u)).join(""),{url:l,headers:c}=this.cloneRequestState();return l.searchParams.set("select",o),n&&c.append("Prefer",`count=${n}`),new Ko({method:i,url:l,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const i="POST",{url:a,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),r||o.append("Prefer","missing=default"),Array.isArray(e)){const l=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(l.length>0){const c=[...new Set(l)].map(u=>`"${u}"`);a.searchParams.set("columns",c.join(","))}}return new Ko({method:i,url:a,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:i=!0}={}){var a;const o="POST",{url:l,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&l.searchParams.set("on_conflict",t),n&&c.append("Prefer",`count=${n}`),i||c.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((d,x)=>d.concat(Object.keys(x)),[]);if(u.length>0){const d=[...new Set(u)].map(x=>`"${x}"`);l.searchParams.set("columns",d.join(","))}}return new Ko({method:o,url:l,headers:c,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit})}update(e,{count:t}={}){var r;const n="PATCH",{url:i,headers:a}=this.cloneRequestState();return t&&a.append("Prefer",`count=${t}`),new Ko({method:n,url:i,headers:a,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new Ko({method:r,url:n,headers:i,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit})}};function pd(e){"@babel/helpers - typeof";return pd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pd(e)}function FU(e,t){if(pd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(pd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function PU(e){var t=FU(e,"string");return pd(t)=="symbol"?t:t+""}function OU(e,t,r){return(t=PU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ex(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
659t%2?b8(Object(r),!0).forEach(function(n){OU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b8(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var TU=class K3{constructor(t,{headers:r={},schema:n,fetch:i,timeout:a,urlLengthLimit:o=8e3}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const l=i??globalThis.fetch;a!==void 0&&a>0?this.fetch=(c,u)=>{const d=new AbortController,x=setTimeout(()=>d.abort(),a),f=u==null?void 0:u.signal;if(f){if(f.aborted)return clearTimeout(x),l(c,u);const h=()=>{clearTimeout(x),d.abort()};return f.addEventListener("abort",h,{once:!0}),l(c,ex(ex({},u),{},{signal:d.signal})).finally(()=>{clearTimeout(x),f.removeEventListener("abort",h)})}return l(c,ex(ex({},u),{},{signal:d.signal})).finally(()=>clearTimeout(x))}:this.fetch=l}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new DU(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(t){return new K3(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(t,r={},{head:n=!1,get:i=!1,count:a}={}){var o;let l;const c=new URL(`${this.url}/rpc/${t}`);let u;const d=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(d)),x=n&&Object.values(r).some(d);x?(l="POST",u=r):n||i?(l=n?"HEAD":"GET",Object.entries(r).filter(([h,m])=>m!==void 0).map(([h,m])=>[h,Array.isArray(m)?`{${m.join(",")}}`:`${m}`]).forEach(([h,m])=>{c.searchParams.append(h,m)})):(l="POST",u=r);const f=new Headers(this.headers);return x?f.set("Prefer",a?`count=${a},return=minimal`:"return=minimal"):a&&f.set("Prefer",`count=${a}
659`),new Ko({method:l,url:c,headers:f,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit})}};class $U{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const r=globalThis.process;if(r){const n=r.versions;if(n&&n.node){const i=n.node,a=parseInt(i.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 660import ws from "ws" 661new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=` 662 663Suggested solution: ${t.workaround}`),new Error(r)}static createWebSocket(t,r){const n=this.getWebSocketConstructor();return new n(t,r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const IU="2.97.0",MU=`realtime-js/${IU}`,RU="1.0.0",V3="2.0.0",E8=V3,jy=1e4,LU=1e3,zU=100;var Ba;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Ba||(Ba={}));var Lt;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Lt||(Lt={}));var Kn;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Kn||(Kn={}));var ky;(function(e){e.websocket="websocket"})(ky||(ky={}));var Is;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(Is||(Is={}));class UU{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const i=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,i)}_encodeJsonUserBroadcastPush(t){var r,n;const i=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(i)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,r,n){var i,a;const o=t.topic,l=(i=t.ref)!==null&&i!==void 0?i:"",c=(a=t.join_ref)!==null&&a!==void 0?a:"",u=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},x=Object.keys(d).length===0?"":JSON.stringify(d);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(x.length>255)throw new Error(`metadata length ${x.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+l.length+o.length+u.length+x.length,h=new ArrayBuffer(this.HEADER_LENGTH+f);
663let m=new DataView(h),p=0;m.setUint8(p++,this.KINDS.userBroadcastPush),m.setUint8(p++,c.length),m.setUint8(p++,l.length),m.setUint8(p++,o.length),m.setUint8(p++,u.length),m.setUint8(p++,x.length),m.setUint8(p++,r),Array.from(c,y=>m.setUint8(p++,y.charCodeAt(0))),Array.from(l,y=>m.setUint8(p++,y.charCodeAt(0))),Array.from(o,y=>m.setUint8(p++,y.charCodeAt(0))),Array.from(u,y=>m.setUint8(p++,y.charCodeAt(0))),Array.from(x,y=>m.setUint8(p++,y.charCodeAt(0)));var v=new Uint8Array(h.byteLength+n.byteLength);return v.set(new Uint8Array(h),0),v.set(new Uint8Array(n),h.byteLength),v.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[i,a,o,l,c]=n;return r({join_ref:i,ref:a,topic:o,event:l,payload:c})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),i=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,i)}}_decodeUserBroadcast(t,r,n){const i=r.getUint8(1),a=r.getUint8(2),o=r.getUint8(3),l=r.getUint8(4);let c=this.HEADER_LENGTH+4;const u=n.decode(t.slice(c,c+i));c=c+i;const d=n.decode(t.slice(c,c+a));c=c+a;const x=n.decode(t.slice(c,c+o));c=c+o;const f=t.slice(c,t.byteLength),h=l===this.JSON_ENCODING?JSON.parse(n.decode(f)):f,m={type:this.BROADCAST_EVENT,event:d,payload:h};return o>0&&(m.meta=JSON.parse(x)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:m}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}class G3{constructor(t,r){this.callback=t,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var tt;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(tt||(tt={}));const w8=(e,t,r={})=>{var n;const i=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((a,o)=>(a[o]=WU(o,e,t,i),a),{}):{}},WU=(e,t,r,n)=>{const i=t.find(l=>
663l.name===e),a=i==null?void 0:i.type,o=r[e];return a&&!n.includes(a)?q3(a,o):_y(o)},q3=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return GU(t,r)}switch(e){case tt.bool:return HU(t);case tt.float4:case tt.float8:case tt.int2:case tt.int4:case tt.int8:case tt.numeric:case tt.oid:return KU(t);case tt.json:case tt.jsonb:return VU(t);case tt.timestamp:return qU(t);case tt.abstime:case tt.date:case tt.daterange:case tt.int4range:case tt.int8range:case tt.money:case tt.reltime:case tt.text:case tt.time:case tt.timestamptz:case tt.timetz:case tt.tsrange:case tt.tstzrange:return _y(t);default:return _y(t)}},_y=e=>e,HU=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},KU=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},VU=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},GU=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let a;const o=e.slice(1,r);try{a=JSON.parse("["+o+"]")}catch{a=o?o.split(","):[]}return a.map(l=>q3(t,l))}return e},qU=e=>typeof e=="string"?e.replace(" ","T"):e,Y3=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class ng{constructor(t,r,n={},i=jy){this.channel=t,this.event=r,this.payload=n,this.timeout=i,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,r){var n;return this._hasReceived(t)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:t,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(r))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var C8;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(C8||(C8={}));class Pu{constructor(t,r){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},i=>{const{onJoin:a,onLeave:o,onSync:l}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Pu.syncState(this.state,i,a,o),this.pendingDiffs.forEach(c=>{this.state=Pu.syncDiff(this.state,c,a,o)}),this.pendingDiffs=[],l()}),this.channel._on(n.diff,{},i=>{const{onJoin:a,onLeave:o,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Pu.syncDiff(this.state,i,a,o),l())}),this.onJoin((i,a,o)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:a,newPresences:o})}),this.onLeave((i,a,o)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:a,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,r,n,i){const a=this.cloneDeep(t),o=this.transformState(r),l={},c={};return this.map(a,(u,d)=>{o[u]||(c[u]=d)}),this.map(o,(u,d)=>{const x=a[u];if(x){const f=d.map(v=>v.presence_ref),h=x.map(v=>v.presence_ref),m=d.filter(v=>h.indexOf(v.presence_ref)<0),p=x.filter(v=>f.indexOf(v.presence_ref)<0);m.length>0&&(l[u]=m),p.length>0&&(c[u]=p)}else l[u]=d}),this.syncDiff(a,{joins:l,leaves:c},n,i)}static syncDiff(t,r,n,i){const{joins:a,leaves:o}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),i||(i=()=>{}),this.map(a,(l,c)=>{var u;
663const d=(u=t[l])!==null&&u!==void 0?u:[];if(t[l]=this.cloneDeep(c),d.length>0){const x=t[l].map(h=>h.presence_ref),f=d.filter(h=>x.indexOf(h.presence_ref)<0);t[l].unshift(...f)}n(l,d,c)}),this.map(o,(l,c)=>{let u=t[l];if(!u)return;const d=c.map(x=>x.presence_ref);u=u.filter(x=>d.indexOf(x.presence_ref)<0),t[l]=u,i(l,u,c),u.length===0&&delete t[l]}),t}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const i=t[n];return"metas"in i?r[n]=i.metas.map(a=>(a.presence_ref=a.phx_ref,delete a.phx_ref,delete a.phx_ref_prev,a)):r[n]=i,r},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var A8;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(A8||(A8={}));var Ou;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Ou||(Ou={}));var $i;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})($i||($i={}));class ol{constructor(t,r={config:{}},n){var i,a;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.state=Lt.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new ng(this,Kn.join,this.params,this.timeout),this.rejoinTimer=new G3(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Lt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(o=>o.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Lt.closed,this.socket._remove(this)}),this._onError(o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Lt.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Lt.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Lt.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Kn.reply,{},(o,l)=>{this._trigger(this._replyEventName(l),o)}),this.presence=new Pu(this),this.broadcastEndpointURL=Y3(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((a=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||a===void 0)&&a.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,i,a;if(this.socket.isConnected()||this.socket.connect(),this.state==Lt.closed){const{config:{broadcast:o,presence:l,private:c}}=this.params,u=(i=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(h=>h.filter))!==null&&i!==void 0?i:[],d=!!this.bindings[Ou.PRESENCE]&&this.bindings[Ou.PRESENCE].length>0||((a=this.params.config.presence)===null||a===void 0?void 0:a.enabled)===!0,x={},f={broadcast:o,presence:Object.assign(Object.assign({},l),{enabled:d}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(x.access_token=this.socket.accessTokenValue),this._onError(h=>t==null?void 0:t($i.CHANNEL_ERROR,h)),this._onClose(()=>t==null?void 0:t($i.CLOSED)),this.updateJoinPayload(Object.assign({config:f},x)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:h})=>{var m;if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){t==null||t($i.SUBSCRIBED);return}else{const p=this.bindings.postgres_changes,v=(m=p==null?void 0:p.length)!==null&&m!==void 0?m:0,y=[];for(let b=0;b<v;b++){const g=p[b],{filter:{event:w,schema:E,table:C,filter:j}}=g,S=h&&h[b];if(S&&S.event===w&&ol.isFilterValueEqual(S.schema,E)&&ol.isFilterValueEqual(S.table,C)&&ol.isFilterValueEqual(S.filter,j))y.push(Object.assign(Object.assign({},g),{id:S.id}));else{this.unsubscribe(),this.state=Lt.errored,t==null||t($i.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=y,t&&t($i.SUBSCRIBED);return}}).receive("error",h=>{this.state=Lt.errored,t==null||t($i.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{t==null||t($i.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){return this.state===Lt.joined&&t===Ou.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,r,n)}async httpSend(t,r,n={}){var i;if(r==null)return Promise.reject("Payload is required for httpSend()");const a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},l=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(i=n.timeout)!==null&&i!==void 0?i:this.timeout);if(l.status===202)return{success:!0};let c=l.statusText;
663try{const u=await l.json();c=u.error||u.message||c}catch{}return Promise.reject(new Error(c))}async send(t,r={}){var n,i;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:a,payload:o}=t,l={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(l.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:l,body:JSON.stringify({messages:[{topic:this.subTopic,event:a,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((i=u.body)===null||i===void 0?void 0:i.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var o,l,c;const u=this._push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(o=this.params)===null||o===void 0?void 0:o.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&a("ok"),u.receive("ok",()=>a("ok")),u.receive("error",()=>a("error")),u.receive("timeout",()=>a("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Lt.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Kn.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(i=>{n=new ng(this,Kn.leave,{},t),n.receive("ok",()=>{r(),i("ok")}).receive("timeout",()=>{r(),i("timed out")}).receive("error",()=>{i("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Lt.closed,this.bindings={}}async _fetchWithTimeout(t,r,n){const i=new AbortController,a=setTimeout(()=>i.abort(),n),o=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:i.signal}));return clearTimeout(a),o}_push(t,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i=new ng(this,t,r,n);return this._canPush()?i.send():this._addToPushBuffer(i),i}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>zU){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(t,r,n){return r}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,r,n){var i,a;const o=t.toLocaleLowerCase(),{close:l,error:c,leave:u,join:d}=Kn;if(n&&[l,c,u,d].indexOf(o)>=0&&n!==this._joinRef())return;let f=this._onMessage(o,r,n);if(r&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(h=>{var m,p,v;return((m=h.filter)===null||m===void 0?void 0:m.event)==="*"||((v=(p=h.filter)===null||p===void 0?void 0:p.event)===null||v===void 0?void 0:v.toLocaleLowerCase())===o}).map(h=>h.callback(f,n)):(a=this.bindings[o])===null||a===void 0||a.filter(h=>{var m,p,v,y,b,g;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in h){const w=h.id,E=(m=h.filter)===null||m===void 0?void 0:m.event;return w&&((p=r.ids)===null||p===void 0?void 0:p.includes(w))&&(E==="*"||(E==null?void 0:E.toLocaleLowerCase())===((v=r.data)===null||v===void 0?void 0:v.type.toLocaleLowerCase()))}else{const w=(b=(y=h==null?void 0:h.filter)===null||y===void 0?void 0:y.event)===null||b===void 0?void 0:b.toLocaleLowerCase();return w==="*"||w===((g=r==null?void 0:r.event)===null||g===void 0?void 0:g.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===o}).map(h=>{if(typeof f=="object"&&"ids"in f){const m=f.data,{schema:p,table:v,commit_timestamp:y,type:b,errors:g}=m;f=Object.assign(Object.assign({},{schema:p,table:v,commit_timestamp:y,eventType:b,new:{},old:{},errors:g}),this._getPayloadRecords(m))}h.callback(f,n)})}_isClosed(){return this.state===Lt.closed}_isJoined(){return this.state===Lt.joined}_isJoining(){return this.state===Lt.joining}_isLeaving(){return this.state===Lt.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,r,n){const i=t.toLocaleLowerCase(),a={type:i,filter:r,callback:n};return this.bindings[i]?this.bindings[i].push(a):this.bindings[i]=[a],this}_off(t,r){const n=t.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(i=>{var a;return!(((a=i.type)===null||a===void 0?void 0:a.toLocaleLowerCase())===n&&ol.isEqual(i.filter,r))})),this}static isEqual(t,r){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(const n in t)if(t[n]!==r[n])return!1;return!0}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Kn.close,{},t)}_onError(t){this._on(Kn.error,{},r=>t(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Lt.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=w8(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=w8(t.columns,t.old_record)),r}}const ig=()=>{},tx={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},YU=[1e3,2e3,5e3,1e4],ZU=1e4,XU=` 664 addEventListener("message", (e) => { 665 if (e.data.event === "start") { 666 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 667 } 668 });`;class QU{constructor(t,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=jy,this.transport=null,this.heartbeatIntervalMs=tx.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=ig,this.ref=0,this.reconnectTimer=null,this.vsn=E8,this.logger=ig,this.conn=null,this.sendBuffer=[],this.serializer
668=new UU,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=i=>i?(...a)=>i(...a):(...a)=>fetch(...a),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey,this.endPoint=`${t}/${ky.websocket}`,this.httpEndpoint=Y3(t),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=$U.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const r=t.message;throw r.includes("Node.js")?new Error(`${r} 669 670To use Realtime in Node.js, you need to provide a WebSocket implementation: 671 672Option 1: Use Node.js 22+ which has native WebSocket support 673Option 2: Install and provide the "ws" package: 674 675 npm install ws 676 677 import ws from "ws" 678 const client = new RealtimeClient(url, { 679 ...options, 680 transport: ws 681 })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,r??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,r,n){this.logger(t,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case Ba.connecting:return Is.Connecting;case Ba.open:return Is.Open;case Ba.closing:return Is.Closing;default:return Is.Closed}}isConnected(){return this.connectionState()===Is.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,r={config:{}}){const n=`realtime:${t}`,i=this.getChannels().find(a=>a.topic===n);if(i)return i;{const a=new ol(`realtime:${t}`,r,this);return this.channels.push(a),a}}push(t){const{topic:r,event:n,payload:i,ref:a}=t,o=()=>{this.encode(t,l=>{var c;(c=this.conn)===null||c===void 0||c.send(l)})};this.log("push",`${r} ${n} (${a})`,i),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(LU,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
vendor: 3,886 bytes, line 681
681heduleTimeout()},tx.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let r=this.channels.find(n=>n.topic===t&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${t}"`),r.unsubscribe())}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply"&&r.ref&&r.ref===this.pendingHeartbeatRef){const u=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error",u)}catch(d){this.log("error","error in heartbeat callback",d)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:n,event:i,payload:a,ref:o}=r,l=o?`(${o})`:"",c=a.status||"";this.log("receive",`${c} ${n} ${i} ${l}`.trim(),a),this.channels.filter(u=>u._isMember(n)).forEach(u=>u._trigger(i,a,o)),this._triggerStateCallbacks("message",r)})}_clearTimer(t){var r;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===Ba.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===Ba.open||this.conn.readyState===Ba.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(r=>{this.log("error","error waiting for auth on connect",r),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(t){var r;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.sc
681heduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t);try{this.heartbeatCallback("error")}catch(r){this.log("error","error in heartbeat callback",r)}}_triggerChanError(){this.channels.forEach(t=>t._trigger(Kn.error))}_appendParams(t,r){if(Object.keys(r).length===0)return t;const n=t.match(/\?/)?"&":"?",i=new URLSearchParams(r);return`${t}${n}${i}`}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([XU],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(t,r=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(i){this.log("error","Error fetching access token from callback",i),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(i=>{const a={access_token:r,version:MU};r&&i.updateJoinPayload(a),i.joinedOnce&&i._isJoined()&&i._push(Kn.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_triggerStateCallbacks(t,r){try{this.stateChangeCallbacks[t].forEach(n=>{try{n(r)}catch(i){this.log("error",`error in ${t} callback`,i)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new G3(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},tx.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var r,n,i,a,o,l,c,u,d,x,f,h;switch(this.transport=(r=t==null?void 0:t.transport)!==null&&r!==void 0?r:null,this.timeout=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:jy,this.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:tx.HEARTBEAT_INTERVAL,this.worker=(a=t==null?void 0:t.worker)!==null&&a!==void 0?a:!1,this.accessToken=(o=t==null?void 0:t.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(l=t==null?void 0:t.heartbeatCallback)!==null&&l!==void 0?l:ig,this.vsn=(c=t==null?void 0:t.vsn)!==null&&c!==void 0?c:E8,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:m=>YU[m-1]||ZU,this.vsn){case RU:this.encode=(d=t==null?void 0:t.encode)!==null&&d!==void 0?d:(m,p)=>p(JSON.stringify(m)),this.decode=(x=t==null?void 0:t.decode)!==null&&x!==void 0?x:(m,p)=>p(JSON.parse(m));break;case V3:this.encode=(f=t==null?void 0:t.encode)!==null&&f!==void 0?f:this.serializer.encode.bind(this.serializer),this.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var md=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function JU(e,t,r){const n=new URL(t,e);if(r)for(const[i,a]of Object.entries(r))a!==void 0&&n.searchParams.set(i,a);return n.toString()}async function eW(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function tW(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:i,body:a,headers:o}){const l=JU(e.baseUrl,n,i),c=await eW(e.auth),u=await t(l,{method:r,headers:{...a?{"Content-Type":"application/json"}:{},...c,...o},body:a?JSON.stringify(a):void 0}),d=await u.text(),x=(u.headers.get("content-type")||"").includes("application/json"),f=x&&d?JSON.parse(d):d;if(!u.ok){const h=x?f:void 0,m=h==null?void 0:h.error;throw new md((m==null?void 0:m.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:m==null?void 0:m.type,icebergCode:m==null?void 0:m.code,details:h})}return{status:u.status,headers:u.headers,data:f}}}}function rx(e){return e.join("�")}var rW=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:rx(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${rx(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${rx(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${rx(e.namespace)}`}),!0}catch(t){if(t instanceof md&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof md&&r.status===409)return;throw r}}};function Po(e){return e.join("�")}var nW=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Po(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Po(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Po(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Po(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Po(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Po(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof md&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof md&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},iW=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=tW({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new rW(this.client,t),this.tableOps=new nW(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
681async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},wp=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}};function Cp(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var nx=class extends wp{constructor(e,t,r,n="storage"){super(e,n,t,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},Z3=class extends wp{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const aW=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),sW=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Sy=e=>{if(Array.isArray(e))return e.map(r=>Sy(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const i=r.replace(/([-_][a-z])/gi,a=>a.toUpperCase().replace(/[-_]/g,""));t[i]=Sy(n)}),t},oW=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function gd(e){"@babel/helpers - typeof";return gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gd(e)}function lW(e,t){if(gd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(gd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cW(e){var t=lW(e,"string");return gd(t)=="symbol"?t:t+""}function uW(e,t,r){return(t=cW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j8(Object(r),!0).forEach(function(n){uW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j8(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const k8=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},dW=async(e,t,r,n)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(r!=null&&r.noResolveJson)){const i=e,a=i.status||500;if(typeof i.json=="function")i.json().then(o=>{const l=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||a+"";t(new nx(k8(o),a,l,n))}).catch(()=>{if(n==="vectors"){const o=a+"";t(new nx(i.statusText||`HTTP ${a} error`,a,o,n))}else{const o=a+"";t(new nx(i.statusText||`HTTP ${a} error`,a,o,n))}});else{const o=a+"";t(new nx(i.statusText||`HTTP ${a} error`,a,o,n))}}else t(new Z3(k8(e),e,n))},xW=(e,t,r,n)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||e==="HEAD"||!n?Ae(Ae({},i),r):(sW(n)?(i.headers=Ae({"Content-Type":"application/json"},t==null?void 0:t.headers),i.body=JSON.stringify(n)):i.body=n,t!=null&&t.duplex&&(i.duplex=t.duplex),Ae(Ae({},i),r))};async function Xc(e,t,r,n,i,a,o){return new Promise((l,c)=>{e(r,xW(t,n,i,a)).then(u=>{if(!u.ok)throw u;if(n!=null&&n.noResolveJson)return u;if(o==="vectors"){const d=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!d||!d.includes("application/json"))return{}}return u.json()}).then(u=>l(u)).catch(u=>dW(u,c,n,o))})}function X3(e="storage"){return{get:async(t,r,n,i)=>Xc(t,"GET",r,n,i,void 0,e),post:async(t,r,n,i,a)=>Xc(t,"POST",r,i,a,n,e),put:async(t,r,n,i,a)=>Xc(t,"PUT",r,i,a,n,e),head:async(t,r,n,i)=>Xc(t,"HEAD",r,Ae(Ae({},n),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,r,n,i,a)=>Xc(t,"DELETE",r,i,a,n,e)}}const fW=X3("storage"),{get:vd,post:zn,put:By,head:hW,remove:OE}=fW,Qr=X3("vectors");var jc=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.fetch=aW(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Ae(Ae({},this.headers),{},{[e]:t}),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Cp(r))return{data:null,error:r};throw r}}},pW=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Cp(t))return{data:null,error:t};throw t}}};let Q3;Q3=Symbol.toStringTag;var mW=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Q3]="BlobDownloadBuilder",this.promise=null}asStream(){return new pW(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Cp(t))return{data:null,error:t};throw t}}};const gW={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},_8={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var vW=class extends jc{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,n){var i=this;return i.handleOperation(async()=>{let a;const o=Ae(Ae({},_8),n);let l=Ae(Ae({},i.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const c=o.metadata;typeof Blob<"u"&&r instanceof Blob?(a=new FormData,a.append("cacheControl",o.cacheControl),c&&a.append("metadata",i.encodeMetadata(c)),a.append("",r)):typeof FormData<"u"&&r instanceof FormData?(a=r,a.has("cacheControl")||a.append("cacheControl",o.cacheControl),c&&!a.has("metadata")&&a.append("metadata",i.encodeMetadata(c))):(a=r,l["cache-control"]=`max-age=${o.cacheControl}`,l["content-type"]=o.contentType,c&&(l["x-metadata"]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<"u"&&a
681instanceof ReadableStream||a&&typeof a=="object"&&"pipe"in a&&typeof a.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers&&(l=Ae(Ae({},l),n.headers));const u=i._removeEmptyFolders(t),d=i._getFinalPath(u),x=await(e=="PUT"?By:zn)(i.fetch,`${i.url}/object/${d}`,a,Ae({headers:l},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:x.Id,fullPath:x.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var i=this;const a=i._removeEmptyFolders(e),o=i._getFinalPath(a),l=new URL(i.url+`/object/upload/sign/${o}`);return l.searchParams.set("token",t),i.handleOperation(async()=>{let c;const u=Ae({upsert:_8.upsert},n),d=Ae(Ae({},i.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.append("cacheControl",u.cacheControl)):(c=r,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType),{path:a,fullPath:(await By(i.fetch,l.toString(),c,{headers:d})).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const i=Ae({},r.headers);t!=null&&t.upsert&&(i["x-upsert"]="true");const a=await zn(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:i}),o=new URL(r.url+a.url),l=o.searchParams.get("token");if(!l)throw new wp("No token returned by API");return{signedUrl:o.toString(),path:e,token:l}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;return n.handleOperation(async()=>await zn(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
681stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await zn(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(e,t,r){var n=this;return n.handleOperation(async()=>{let i=n._getFinalPath(e),a=await zn(n.fetch,`${n.url}/object/sign/${i}`,Ae({expiresIn:t},r!=null&&r.transform?{transform:r.transform}:{}),{headers:n.headers});const o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{signedUrl:encodeURI(`${n.url}${a.signedURL}${o}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const i=await zn(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return i.map(o=>Ae(Ae({},o),{},{signedUrl:o.signedURL?encodeURI(`${n.url}${o.signedURL}${a}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",i=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),a=i?`?${i}`:"",o=this._getFinalPath(e),l=()=>vd(this.fetch,`${this.url}/${n}/${o}${a}`,{headers:this.headers,noResolveJson:!0},r);return new mW(l,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>Sy(await vd(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await hW(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Cp(n)&&n instanceof Z3){const i=n.originalError;if([400,404].includes(i==null?void 0:i.status))return{data:!1,error:n}}throw n}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],i=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";i!==""&&n.push(i);const a=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",o=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});o!==""&&n.push(o);let l=n.join("&");return l!==""&&(l=`?${l}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}${l}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await OE(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const i=Ae(Ae(Ae({},gW),t),{},{prefix:e||""});return await zn(n.fetch,`${n.url}/object/list/${n.bucketId}`,i,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const n=Ae({},e);return await zn(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const yW="2.97.0",y0={"X-Client-Info":`storage-js/${yW}`};var bW=class extends jc{constructor(e,t={},r,n){const i=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase."));const a=i.href.replace(/\/$/,""),o=Ae(Ae({},y0),t);super(a,o,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await vd(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await vd(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await zn(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await By(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await zn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await OE(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},EW=class extends jc{constructor(e,t={},r){const n=e.replace(/\/$/,""),i=Ae(Ae({},y0),t);super(n,i,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await zn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>
681{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),i=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return await vd(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await OE(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!oW(e))throw new wp("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new iW({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(i,a){const o=i[a];return typeof o!="function"?o:async(...l)=>{try{return{data:await o.apply(i,l),error:null}}catch(c){if(n)throw c;return{data:null,error:c}}}}})}},wW=class extends jc{constructor(e,t={},r){const n=e.replace(/\/$/,""),i=Ae(Ae({},y0),{},{"Content-Type":"application/json"},t);super(n,i,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Qr.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await Qr.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Qr.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await Qr.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},CW=class extends jc{constructor(e,t={},r){const n=e.replace(/\/$/,""),i=Ae(Ae({},y0),{},{"Content-Type":"application/json"},t);super(n,i,r,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Qr.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Qr.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Qr.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Qr.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Qr.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},AW=class extends jc{constructor(e,t={},r){const n=e.replace(/\/$/,""),i=Ae(Ae({},y0),{},{"Content-Type":"application/json"},t);super(n,i,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Qr.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Qr.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Qr.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Qr.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},jW=class extends AW{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new kW(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},kW=class extends wW{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,Ae(Ae({},e),{},{vectorBucketName:r.vectorBucketName}))}
681async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,Ae(Ae({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new _W(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},_W=class extends CW{constructor(e,t,r,n,i){super(e,t,i),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,Ae(Ae({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,Ae(Ae({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,Ae(Ae({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,Ae(Ae({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,Ae(Ae({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},SW=class extends bW{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new vW(this.url,this.headers,e,this.fetch)}get vectors(){return new jW(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new EW(this.url+"/iceberg",this.headers,this.fetch)}};const J3="2.97.0",Vo=30*1e3,Ny=3,ag=Ny*Vo,BW="http://localhost:9999",NW="supabase.auth.token",DW={"X-Client-Info":`gotrue-js/${J3}`},Dy="X-Supabase-Api-Version",eS={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},FW=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,PW=10*60*1e3;class yd extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function Ee(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class OW extends yd{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function TW(e){return Ee(e)&&e.name==="AuthApiError"}class Ms extends yd{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class pa extends yd{constructor(t,r,n,i){super(t,n,i),this.name=r,this.status=n}}class Vr extends pa{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function sg(e){return Ee(e)&&e.name==="AuthSessionMissingError"}class Oo extends pa{constructor(){super("Auth session or user missing","AuthInvalidToken
681ResponseError",500,void 0)}}class ix extends pa{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class ax extends pa{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function $W(e){return Ee(e)&&e.name==="AuthImplicitGrantRedirectError"}class S8 extends pa{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class IW extends pa{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Fy extends pa{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function og(e){return Ee(e)&&e.name==="AuthRetryableFetchError"}class B8 extends pa{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class Py extends pa{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Rf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),N8=` 682\r=`.split(""),MW=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<N8.length;t+=1)e[N8[t].charCodeAt(0)]=-2;for(let t=0;t<Rf.length;t+=1)e[Rf[t].charCodeAt(0)]=t;return e})();function D8(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Rf[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Rf[n]),t.queuedBits-=6}}function tS(e,t,r){const n=MW[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function F8(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=o=>{zW(o,n,r)};for(let o=0;o<e.length;o+=1)tS(e.charCodeAt(o),i,a);return t.join("")}function RW(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function LW(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const i=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|i)+65536,r+=1}RW(n,t)}}function zW(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function bl(e){const t=[],r={queue:0,queuedBits:0},n=i=>{t.push(i)};for(let i=0;i<e.length;i+=1)tS(e.charCodeAt(i),r,n);return new Uint8Array(t)}function UW(e){const t=[];return LW(e,r=>t.push(r)),new Uint8Array(t)}function Us(e){const t=[],r={queue:0,queuedBits:0},n=i=>{t.push(i)};return e.forEach(i=>D8(i,r,n)),D8(null,r,n),t.join("")}function WW(e){return Math.round(Date.now()/1e3)+e}function HW(){return Symbol("auth-callback")}const er=()=>typeof window<"u"&&typeof document<"u",ks={tested:!1,writable:!1},rS=()=>{if(!er())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ks.tested)return ks.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),ks.tested=!0,ks.writable=!0}catch{ks.tested=!0,ks.writable=!1}return ks.writable};function KW(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEac
682h((i,a)=>{t[a]=i})}catch{}return r.searchParams.forEach((n,i)=>{t[i]=n}),t}const nS=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),VW=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Go=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},_s=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Jt=async(e,t)=>{await e.removeItem(t)};class Ap{constructor(){this.promise=new Ap.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Ap.promiseConstructor=Promise;function sx(e){const t=e.split(".");if(t.length!==3)throw new Py("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!FW.test(t[n]))throw new Py("JWT not in base64url format");return{header:JSON.parse(F8(t[0])),payload:JSON.parse(F8(t[1])),signature:bl(t[2]),raw:{header:t[0],payload:t[1]}}}async function GW(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function qW(e,t){return new Promise((n,i)=>{(async()=>{for(let a=0;a<1/0;a++)try{const o=await e(a);if(!t(a,null,o)){n(o);return}}catch(o){if(!t(a,o)){i(o);return}}})()})}function YW(e){return("0"+e.toString(16)).substr(-2)}function ZW(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let i="";for(let a=0;a<56;a++)i+=r.charAt(Math.floor(Math.random()*n));return i}return crypto.getRandomValues(t),Array.from(t,YW).join("")}async function XW(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),i=new Uint8Array(n);return Array.from(i).map(a=>String.fromCharCode(a)).join("")}async function QW(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await XW(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function To(e,t,r=!1){const n=ZW();let i=n;r&&(i+="/PASSWORD_RECOVERY"),await Go(e,`${t}-code-verifier`,i);const a=await QW(n);return[a,n===a?"plain":"s256"]}const JW=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function eH(e){const t=e.headers.get(Dy);if(!t||!t.match(JW))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function tH(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function rH(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const nH=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function $o(e){if(!nH.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function lg(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function iH(e,t){return new Proxy(e,{get:(r,n,i)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const a=n.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)"||a==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,i)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,i)}})}function P8(e){return JSON.parse(JSON.stringify(e))}const Ps=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),aH=[502,503,504];async function O8(e){var t;if(!VW(e))throw new Fy(Ps(e),0);if(aH.includes(e.status))throw new Fy(Ps(e),e.status);let r;try{r=await e.json()}catch(a){throw new Ms(Ps(a),a)}let n;const i=eH(e);if(i&&i.getTime()>=eS["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new B8(Ps(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new Vr}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((a,o)=>
682a&&typeof o=="string",!0))throw new B8(Ps(r),e.status,r.weak_password.reasons);throw new OW(Ps(r),e.status||500,n)}const sH=(e,t,r,n)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),i.body=JSON.stringify(n),Object.assign(Object.assign({},i),r))};async function ke(e,t,r,n){var i;const a=Object.assign({},n==null?void 0:n.headers);a[Dy]||(a[Dy]=eS["2024-01-01"].name),n!=null&&n.jwt&&(a.Authorization=`Bearer ${n.jwt}`);const o=(i=n==null?void 0:n.query)!==null&&i!==void 0?i:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const l=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",c=await oH(e,t,r+l,{headers:a,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(c):{data:Object.assign({},c),error:null}}async function oH(e,t,r,n,i,a){const o=sH(t,n,i,a);let l;try{l=await e(r,Object.assign({},o))}catch(c){throw console.error(c),new Fy(Ps(c),0)}if(l.ok||await O8(l),n!=null&&n.noResolveJson)return l;try{return await l.json()}catch(c){await O8(c)}}function Mn(e){var t;let r=null;uH(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=WW(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function T8(e){const t=Mn(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Pa(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function lH(e){return{data:e,error:null}}function cH(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a}=e,o=Ac(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a},c=Object.assign({},o);return{data:{properties:l,user:c},error:null}}function $8(e){return e}function uH(e){return e.access_token&&e.refresh_token&&e.expires_in}const cg=["global","local","others"];class dH{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=nS(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(t,r=cg[0]){if(cg.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${cg.join(", ")}`);try{return await ke(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(Ee(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await ke(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Pa})}catch(n){if(Ee(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Ac(t,["options"]),i=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(i.new_email=n==null?void 0:n.newEmail,delete i.newEmail),await ke(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:cH,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(Ee(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await ke(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Pa})}catch(r){if(Ee(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,i,a,o,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await ke(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:$8});if(d.error)throw d.error;const x=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return h.length>
6820&&(h.forEach(m=>{const p=parseInt(m.split(";")[0].split("=")[1].substring(0,1)),v=JSON.parse(m.split(";")[1].split("=")[1]);u[`${v}Page`]=p}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},x),u),error:null}}catch(u){if(Ee(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){$o(t);try{return await ke(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Pa})}catch(r){if(Ee(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){$o(t);try{return await ke(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:Pa})}catch(n){if(Ee(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){$o(t);try{return await ke(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:Pa})}catch(n){if(Ee(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){$o(t.userId);try{const{data:r,error:n}=await ke(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:r,error:n}}catch(r){if(Ee(r))return{data:null,error:r};throw r}}async _deleteFactor(t){$o(t.userId),$o(t.id);try{return{data:await ke(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(Ee(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,i,a,o,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await ke(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:$8});if(d.error)throw d.error;const x=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return h.length>0&&(h.forEach(m=>{const p=parseInt(m.split(";")[0].split("=")[1].substring(0,1)),v=JSON.parse(m.split(";")[1].split("=")[1]);u[`${v}Page`]=p}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},x),u),error:null}}catch(u){if(Ee(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await ke(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Ee(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await ke(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Ee(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await ke(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Ee(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await ke(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(Ee(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await ke(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Ee(r))return{data:null,error:r};throw r}}}function I8(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const Io={debug:!!(globalThis&&rS()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class iS extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class M8 extends iS{}async function xH(e,t,r){Io.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;t>0&&setTimeout(()=>{n.abort(),Io.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal}
682,async i=>{if(i){Io.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await r()}finally{Io.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw Io.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new M8(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Io.debug)try{const a=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(a,null," "))}catch(a){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",a)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}})}catch(i){throw(i==null?void 0:i.name)==="AbortError"?new M8(`Acquiring an exclusive Navigator LockManager lock "${e}" timed out waiting ${t}ms`):i}}function fH(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function aS(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function hH(e){return parseInt(e,16)}function pH(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function mH(e){var t;const{chainId:r,domain:n,expirationTime:i,issuedAt:a=new Date,nonce:o,notBefore:l,requestId:c,resources:u,scheme:d,uri:x,version:f}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!x)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 683`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const h=aS(e.address),m=d?`${d}://${n}`:n,p=e.statement?`${e.statement} 684`:"",v=`${m} wants you to sign in with your Ethereum account: 685${h} 686 687${p}`;let y=`URI: ${x} 688Version: ${f} 689Chain ID: ${r}${o?` 690Nonce: ${o}`:""} 691Issued At: ${a.toISOString()}`;if(i&&(y+=` 692Expiration Time: ${i.toISOString()}`),l&&(y+=` 693Not Before: ${l.toISOString()}`),c&&(y+=` 694Request ID: ${c}`),u){let b=` 695Resources:`;for(const g of u){if(!g||typeof g!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${g}`);b+=` 696- ${g}`}y+=b}return`${v} 697${y}`}class Dt extends Error{constructor({message:t,code:r,cause:n,name:i}){var a;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(a=i??(n instanceof Error?n.name:void 0))!==null&&a!==void 0?a:"Unknown Error",this.code=r}}class Lf extends Dt{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function gH({error:e,options:t}){var r,n,i;const{publicKey:a}=t;if(!a)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Dt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=a.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Dt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=a.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Dt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((i=a.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new Dt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Dt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Dt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return a.pubKeyCredParams.filter(l=>l.type==="public-key").length===0?new Dt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Dt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(sS(o)){if(a.rp.id!==o)return new Dt({message:`The RP ID "${a.rp.id}
697" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Dt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(a.user.id.byteLength<1||a.user.id.byteLength>64)return new Dt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Dt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Dt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function vH({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Dt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Dt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(sS(n)){if(r.rpId!==n)return new Dt({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Dt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Dt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Dt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class yH{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const bH=new yH;function EH(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,i=Ac(e,["challenge","user","excludeCredentials"]),a=bl(t).buffer,o=Object.assign(Object.assign({},r),{id:bl(r.id).buffer}),l=Object.assign(Object.assign({},i),{challenge:a,user:o});if(n&&n.length>0){l.excludeCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const u=n[c];l.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:bl(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return l}function wH(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=Ac(e,["challenge","allowCredentials"]),i=bl(t).buffer,a=Object.assign(Object.assign({},n),{challenge:i});if(r&&r.length>0){a.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const l=r[o];a.allowCredentials[o]=Object.assign(Object.assign({},l),{id:bl(l.id).buffer,type:l.type||"public-key",transports:l.transports})}}return a}function CH(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:Us(new Uint8Array(e.response.attestationObject)),clientDataJSON:Us(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function AH(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),i=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Us(new Uint8Array(i.authenticatorData)),clientDataJSON:Us(new Uint8Array(i.clientDataJSON)),signature:Us(new Uint8Array(i.signature)),userHandle:i.userHandle?Us(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function sS(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function R8(){var e,t;return!!(er()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function jH(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Lf("Browser returned unexpected credential type",t)}:{data:null,error:new Lf("Empty credential response",t)}}
697catch(t){return{data:null,error:gH({error:t,options:e})}}}async function kH(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Lf("Browser returned unexpected credential type",t)}:{data:null,error:new Lf("Empty credential response",t)}}catch(t){return{data:null,error:vH({error:t,options:e})}}}const _H={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},SH={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function zf(...e){const t=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),r=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),n={};for(const i of e)if(i)for(const a in i){const o=i[a];if(o!==void 0)if(Array.isArray(o))n[a]=o;else if(r(o))n[a]=o;else if(t(o)){const l=n[a];t(l)?n[a]=zf(l,o):n[a]=zf(o)}else n[a]=o}return n}function BH(e,t){return zf(_H,e,t||{})}function NH(e,t){return zf(SH,e,t||{})}class DH{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:i},a){var o;try{const{data:l,error:c}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!l)return{data:null,error:c};const u=i??bH.createNewAbortSignal();if(l.webauthn.type==="create"){const{user:d}=l.webauthn.credential_options.publicKey;if(!d.name){const x=n;if(x)d.name=`${d.id}:${x}`;else{const h=(await this.client.getUser()).data.user,m=((o=h==null?void 0:h.user_metadata)===null||o===void 0?void 0:o.name)||(h==null?void 0:h.email)||(h==null?void 0:h.id)||"User";d.name=`${d.id}:${m}`}}d.displayName||(d.displayName=d.name)}switch(l.webauthn.type){case"create":{const d=BH(l.webauthn.credential_options.publicKey,a==null?void 0:a.create),{data:x,error:f}=await jH({publicKey:d,signal:u});return x?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:x}},error:null}:{data:null,error:f}}case"request":{const d=NH(l.webauthn.credential_options.publicKey,a==null?void 0:a.request),{data:x,error:f}=await kH(Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:d,signal:u}));return x?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:x}},error:null}:{data:null,error:f}}}}catch(l){return Ee(l)?{data:null,error:l}:{data:null,error:new Ms("Unexpected error in challenge",l)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},a){if(!r)return{data:null,error:new yd("rpId is required for WebAuthn authentication")};try{if(!R8())return{data:null,error:new Ms("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:i},{request:a});if(!o)return{data:null,error:l};const{webauthn:c}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:c.type,rpId:r,rpOrigins:n,credential_response:c.credential_response}})}catch(o){return Ee(o)?{data:null,error:o}:{data:null,error:new Ms("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},a){if(!r)return{data:null,error:new yd("rpId is required for WebAuthn registration")};try{if(!R8())return{data:null,error:new Ms("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(d=>{var x;return(x=d.data)===null||x===void 0?void 0:x.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:l};const{data:c,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:i},{create:a});return c?this._verify({factorId:o.id,challengeId:c.challengeId,webauthn:{rpId:r,rpOrigins:n,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:u}}catch(o){return Ee(o)?{data:null,error:o}:{data:null,error:new Ms("Unexpected error in register",o)}}}}fH();const FH={url:BW,storageKey:NW,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:DW,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4,skipAutoInitialize:!1};async function L8(e,t,r){return await r()}const Mo={};class bd{get jwks(){var t,r;return(r=(t=Mo[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){Mo[this.storageKey]=Object.assign(Object.assign({},Mo[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=Mo[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Mo[this.storageKey]=Object.assign(Object.assign({},Mo[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,i;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const a=Object.assign(Object.assign({},FH),t);if(this.storageKey=a.storageKey,this.instanceID=(r=bd.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,bd.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!a.debug,typeof a.debug=="function"&&(this.logger=a.debug),this.instanceID>0&&er()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=a.persistSession,this.autoRefreshToken=a.autoRefreshToken,this.admin=new dH({url:a.url,headers:a.headers,fetch:a.fetch}),this.url=a.url,this.headers=a.headers,this.fetch=nS(a.fetch),this.lock=a.lock||L8,this.detectSessionInUrl=a.detectSessionInUrl,this.flowType=a.flowType,this.hasCustomAuthorizationHeader=a.hasCustomAuthorizationHeader,this.throwOnError=a.throwOnError,this.lockAcquireTimeout=a.lockAcquireTimeout,a.lock?this.lock=a.lock:this.persistSession&&er()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=xH:this.lock=L8,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new DH(this)}
697,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(a.storage?this.storage=a.storage:rS()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=I8(this.memoryStorage)),a.userStorage&&(this.userStorage=a.userStorage)):(this.memoryStorage={},this.storage=I8(this.memoryStorage)),er()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}a.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${J3}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(er()&&(r=KW(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),er()&&this.detectSessionInUrl&&n!=="none"){const{data:i,error:a}=await this._getSessionFromURL(r,n);if(a){if(this._debug("#_initialize()","error detecting session from URL",a),$W(a)){const c=(t=a.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:a}}return{error:a}}const{session:o,redirectType:l}=i;return this._debug("#_initialize()","detected session in URL",o,"redirect type",l),await this._saveSession(o),setTimeout(async()=>{l==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return Ee(r)?this._returnResult({error:r}):this._returnResult({error:new Ms("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,i;try{const a=await ke(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:Mn}),{data:o,error:l}=a;if(l||!o)return this._returnResult({data:{user:null,session:null},error:l});const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(a){if(Ee(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signUp(t){var r,n,i;try{let a;if("email"in t){const{email:d,password:x,options:f}=t;let h=null,m=null;this.flowType==="pkce"&&([h,m]=await To(this.storage,this.storageKey)),a=await ke(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:d,password:x,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:m},xform:Mn})}else if("phone"in t){const{phone:d,password:x,options:f}=t;a=await ke(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:x,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},channel:(i=f==null?void 0:f.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Mn})}else throw new ix("You must provide either an email or phone number and a password");const{data:o,error:l}=a;if(l||!o)return await Jt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:l});const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(a){if(await Jt(this.storage,`${this.storageKey}-code-verifier`),Ee(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithPassword(t){try{let r;if("email"in t){const{email:a,password:o,options:l}=t;r=await ke(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:T8})}else if("phone"in t){const{phone:a,password:o,options:l}=t;r=await ke(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:T8})}else throw new ix("You must provide either an email or phone number and a password");const{data:n,error:i}=r;if(i)return this._returnResult({data:{user:null,session:null},error:i});if(!n||!n.session||!n.user){const a=new Oo;return this._returnResult({data:{user:null,session:null},error:a})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:i})}catch(r){if(Ee(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,i,a;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(a=t.o
697ptions)===null||a===void 0?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,i,a,o,l,c,u,d,x,f;let h,m;if("message"in t)h=t.message,m=t.signature;else{const{chain:p,wallet:v,statement:y,options:b}=t;let g;if(er())if(typeof v=="object")g=v;else{const _=window;if("ethereum"in _&&typeof _.ethereum=="object"&&"request"in _.ethereum&&typeof _.ethereum.request=="function")g=_.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");g=v}const w=new URL((r=b==null?void 0:b.url)!==null&&r!==void 0?r:window.location.href),E=await g.request({method:"eth_requestAccounts"}).then(_=>_).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!E||E.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const C=aS(E[0]);let j=(n=b==null?void 0:b.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!j){const _=await g.request({method:"eth_chainId"});j=hH(_)}const S={domain:w.host,address:C,statement:y,uri:w.href,version:"1",chainId:j,nonce:(i=b==null?void 0:b.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(o=(a=b==null?void 0:b.signInWithEthereum)===null||a===void 0?void 0:a.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(l=b==null?void 0:b.signInWithEthereum)===null||l===void 0?void 0:l.expirationTime,notBefore:(c=b==null?void 0:b.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=b==null?void 0:b.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=b==null?void 0:b.signInWithEthereum)===null||d===void 0?void 0:d.resources};h=mH(S),m=await g.request({method:"personal_sign",params:[pH(h),C]})}try{const{data:p,error:v}=await ke(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:m},!((x=t.options)===null||x===void 0)&&x.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Mn});if(v)throw v;if(!p||!p.session||!p.user){const y=new Oo;return this._returnResult({data:{user:null,session:null},error:y})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:Object.assign({},p),error:v})}catch(p){if(Ee(p))return this._returnResult({data:{user:null,session:null},error:p});throw p}}async signInWithSolana(t){var r,n,i,a,o,l,c,u,d,x,f,h;let m,p;if("message"in t)m=t.message,p=t.signature;else{const{chain:v,wallet:y,statement:b,options:g}=t;let w;if(er())if(typeof y=="object")w=y;else{const C=window;if("solana"in C&&typeof C.solana=="object"&&("signIn"in C.solana&&typeof C.solana.signIn=="function"||"signMessage"in C.solana&&typeof C.solana.signMessage=="function"))w=C.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=y}const E=new URL((r=g==null?void 0:g.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in w&&w.signIn){const C=await w.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},g==null?void 0:g.signInWithSolana),{version:"1",domain:E.host,uri:E.href}),b?{statement:b}:null));let j;if(Array.isArray(C)&&C[0]&&typeof C[0]=="object")j=C[0];else if(C&&typeof C=="object"&&"signedMessage"in C&&"signature"in C)j=C;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in j&&"signature"in j&&(typeof j.signedMessage=="string"||j.signedMessage instanceof Uint8Array)&&j.signature instanceof Uint8Array)m=typeof j.signedMessage=="string"?j.signedMessage:new TextDecoder().decode(j.signedMessage),p=j.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in w)||typeof w.signMessage!="function"||!("publicKey"in w)||typeof w!="object"||!w.publicKey||!("toBase58"in w.publicKey)||typeof w.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");m=[`${E.host} wants you to sign in with your Solana account:`,w.publicKey.toBase58(),...b?["",b,""]:[""],"Version: 1",`URI: ${E.href}`,`Issued At: ${(i=(n=g==null?void 0:g.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((a=g==null?void 0:g.signInWithSolana)===null||a===void 0)&&a.notBefore?[`Not Before: ${g.signInWithSolana.notBefore}`]:[],...!((o=g==null?void 0:g.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${g.signInWithSolana.expirationTime}`]:[],...!((l=g==null?void 0:g.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${g.signInWithSolana.chainId}`]:[],...!((c=g==null?void 0:g.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${g.signInWithSolana.nonce}`]:[],...!((u=g==null?void 0:g.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${g.signInWithSolana.requestId}`]:[],...!((x=(d=g==null?void 0:g.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||x===void 0)&&x.length?["Resources",...g.signInWithSolana.resources.map(j=>`- ${j}`)]:[]].join(` 698`);const C=await w.signMessage(new TextEncoder().encode(m),"utf8");if(!C||!(C instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");p=C}}try{const{data:v,error:y}=await ke(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:m,signature:Us(p)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Mn});if(y)throw y;if(!v||!v.session||!v.user){const b=new Oo;return this._returnResult({data:{user:null,session:null},error:b})}return v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("SIGNED_IN",v.session)),this._returnResult({data:Object.assign({},v),error:y})}catch(v){if(Ee(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}}async _exchangeCodeForSession(t){const r=await _s(this.storage,`${this.storageKey}-code-verifier`),[n,i]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new IW;const{data:a,error:o}=await ke(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Mn});if(await Jt(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!a||!a.session||!a.user){const l=new Oo;return this._returnResult({data:{user:null,session:null,redirectType:null},error:l})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:Object.assign(Object.assign({},a),{redirectType:i??null}),error:o})}catch(a){if(await Jt(this.storage,`${this.storageKey}-code-verifier`),Ee(a))return this._returnResult({data:{user:null,session:null,redirectType:null},error:a});throw a}}async signInWithIdToken(t){try{const{options:r,provider:n,token:i,access_token:a,nonce:o}=t,l=await ke(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:i,access_token:a,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Mn}),{data:c,error:u}=l;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c||!c.session||!c.user){const d=new Oo;return this._returnResult({data:{user:null,session:null},error:d})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:u})}catch(r){if(Ee(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,i,a,o;try{if("email"in t){const{email:l,options:c}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await To(this.storage,this.storageKey));const{error:x}=await ke(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(r=c==null?void 0:c.data)!==null&&r!==void 0?r:{},create_user:(n=c==null?void 0:c.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:x})}if("phone"in t){const{phone:l,options:c}=t,{data:u,error:d}=await ke(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(i=c==null?void 0:c.data)!==null&&i!==void 0?i:{},create_user:(a=c==null?void 0:c.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(o=c==null?void 0:c.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new ix("You must provide either an email or phone number.")}catch(l){if(await Jt(this.storage,`${this.storageKey}-code-verifier`),Ee(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(t){var r,n;try{let i,a;"options"in t&&(i=(r=t.options)===null||r===void 0?void 0:r.redirectTo,a=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:l}=await ke(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:a}}),redirectTo:i,xform:Mn});if(l)throw l;if(!o)throw new Error("An error occurred on token verification.");const c=o.session,u=o.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(Ee(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithSSO(t){var r,n,i,a,o;try{let l=null,c=null;this.flowType==="pkce"&&([l,c]=await To(this.storage,this.storageKey));const u=await ke(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((i=t==null?void 0:t.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:l,code_challenge_method:c}),headers:this.headers,xform:lH});return!((a=u.data)===null||a===void 0)&&a.url&&er()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(l){if(await Jt(this.storage,`${this.storageKey}-code-verifier`),Ee(l))return this._returnResult({data:null,error:l});throw l}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new Vr;const{error:i}=await ke(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:i})})}catch(t){if(Ee(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:i,options:a}=t,{error:o}=await ke(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:n,type:i,options:a}=t,{data:o,error:l}=await ke(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:l})}throw new ix("You must provide either an email or phone number and a type")}catch(r){if(Ee(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await _s(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
698id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<ag:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await _s(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=lg()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=iH(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:i,error:a}=await this._callRefreshToken(t.refresh_token);return a?this._returnResult({data:{session:null},error:a}):this._returnResult({data:{session:i},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await ke(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Pa}):await this._useSession(async r=>{var n,i,a;const{data:o,error:l}=r;if(l)throw l;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Vr}:await ke(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(i=o.session)===null||i===void 0?void 0:i.access_token)!==null&&a!==void 0?a:void 0,xform:Pa})})}catch(r){if(Ee(r))return sg(r)&&(await this._removeSession(),await Jt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:i,error:a}=n;if(a)throw a;if(!i.session)throw new Vr;const o=i.session;let l=null,c=null;this.flowType==="pkce"&&t.email!=null&&([l,c]=await To(this.storage,this.storageKey));const{data:u,error:d}=await ke(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:c}),jwt:o.access_token,xform:Pa});if(d)throw d;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await Jt(this.storage,`${this.storageKey}-code-verifier`),Ee(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Vr;const r=Date.now()/1e3;let n=r,i=!0,a=null;const{payload:o}=sx(t.access_token);if(o.exp&&(n=o.exp,i=n<=r),i){const{data:l,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l)return{data:{user:null,session:null},error:null};a=l}else{const{data:l,error:c}=await this._getUser(t.access_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});a={access_token:t.access_token,refresh_token:t.refresh_token,user:l.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)}return this._returnResult({data:{user:a.user,session:a},error:null})}catch(r){if(Ee(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:o,error:l}=r;if(l)throw l;t=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new Vr;const{data:i,error:a}=await this._callRefreshToken(t.refresh_token);return a?this._returnResult({data:{user:null,session:null},error:a}):i?this._returnResult({data:{user:i.user,session:i},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(Ee(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!er())throw new ax("No browser detected.");
698if(t.error||t.error_description||t.error_code)throw new ax(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new S8("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ax("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new S8("No code detected.");const{data:b,error:g}=await this._exchangeCodeForSession(t.code);if(g)throw g;const w=new URL(window.location.href);return w.searchParams.delete("code"),window.history.replaceState(window.history.state,"",w.toString()),{data:{session:b.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:i,access_token:a,refresh_token:o,expires_in:l,expires_at:c,token_type:u}=t;if(!a||!l||!o||!u)throw new ax("No session defined in URL");const d=Math.round(Date.now()/1e3),x=parseInt(l);let f=d+x;c&&(f=parseInt(c));const h=f-d;h*1e3<=Vo&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${x}s`);const m=f-x;d-m>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",m,f,d):d-m<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",m,f,d);const{data:p,error:v}=await this._getUser(a);if(v)throw v;const y={provider_token:n,provider_refresh_token:i,access_token:a,expires_in:x,expires_at:f,refresh_token:o,token_type:u,user:p.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:y,redirectType:t.type},error:null})}catch(n){if(Ee(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await _s(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a&&!sg(a))return this._returnResult({error:a});const o=(n=i.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:l}=await this.admin.signOut(o,t);if(l&&!(TW(l)&&(l.status===404||l.status===401||l.status===403)||sg(l)))return this._returnResult({error:l})}return t!=="others"&&(await this._removeSession(),await Jt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=HW(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,i;try{const{data:{session:a},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",a)),this._debug("INITIAL_SESSION","callback id",t,"session",a)}catch(a){await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",a),console.error(a)}})}async resetPasswordForEmail(t,r={}){let n=null,i=null;this.flowType==="pkce"&&([n,i]=await To(this.storage,this.storageKey,!0));try{return await ke(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:i,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(a){if(await Jt(this.storage,`${this.storageKey}-code-verifier`),Ee(a))return this._returnResult({data:null,error:a});throw a}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(Ee(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:i}=await this._useSession(async a=>{var o,l,c,u,d;const{data:x,error:f}=a;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await ke(this.fetch,"GET",h,{headers:this.headers,jwt:(d=(u=x.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(i)throw i;return er()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(Ee(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:i,data:{session:a}}=r;if(i)throw i;const{options:o,provider:l,token:c,access_token:u,nonce:d}=t,x=await ke(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=a==null?void 0:a.access_token)!==null&&n!==void 0?n:void 0,body:{provider:l,id_token:c,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Mn}),{data:f,error:h}=x;return h?this._returnResult({data:{user:null,session:null},error:h}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new Oo}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(i){if(await Jt(this.storage,`${this.storageKey}-code-verifier`),Ee(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,i;const{data:a,error:o}=r;if(o)throw o;
698return await ke(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(i=(n=a.session)===null||n===void 0?void 0:n.access_token)!==null&&i!==void 0?i:void 0})})}catch(r){if(Ee(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await qW(async i=>(i>0&&await GW(200*Math.pow(2,i-1)),this._debug(r,"refreshing attempt",i),await ke(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Mn})),(i,a)=>{const o=200*Math.pow(2,i);return a&&og(a)&&Date.now()+o-n<Vo})}catch(n){if(this._debug(r,"error",n),Ee(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),er()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const i=await _s(this.storage,this.storageKey);if(i&&this.userStorage){let o=await _s(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:i.user},await Go(this.userStorage,this.storageKey+"-user",o)),i.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:lg()}else if(i&&!i.user&&!i.user){const o=await _s(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(i.user=o.user,await Jt(this.storage,this.storageKey+"-user"),await Go(this.storage,this.storageKey,i)):i.user=lg()}if(this._debug(n,"session from storage",i),!this._isValidSession(i)){this._debug(n,"session is not valid"),i!==null&&await this._removeSession();return}const a=((r=i.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<ag;if(this._debug(n,`session has${a?"":" not"} expired with margin of ${ag}s`),a){if(this.autoRefreshToken&&i.refresh_token){const{error:o}=await this._callRefreshToken(i.refresh_token);o&&(console.error(o),og(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:l}=await this._getUser(i.access_token);!l&&(o!=null&&o.user)?(i.user=o.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(n,"error",i),console.error(i);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new Vr;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new Ap;const{data:a,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!a.session)throw new Vr;await this._saveSession(a.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",a.session);const l={data:a.session,error:null};return this.refreshingDeferred.resolve(l),l}catch(a){if(this._debug(i,"error",a),Ee(a)){const o={data:null,error:a};return og(a)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(a),a}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(t,r,n=!0){const i=`#_notifyAllSubscribers(${t})`;this._debug(i,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const a=[],o=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,r)}catch(c){a.push(c)}});if(await Promise.all(o),a.length>0){for(let l=0;l<a.length;l+=1)console.error(a[l]);throw a[0]}}finally{this._debug(i,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Jt(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Go(this.userStorage,this.storageKey+"-user",{user:r.user});const i=Object.assign({},r);delete i.user;const a=P8(i);await Go(this.storage,this.storageKey,a)}else{const i=P8(r);await Go(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Jt(this.storage,this.storageKey),await Jt(this.storage,this.storageKey+"-code-verifier"),await Jt(this.storage,this.storageKey+"-user"),this.userStorage&&await Jt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&er()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
698catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Vo);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((n.expires_at*1e3-t)/Vo);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${Vo}ms, refresh threshold is ${Ny} ticks`),i<=Ny&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof iS)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!er()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const i=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&i.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&i.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[a,o]=await To(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(o)}`});i.push(l.toString())}if(n!=null&&n.queryParams){const a=new URLSearchParams(n.queryParams);i.push(a.toString())}return n!=null&&n.skipBrowserRedirect&&i.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;return a?this._returnResult({data:null,error:a}):await ke(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(Ee(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,i;const{data:a,error:o}=r;if(o)return this._returnResult({data:null,error:o});const l=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:u}=await ke(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&c.type==="totp"&&(!((i=c==null?void 0:c.totp)===null||i===void 0)&&i.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(r){if(Ee(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a)return this._returnResult({data:null,error:a});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?CH(t.webauthn.credential_response):AH(t.webauthn.credential_response)})}:{code:t.code}),{data:l,error:c}=await ke(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:c}))})}catch(r){if(Ee(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a)return this._returnResult({data:null,error:a});const o=await ke(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});if(o.error)return o;const{data:l}=o;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:EH(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:wH(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(Ee(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const i={all:[],phone:[],totp:[],webauthn:[]};for(const a of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])i.all.push(a),a.status==="verified"&&i[a.factor_type].push(a);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,n,i,a;if(t)try{const{payload:h}=sx(t);let m=null;h.aal&&(m=h.aal);let p=m;const{data:{user:v},error:y}=await this.getUser(t);if(y)return this._returnResult({data:null,error:y});((n=(r=v==null?void 0:v.factors)===null||r===void 0?void 0:r.filter(w=>w.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(p="aal2");const g=h.amr||[];return{data:{currentLevel:m,nextLevel:p,currentAuthenticationMethods:g},error:null}}
698catch(h){if(Ee(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:o},error:l}=await this.getSession();if(l)return this._returnResult({data:null,error:l});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=sx(o.access_token);let u=null;c.aal&&(u=c.aal);let d=u;((a=(i=o.user.factors)===null||i===void 0?void 0:i.filter(h=>h.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(d="aal2");const f=c.amr||[];return{data:{currentLevel:u,nextLevel:d,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;return i?this._returnResult({data:null,error:i}):n?await ke(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:a=>({data:a,error:null})}):this._returnResult({data:null,error:new Vr})})}catch(r){if(Ee(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!i)return this._returnResult({data:null,error:new Vr});const o=await ke(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&er()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(Ee(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!i)return this._returnResult({data:null,error:new Vr});const o=await ke(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&er()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(Ee(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await ke(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Vr})})}catch(t){if(Ee(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;return i?this._returnResult({data:null,error:i}):n?(await ke(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Vr})})}catch(r){if(Ee(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(l=>l.kid===t);if(n)return n;const i=Date.now();if(n=this.jwks.keys.find(l=>l.kid===t),n&&this.jwks_cached_at+PW>i)return n;const{data:a,error:o}=await ke(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!a.keys||a.keys.length===0||(this.jwks=a,this.jwks_cached_at=i,n=a.keys.find(l=>l.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:h,error:m}
698=await this.getSession();if(m||!h.session)return this._returnResult({data:null,error:m});n=h.session.access_token}const{header:i,payload:a,signature:o,raw:{header:l,payload:c}}=sx(n);r!=null&&r.allowExpired||tH(a.exp);const u=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:h}=await this.getUser(n);if(h)throw h;return{data:{claims:a,header:i,signature:o},error:null}}const d=rH(i.alg),x=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,x,o,UW(`${l}.${c}`)))throw new Py("Invalid JWT signature");return{data:{claims:a,header:i,signature:o},error:null}}catch(n){if(Ee(n))return this._returnResult({data:null,error:n});throw n}}}bd.nextInstanceID={};const PH=bd,OH="2.97.0";let mu="";typeof Deno<"u"?mu="deno":typeof document<"u"?mu="web":typeof navigator<"u"&&navigator.product==="ReactNative"?mu="react-native":mu="node";const TH={"X-Client-Info":`supabase-js-${mu}/${OH}`},$H={headers:TH},IH={schema:"public"},MH={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},RH={};function Ed(e){"@babel/helpers - typeof";return Ed=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ed(e)}function LH(e,t){if(Ed(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ed(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zH(e){var t=LH(e,"string");return Ed(t)=="symbol"?t:t+""}function UH(e,t,r){return(t=zH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function At(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?z8(Object(r),!0).forEach(function(n){UH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z8(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const WH=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),HH=()=>Headers,KH=(e,t,r)=>{const n=WH(r),i=HH();return async(a,o)=>{var l;const c=(l=await t())!==null&&l!==void 0?l:e;let u=new i(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),n(a,At(At({},o),{},{headers:u}))}};function VH(e){return e.endsWith("/")?e:e+"/"}function GH(e,t){var r,n;const{db:i,auth:a,realtime:o,global:l}=e,{db:c,auth:u,realtime:d,global:x}=t,f={db:At(At({},c),i),auth:At(At({},u),a),realtime:At(At({},d),o),storage:{},global:At(At(At({},x),l),{},{headers:At(At({},(r=x==null?void 0:x.headers)!==null&&r!==void 0?r:{}),(n=l==null?void 0:l.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function qH(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(VH(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var YH=class extends PH{constructor(e){super(e)}},ZH=class{constructor(e,t,r){var n,i;this.supabaseUrl=e,this.supabaseKey=t;const a=qH(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);const o=`sb-${a.hostname.split(".")[0]}-auth-token`,l={db:IH,realtime:RH,auth:At(At({},MH),{},{storageKey:o}),global:$H},c=GH(r??{},l);if(this.storageKey=(n=c.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(i=c.global.headers)!==null&&i!==void 0?i:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(d,x)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(x)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=c.auth)!==null&&u!==void 0?u:{},this.headers,c.global.fetch)}this.fetch=KH(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(At({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new TU(new URL("rest/v1",a).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch,timeout:c.db.timeout,urlLengthLimit:c.db.urlLengthLimit}),this.storage=new SW(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new _U(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}
698channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:i,storageKey:a,flowType:o,lock:l,debug:c,throwOnError:u},d,x){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new YH({url:this.authUrl.href,headers:At(At({},f),d),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:i,flowType:o,lock:l,debug:c,throwOnError:u,fetch:x,hasCustomAuthorizationHeader:Object.keys(this.headers).some(h=>h.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new QU(this.realtimeUrl.href,At(At({},e),{},{params:At(At({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const XH=(e,t,r)=>new ZH(e,t,r);function QH(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}QH()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function JH(){var v,y;if(typeof window>"u")return;const e=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(b=>e===b||e.endsWith("."+b)),n="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",i=r?((v=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+n+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:v[1])??((y=e.match(new RegExp("^("+n+")(?=[.-])","i")))==null?void 0:y[1]):void 0,a=window.parent&&window.parent!==window;if(!i||!a)return localStorage;const o=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),l=o?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,c=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),u=c&&l.test(c)?[c]:o?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],d="lovable-preview-auth:result",x=2e3,f=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),h=(b,g,w)=>new Promise(E=>{const C=f();let j=!1,S;const _=B=>{j||(j=!0,clearTimeout(S),window.removeEventListener("message",O),E(B))},O=B=>{if(u.indexOf(B.origin)<0)return;const T=B.data;T&&T.type===d&&T.requestId===C&&_(T)};window.addEventListener("message",O);const I={type:b,requestId:C,projectId:i,key:g};w!==void 0&&(I.value=w);for(const B of u)window.parent.postMessage(I,B);S=setTimeout(()=>_(null),x)});let m=!0;const p=250;return{getItem:async b=>{let g=await h("lovable-preview-auth:get",b);return!g&&m&&(await new Promise(w=>setTimeout(w,p)),g=await h("lovable-preview-auth:get",b)),m=!1,g&&g.ok&&typeof g.value=="string"?g.value===""?(localStorage.removeItem(b),null):g.value:localStorage.getItem(b)},setItem:(b,g)=>(localStorage.setItem(b,g),h("lovable-preview-auth:set",b,g).then(()=>{})),removeItem:b=>(localStorage.removeItem(b),h("lovable-preview-auth:remove",b).then(()=>{}))}}const eK="https://cwpqqawfygddsennirrt.supabase.co",tK="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImN3cHFxYXdmeWdkZHNlbm5pcnJ0Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzE1MjQ0OTIsImV4cCI6MjA4NzEwMDQ5Mn0.FVBn0TW8TgVOP06FI_-n_mnTC_sUFF3sZBlwdUUnmzg",re=XH(eK,tK,{auth:{storage:JH(),persistSession:!0,autoRefreshToken:!0}}),Gl="/assets/spirit-logo-2027-Daz7i-OZ.png",U8=[{code:"de",label:"DE",flag:"ð©ðª",fullName:"Deutsch"},{code:"en",label:"EN",flag:"ð¬ð§",fullName:"English"}];function W8({compact:e=!1}){const{i18n:t}=ii(),r=U8.find(i=>i.code===t.language)??U8[0];function n(){const i=t.language==="de"?"en":"de";t.changeLanguage(i)}return s.jsxs("button",{onClick:n,"aria-label":`Switch language â current: ${r.fullName}`,title:`Switch to ${t.language==="de"?"English":"Deutsch"}`,className:`flex items-center gap-1.5 rounded-lg border border-border text-muted-foreground hover:text-primary hover:border-primary/50 transition-all duration-200 font-medium select-none ${e?"px-2 py-1 text-xs":"px-2.5 py-1.5 text-xs"}`,children:[s.jsx("span",{"aria-hidden":"true",className:"text-base leading-none",children:r.flag}),s.jsx("span",{className:"font-tech tracking-wider",children:r.label})]})}const rK=.1,oS=A.createContext(void 0),lS="spirit-cart-v1",cS="spirit-cart-event-v1";function nK(){try{const e=JSON.parse(localStorage.getItem(lS)??"[]");return Array.isArray(e)?e:[]}catch{return[]}}function iK(){try{return JSON.parse(localStorage.getItem(cS)??"null")}catch{return null}}function aK({children:e}){const[t,r]=A.useState(()=>nK()),[n,i]=A.useState(()=>iK()),[a,o]=A.useState(!1);A.useEffect(()=>{try{localStorage.setItem(lS,JSON.stringify(t))}catch{}},[t]),A.useEffect(()=>{try{n&&localStorage.setItem(cS,JSON.stringify(n))}catch{}},[n]);const l=A.useMemo(()=>{const c=t.reduce((d,x)=>d+x.unitPriceCents*x.quantity,0),u=Math.round(c*rK);return{items:t,eventInfo:n,setEventInfo:d=>i(d),addItem:(d,x=1)=>r(f=>f.find(m=>m.categoryId===d.categoryId)?f.map(m=>m.categoryId===d.categoryId?{...m,...d,quantity:Math.min(m.quantity+x,d.maxQuantity)}:m):[...f,{...d,quantity:Math.min(x,d.maxQuantity)}]),setQuantity:(d,x)=>r(f=>x<=0?f.filter(h=>h.categoryId!==d):f.map(h=>h.categoryId===d?{...h,quantity:Math.min(x,h.maxQuantity)}:h)),removeItem:d=>r(x=>x.filter(f=>f.categoryId!==d)),clear:()=>r([]),totalQuantity:t.reduce((d,x)=>d+x.quantity,0),subtotalCents:c,feeCents:u,totalCents:c+u,isOpen:a,openCart:()=>o(!0),closeCart:()=>o(!1)}},[t,n,a]);return s.jsx(oS.Provider,{value:l,children:e})}function b0(){const e=A.useContext(oS);if(!e)throw new Error("useCart must be used within CartProvider");return e}function Sr(){const{t:e}=ii(),[t,r]=A.useState(!1),[n,i]=A.useState(!1),[a,o]=A.useState(!1),l=ps(),{totalQuantity:c,openCart:u}=b0(),d=[{label:e("nav.events"),href:"/events"},{label:e("nav.lineup"),href:"/lineup"},{label:e("nav.map"),href:"/lageplan"},{label:e("nav.faq"),href:"/faq"}];return A.useEffect(()=>{const x=()=>r(window.scrollY>50);return window.addEventListener("scroll",x),()=>window.removeEventListener("scroll",x)},[]),A.useEffect(()=>{i(!1)},[l]),s.jsxs("header",{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-500 border-b ${t?"glass border-primary/30 shadow-lg shadow-black/50":"bg-background/70 backdrop-blur-md border-primary/20 shadow-md shadow-black/30"}`,role:"banner",children:[s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"flex items-center justify-between h-16 md:h-20",children:[s.jsxs(we,{to:"/",className:"flex items-center gap-2 shrink-0","aria-label":`Spirit Festival â ${e("nav.home")}`,children:[s.jsx("img",{src:Gl,alt:"Spirit Festival Logo",className:"h-9 md:h-11 w-auto"}),s.jsx("span",{className:"hidden sm:block font-tech text-[9px] text-muted-foreground tracking-[0.3em] uppercase",children:"Festival 2027"})]}),s.jsx("nav",{className:"hidden md:flex items-center gap-8","aria-label":"Hauptnavigation",children:d.map(x=>s.jsxs(we,{to:x.href,className:`text-sm font-medium tracking-wide transition-colors duration-200 hover:text-primary relative group ${l.pathname===x.href?"text-primary":"text-foreground
698/80"}`,children:[x.label,s.jsx("span",{className:"absolute -bottom-1 left-0 w-0 h-0.5 bg-primary transition-all duration-300 group-hover:w-full"})]},x.href))}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:()=>o(!a),className:"p-2 text-muted-foreground hover:text-primary transition-colors","aria-label":e("nav.openSearch"),children:s.jsx(Ur,{size:18})}),s.jsx(W8,{compact:!0}),s.jsxs("div",{className:"hidden md:flex items-center gap-1",children:[s.jsx("a",{href:"https://www.instagram.com/spirit_festival_official?igsh=bGR3Y3VkZDVpYnlq",target:"_blank",rel:"noopener noreferrer","aria-label":`Instagram (${e("common.openNewTab")})`,className:"p-1.5 text-muted-foreground hover:text-primary transition-colors",children:s.jsx(kf,{size:16})}),s.jsx("a",{href:"https://www.facebook.com/spiritfromthestreet",target:"_blank",rel:"noopener noreferrer","aria-label":`Facebook (${e("common.openNewTab")})`,className:"p-1.5 text-muted-foreground hover:text-primary transition-colors",children:s.jsx(jf,{size:16})})]}),s.jsxs("button",{onClick:u,className:"relative p-2 text-muted-foreground hover:text-primary transition-colors","aria-label":`Warenkorb öffnen (${c} Tickets)`,children:[s.jsx(kn,{size:18}),c>0&&s.jsx("span",{className:"absolute -top-0.5 -right-0.5 min-w-[17px] h-[17px] px-1 rounded-full bg-primary text-primary-foreground text-[10px] font-bold flex items-center justify-center",children:c})]}),s.jsx(we,{to:"/mein-bereich",className:"inline-flex items-center px-4 py-2 rounded-lg text-sm font-bold bg-primary text-primary-foreground hover:opacity-90 transition-all duration-200 glow-primary",children:e("nav.myArea")}),s.jsx("button",{className:"md:hidden p-2 text-foreground hover:text-primary transition-colors",onClick:()=>i(!n),"aria-label":e(n?"nav.closeMenu":"nav.openMenu"),"aria-expanded":n,children:n?s.jsx(_t,{size:22}):s.jsx(BT,{size:22})})]})]}),a&&s.jsx("div",{className:"py-3 border-t border-border animate-fade-up",children:s.jsx("input",{type:"search",placeholder:e("nav.searchPlaceholder"),className:"w-full bg-muted rounded-lg px-4 py-2.5 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50",autoFocus:!0,"aria-label":e("nav.searchPlaceholder")})})]}),n&&s.jsx("div",{className:"md:hidden glass border-t border-border animate-fade-up",children:s.jsxs("nav",{className:"container mx-auto px-4 py-6 flex flex-col gap-4","aria-label":"Mobile Navigation",children:[d.map(x=>s.jsx(we,{to:x.href,className:"text-lg font-medium py-2 border-b border-border/50 text-foreground/80 hover:text-primary transition-colors",children:x.label},x.href)),s.jsxs("div",{className:"flex gap-4 pt-2",children:[s.jsxs("a",{href:"https://www.instagram.com/spirit_festival_official?igsh=bGR3Y3VkZDVpYnlq",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-primary py-2","aria-label":"Instagram",children:[s.jsx(kf,{size:16}),"Instagram"]}),s.jsxs("a",{href:"https://www.facebook.com/spiritfromthestreet",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-primary py-2","aria-label":"Facebook",children:[s.jsx(jf,{size:16}),"Facebook"]})]}),s.jsxs("div",{className:"flex gap-3 pt-2 items-center",children:[s.jsx(we,{to:"/mein-bereich",className:"flex-1 text-center py-2.5 bg-primary text-primary-foreground rounded-lg text-sm font-bold",children:e("nav.myArea")}),s.jsx(W8,{})]})]})})]})}const ox="spirit-cookie-consent",uS="spirit-cookie-log",sK="1.0",H8={essential:!0,functional:!1,analytics:!1,marketing:!1},dS=A.createContext(null);function E0(){const e=A.useContext(dS);if(!e)throw new Error("useConsent must be used inside ConsentProvider");return e}const oK=60*60*24*365;function K8(e,t){try{localStorage.setItem(e,t)}catch{}try{document.cookie=`${e}=${encodeURIComponent(t)}; path=/; max-age=${oK}; SameSite=Lax`}catch{}}function xS(e){try{const t=localStorage.getItem(e);if(t)return t}catch{}try{const t=document.cookie.match(new RegExp(`(?:^|; )${e}=([^;]*)`));return t?decodeURIComponent(t[1]):null}catch{return null}}function lK(e){try{localStorage.removeItem(e)}catch{}try{document.cookie=`${e}=; path=/; max-age=0; SameSite=Lax`}catch{}}
698function Oy(){try{return JSON.parse(xS(uS)??"[]")}catch{return[]}}function cK(e){const t=Oy();t.push(e);try{localStorage.setItem(uS,JSON.stringify(t.slice(-50)))}catch{}}function uK(e,t){return{id:crypto.randomUUID(),timestamp:new Date().toISOString(),choices:e,version:sK,method:t}}function dK({children:e}){const[t,r]=A.useState(H8),[n,i]=A.useState(!1),[a,o]=A.useState(!1),[l,c]=A.useState([]),[u,d]=A.useState(!1);A.useEffect(()=>{const b=xS(ox);let g=!1;if(b)try{const w=JSON.parse(b);r({...H8,...w,essential:!0}),d(!0),g=!0,K8(ox,b)}catch{}if(c(Oy()),!g){const w=setTimeout(()=>i(!0),1200);return()=>clearTimeout(w)}},[]);const x=A.useCallback((b,g)=>{K8(ox,JSON.stringify(b));const w=uK(b,g);cK(w),c(Oy()),r(b),d(!0),i(!1),o(!1)},[]),f=A.useCallback(()=>x({essential:!0,functional:!0,analytics:!0,marketing:!0},"accept_all"),[x]),h=A.useCallback(()=>x({essential:!0,functional:!1,analytics:!1,marketing:!1},"reject_all"),[x]),m=A.useCallback(b=>x({...b,essential:!0},"custom"),[x]),p=A.useCallback(()=>{x({essential:!0,functional:!1,analytics:!1,marketing:!1},"withdraw"),lK(ox),d(!1),i(!0)},[x]),v=A.useCallback(()=>o(!0),[]),y=A.useCallback(()=>o(!1),[]);return s.jsx(dS.Provider,{value:{choices:t,bannerVisible:n,managerOpen:a,logEntries:l,openManager:v,closeManager:y,acceptAll:f,rejectAll:h,saveCustom:m,withdrawConsent:p,hasConsented:u},children:e})}function Br(){const{t:e}=ii(),t=new Date().getFullYear(),{openManager:r}=E0(),n=[{label:e("footer.navLinks.events"),href:"/events"},{label:e("footer.navLinks.lineup"),href:"/lineup"},{label:e("footer.navLinks.map"),href:"/lageplan"},{label:e("footer.navLinks.faq"),href:"/faq"},{label:e("footer.navLinks.contact"),href:"/kontakt"},{label:"Tickets erneut anfordern",href:"/tickets-abruf"},{label:e("footer.navLinks.newsletter"),href:"/#newsletter"}],i=[{label:e("footer.legalLinks.impressum"),href:"/impressum"},{label:e("footer.legalLinks.datenschutz"),href:"/datenschutz"},{label:e("footer.legalLinks.widerruf"),href:"/widerruf"},{label:e("footer.legalLinks.agb"),href:"/agb"}];return s.jsxs("footer",{className:"border-t border-border bg-card",role:"contentinfo",children:[s.jsx("div",{className:"container mx-auto px-4 py-12",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-10",children:[s.jsxs("div",{children:[s.jsxs(we,{to:"/",className:"flex items-center gap-2 mb-4","aria-label":"Spirit Festival",children:[s.jsx("img",{src:Gl,alt:"Spirit Festival",className:"h-10 w-auto"}),s.jsx("span",{className:"font-tech text-[9px] text-muted-foreground tracking-[0.3em] uppercase",children:"Festival 2027"})]}),s.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed mb-4",children:e("footer.tagline")}),s.jsx("div",{className:"flex gap-3",children:[{icon:kf,label:"Instagram",href:"https://www.instagram.com/spirit_festival_official?igsh=bGR3Y3VkZDVpYnlq"},{icon:jf,label:"Facebook",href:"https://www.facebook.com/spiritfromthestreet"}].map(({icon:a,label:o,href:l})=>s.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer","aria-label":`${o} (${e("common.openNewTab")})`,className:"w-9 h-9 rounded-lg glass-light border border-border flex items-center justify-center text-muted-foreground hover:text-primary hover:border-primary/50 transition-all duration-200",children:s.jsx(a,{size:16})},o))})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-display text-base tracking-wider text-foreground mb-4",children:e("footer.navigation")}),s.jsx("ul",{className:"space-y-2.5",children:n.map(a=>s.jsx("li",{children:s.jsx(we,{to:a.href,className:"text-sm text-muted-foreground hover:text-primary transition-colors",children:a.label})},a.href))})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-display text-base tracking-wider text-foreground mb-4",children:e("footer.legal")}),s.jsxs("ul",{className:"space-y-2.5",children:[i.map(a=>s.jsx("li",{children:s.jsx(we,{to:a.href,className:"text-sm text-muted-foreground hover:text-primary transition-colors",children:a.label})},a.href)),s.jsx("li",{children:s.jsx("button",{onClick:r,className:"text-sm text-muted-foreground hover:text-primary transition-colors text-left","aria-label":e("footer.legalLinks.cookies"),children:e("footer.legalLinks.cookies")})})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-display text-base tracking-wider text-foreground mb-4",children:e("footer.contact")}),s.jsxs("ul",{className:"space-y-3",children:[s.jsx("li",{children:s.jsxs("a",{href:"mailto:[email protected]",className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-primary transition-colors","aria-label":"E-Mail senden",children:[s.jsx($t,{size:14}),"[email protected]"]})}),s.jsxs("li",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[s.jsx(_r,{size:14,className:"mt-0.5 shrink-0","aria-hidden":"true"}),s.jsxs("span",{children:["Festwiesen Loburg",s.jsx("br",{}),"39279 Loburg bei Magdeburg"]})]})]})]})]})}),s.jsx("div",{className:"border-t border-border",children:s.jsxs("div",{className:"container mx-auto px-4 py-4 flex flex-col sm:flex-row items-center justify-between gap-2 text-xs text-muted-foreground",children:[s.jsx("span",{children:e("footer.copyright",{year:t})}),s.jsx("span",{children:e("footer.company")})]})})]})}var ug="focusScope.autoFocusOnMount",dg="focusScope.autoFocusOnUnmount",V8={bubbles:!1,cancelable:!0},xK="FocusScope",fS=A.forwardRef((e,t)=>
vendor: 4,257 bytes, line 698
698{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[l,c]=A.useState(null),u=Ai(i),d=Ai(a),x=A.useRef(null),f=kr(t,p=>c(p)),h=A.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;A.useEffect(()=>{if(n){let p=function(g){if(h.paused||!l)return;const w=g.target;l.contains(w)?x.current=w:ja(x.current,{select:!0})},v=function(g){if(h.paused||!l)return;const w=g.relatedTarget;w!==null&&(l.contains(w)||ja(x.current,{select:!0}))},y=function(g){if(document.activeElement===document.body)for(const E of g)E.removedNodes.length>0&&ja(l)};document.addEventListener("focusin",p),document.addEventListener("focusout",v);const b=new MutationObserver(y);return l&&b.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",v),b.disconnect()}}},[n,l,h.paused]),A.useEffect(()=>{if(l){q8.add(h);const p=document.activeElement;if(!l.contains(p)){const y=new CustomEvent(ug,V8);l.addEventListener(ug,u),l.dispatchEvent(y),y.defaultPrevented||(fK(vK(hS(l)),{select:!0}),document.activeElement===p&&ja(l))}return()=>{l.removeEventListener(ug,u),setTimeout(()=>{const y=new CustomEvent(dg,V8);l.addEventListener(dg,d),l.dispatchEvent(y),y.defaultPrevented||ja(p??document.body,{select:!0}),l.removeEventListener(dg,d),q8.remove(h)},0)}}},[l,u,d,h]);const m=A.useCallback(p=>{if(!r&&!n||h.paused)return;const v=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,y=document.activeElement;if(v&&y){const b=p.currentTarget,[g,w]=hK(b);g&&w?!p.shiftKey&&y===w?(p.preventDefault(),r&&ja(g,{select:!0})):p.shiftKey&&y===g&&(p.preventDefault(),r&&ja(w,{select:!0})):y===b&&p.preventDefault()}},[r,n,h.paused]);return s.jsx(It.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});fS.displayName=xK;function fK(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(ja(n,{select:t}),document.activeElement!==r)return}function hK(e){const t=hS(e),r=G8(t,e),n=G8(t.reverse(),e);return[r,n]}function hS(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function G8(e,t){for(const r of e)if(!pK(r,{upTo:t}))return r}function pK(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function mK(e){return e instanceof HTMLInputElement&&"select"in e}function ja(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&mK(e)&&t&&e.select()}}var q8=gK();function gK(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Y8(e,t),e.unshift(t)},remove(t){var r;e=Y8(e,t),(r=e[0])==null||r.resume()}}}function Y8(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function vK(e){return e.filter(t=>t.tagName!=="A")}var xg=0;function yK(){A.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Z8()),document.body.insertAdjacentElement("beforeend",e[1]??Z8()),xg++,()=>{xg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xg--}},[])}function Z8(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Zx="right-scroll-bar-position",Xx="width-before-scroll-bar",bK="with-scroll-bars-hidden",EK="--removed-body-scroll-bar-size";function fg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function wK(e,t){var r=A.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}var CK=typeof window<"u"?A.useLayoutEffect:A.useEffect,X8=new WeakMap;function AK(e,t){var r=wK(null,function(n){return e.forEach(function(i){return fg(i,n)})});return CK(function(){var n=X8.get(r);if(n){var i=new Set(n),a=new Set(e),o=r.current;
vendor: 4,196 bytes, lines 698-713
698i.forEach(function(l){a.has(l)||fg(l,null)}),a.forEach(function(l){i.has(l)||fg(l,o)})}X8.set(r,e)},[e]),r}function jK(e){return e}function kK(e,t){t===void 0&&(t=jK);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var o=t(a,n);return r.push(o),function(){r=r.filter(function(l){return l!==o})}},assignSyncMedium:function(a){for(n=!0;r.length;){var o=r;r=[],o.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var o=[];if(r.length){var l=r;r=[],l.forEach(a),o=r}var c=function(){var d=o;o=[],d.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),r}}}};return i}function _K(e){e===void 0&&(e={});var t=kK(null);return t.options=hi({async:!0,ssr:!1},e),t}var pS=function(e){var t=e.sideCar,r=Ac(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return A.createElement(n,hi({},r))};pS.isSideCarExport=!0;function SK(e,t){return e.useMedium(t),pS}var mS=_K(),hg=function(){},jp=A.forwardRef(function(e,t){var r=A.useRef(null),n=A.useState({onScrollCapture:hg,onWheelCapture:hg,onTouchMoveCapture:hg}),i=n[0],a=n[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,x=e.shards,f=e.sideCar,h=e.noRelative,m=e.noIsolation,p=e.inert,v=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,g=e.gapMode,w=Ac(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=f,C=AK([r,t]),j=hi(hi({},w),i);return A.createElement(A.Fragment,null,d&&A.createElement(E,{sideCar:mS,removeScrollBar:u,shards:x,noRelative:h,noIsolation:m,inert:p,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:g}),o?A.cloneElement(A.Children.only(l),hi(hi({},j),{ref:C})):A.createElement(b,hi({},j,{className:c,ref:C}),l))});jp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};jp.classNames={fullWidth:Xx,zeroRight:Zx};var BK=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function NK(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=BK();return t&&e.setAttribute("nonce",t),e}function DK(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function FK(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var PK=function(){var e=0,t=null;return{add:function(r){e==0&&(t=NK())&&(DK(t,r),FK(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},OK=function(){var e=PK();return function(t,r){A.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},gS=function(){var e=OK(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},TK={left:0,top:0,right:0,gap:0},pg=function(e){return parseInt(e||"",10)||0},$K=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[pg(r),pg(n),pg(i)]},IK=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return TK;var t=$K(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},MK=gS(),El="data-scroll-locked",RK=function(e,t,r,n){var i=e.left,a=e.top,o=e.right,l=e.gap;return r===void 0&&(r="margin"),` 699 .`.concat(bK,` { 700 overflow: hidden `).concat(n,`; 701 padding-right: `).concat(l,"px ").concat(n,`; 702 } 703 body[`).concat(El,`] { 704 overflow: hidden `).concat(n,`; 705 overscroll-behavior: contain; 706 `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` 707 padding-left: `.concat(i,`px; 708 padding-top: `).concat(a,`px; 709 padding-right: `).concat(o,`px; 710 margin-left:0; 711 margin-top:0; 712 margin-right: `).concat(l,"px ").concat(n,`; 713 `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";
713")].filter(Boolean).join(""),` 714 } 715 716 .`).concat(Zx,` { 717 right: `).concat(l,"px ").concat(n,`; 718 } 719 720 .`).concat(Xx,` { 721 margin-right: `).concat(l,"px ").concat(n,`; 722 } 723 724 .`).concat(Zx," .").concat(Zx,` { 725 right: 0 `).concat(n,`; 726 } 727 728 .`).concat(Xx," .").concat(Xx,` { 729 margin-right: 0 `).concat(n,`; 730 } 731 732 body[`).concat(El,`] { 733 `).concat(EK,": ").concat(l,`px; 734 } 735`)},Q8=function(){var e=parseInt(document.body.getAttribute(El)||"0",10);return isFinite(e)?e:0},LK=function(){A.useEffect(function(){return document.body.setAttribute(El,(Q8()+1).toString()),function(){var e=Q8()-1;e<=0?document.body.removeAttribute(El):document.body.setAttribute(El,e.toString())}},[])},zK=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;LK();var a=A.useMemo(function(){return IK(i)},[i]);return A.createElement(MK,{styles:RK(a,!t,i,r?"":"!important")})},Ty=!1;if(typeof window<"u")try{var lx=Object.defineProperty({},"passive",{get:function(){return Ty=!0,!0}});window.addEventListener("test",lx,lx),window.removeEventListener("test",lx,lx)}catch{Ty=!1}var Ro=Ty?{passive:!1}:!1,UK=function(e){return e.tagName==="TEXTAREA"},vS=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!UK(e)&&r[t]==="visible")},WK=function(e){return vS(e,"overflowY")},HK=function(e){return vS(e,"overflowX")},J8=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=yS(e,n);if(i){var a=bS(e,n),o=a[1],l=a[2];if(o>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},KK=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},VK=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},yS=function(e,t){return e==="v"?WK(t):HK(t)},bS=function(e,t){return e==="v"?KK(t):VK(t)},GK=function(e,t){return e==="h"&&t==="rtl"?-1:1},qK=function(e,t,r,n,i){var a=GK(e,window.getComputedStyle(t).direction),o=a*n,l=r.target,c=t.contains(l),u=!1,d=o>0,x=0,f=0;do{if(!l)break;var h=bS(e,l),m=h[0],p=h[1],v=h[2],y=p-v-a*m;(m||y)&&yS(e,l)&&(x+=y,f+=m);var b=l.parentNode;l=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(x)<1||!i)||!d&&(Math.abs(f)<1||!i))&&(u=!0),u},cx=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},e5=function(e){return[e.deltaX,e.deltaY]},t5=function(e){return e&&"current"in e?e.current:e},YK=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ZK=function(e){return` 736 .block-interactivity-`.concat(e,` {pointer-events: none;} 737 .allow-interactivity-`).concat(e,` {pointer-events: all;} 738`)},XK=0,Lo=[];function QK(e){var t=A.useRef([]),r=A.useRef([0,0]),n=A.useRef(),i=A.useState(XK++)[0],a=A.useState(gS)[0],o=A.useRef(e);A.useEffect(function(){o.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var p=AU([e.lockRef.current],(e.shards||[]).map(t5),!0).filter(Boolean);return p.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),p.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=A.useCallback(function(p,v){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!o.current.allowPinchZoom;var y=cx(p),b=r.current,g="deltaX"in p?p.deltaX:b[0]-y[0],w="deltaY"in p?p.deltaY:b[1]-y[1],E,C=p.target,j=Math.abs(g)>Math.abs(w)?"h":"v";if("touches"in p&&j==="h"&&C.type==="range")return!1;var S=J8(j,C);if(!S)return!0;if(S?E=j:(E=j==="v"?"h":"v",S=J8(j,C)),!S)return!1;if(!n.current&&"changedTouches"in p&&(g||w)&&(n.current=E),!E)return!0;var _=n.current||E;return qK(_,v,p,_==="h"?g:w,!0)},[]),c=A.useCallback(function(p){var v=p;if(!(!Lo.length||Lo[Lo.length-1]!==a)){var y="deltaY"in v?e5(v):cx(v),b=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&YK(E.delta,y)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}
vendor: 4,334 bytes, line 738
738if(!b){var g=(o.current.shards||[]).map(t5).filter(Boolean).filter(function(E){return E.contains(v.target)}),w=g.length>0?l(v,g[0]):!o.current.noIsolation;w&&v.cancelable&&v.preventDefault()}}},[]),u=A.useCallback(function(p,v,y,b){var g={name:p,delta:v,target:y,should:b,shadowParent:JK(y)};t.current.push(g),setTimeout(function(){t.current=t.current.filter(function(w){return w!==g})},1)},[]),d=A.useCallback(function(p){r.current=cx(p),n.current=void 0},[]),x=A.useCallback(function(p){u(p.type,e5(p),p.target,l(p,e.lockRef.current))},[]),f=A.useCallback(function(p){u(p.type,cx(p),p.target,l(p,e.lockRef.current))},[]);A.useEffect(function(){return Lo.push(a),e.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Ro),document.addEventListener("touchmove",c,Ro),document.addEventListener("touchstart",d,Ro),function(){Lo=Lo.filter(function(p){return p!==a}),document.removeEventListener("wheel",c,Ro),document.removeEventListener("touchmove",c,Ro),document.removeEventListener("touchstart",d,Ro)}},[]);var h=e.removeScrollBar,m=e.inert;return A.createElement(A.Fragment,null,m?A.createElement(a,{styles:ZK(i)}):null,h?A.createElement(zK,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function JK(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const eV=SK(mS,QK);var ES=A.forwardRef(function(e,t){return A.createElement(jp,hi({},e,{ref:t,sideCar:eV}))});ES.classNames=jp.classNames;var tV=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},zo=new WeakMap,ux=new WeakMap,dx={},mg=0,wS=function(e){return e&&(e.host||wS(e.parentNode))},rV=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=wS(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},nV=function(e,t,r,n){var i=rV(t,Array.isArray(e)?e:[e]);dx[r]||(dx[r]=new WeakMap);var a=dx[r],o=[],l=new Set,c=new Set(i),u=function(x){!x||l.has(x)||(l.add(x),u(x.parentNode))};i.forEach(u);var d=function(x){!x||c.has(x)||Array.prototype.forEach.call(x.children,function(f){if(l.has(f))d(f);else try{var h=f.getAttribute(n),m=h!==null&&h!=="false",p=(zo.get(f)||0)+1,v=(a.get(f)||0)+1;zo.set(f,p),a.set(f,v),o.push(f),p===1&&m&&ux.set(f,!0),v===1&&f.setAttribute(r,"true"),m||f.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",f,y)}})};return d(t),l.clear(),mg++,function(){o.forEach(function(x){var f=zo.get(x)-1,h=a.get(x)-1;zo.set(x,f),a.set(x,h),f||(ux.has(x)||x.removeAttribute(n),ux.delete(x)),h||x.removeAttribute(r)}),mg--,mg||(zo=new WeakMap,zo=new WeakMap,ux=new WeakMap,dx={})}},iV=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=tV(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),nV(n,i,r,"aria-hidden")):function(){return null}},kp="Dialog",[CS,U9e]=x0(kp),[aV,ai]=CS(kp),AS=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,l=A.useRef(null),c=A.useRef(null),[u,d]=Z_({prop:n,defaultProp:i??!1,onChange:a,caller:kp});return s.jsx(aV,{scope:t,triggerRef:l,contentRef:c,contentId:qm(),titleId:qm(),descriptionId:qm(),open:u,onOpenChange:d,onOpenToggle:A.useCallback(()=>d(x=>!x),[d]),modal:o,children:r})};AS.displayName=kp;var jS="DialogTrigger",sV=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ai(jS,r),a=kr(t,i.triggerRef);return s.jsx(It.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":IE(i.open),...n,ref:a,onClick:ft(e.onClick,i.onOpenToggle)})});sV.displayName=jS;var TE="DialogPortal",[oV,kS]=CS(TE,{forceMount:void 0}),_S=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=ai(TE,t);return s.jsx(oV,{scope:t,forceMount:r,children:A.Children.map(n,o=>s.jsx(yc,{present:r||a.open,children:s.jsx(aE,{asChild:!0,container:i,children:o})}))})};_S.displayName=TE;var Uf="DialogOverlay",SS=A.forwardRef((e,t)=>{const r=kS(Uf,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=ai(Uf,e.__scopeDialog);return a.modal?s.jsx(yc,{present:n||a.open,children:s.jsx(cV,{...i,ref:t})}):null});SS.displayName=Uf;var lV=nd("DialogOverlay.RemoveScroll"),cV=A.forwardRef((e,t)=>
vendor: 4,629 bytes, lines 738-742
738{const{__scopeDialog:r,...n}=e,i=ai(Uf,r);return s.jsx(ES,{as:lV,allowPinchZoom:!0,shards:[i.contentRef],children:s.jsx(It.div,{"data-state":IE(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),po="DialogContent",BS=A.forwardRef((e,t)=>{const r=kS(po,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=ai(po,e.__scopeDialog);return s.jsx(yc,{present:n||a.open,children:a.modal?s.jsx(uV,{...i,ref:t}):s.jsx(dV,{...i,ref:t})})});BS.displayName=po;var uV=A.forwardRef((e,t)=>{const r=ai(po,e.__scopeDialog),n=A.useRef(null),i=kr(t,r.contentRef,n);return A.useEffect(()=>{const a=n.current;if(a)return iV(a)},[]),s.jsx(NS,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ft(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ft(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&a.preventDefault()}),onFocusOutside:ft(e.onFocusOutside,a=>a.preventDefault())})}),dV=A.forwardRef((e,t)=>{const r=ai(po,e.__scopeDialog),n=A.useRef(!1),i=A.useRef(!1);return s.jsx(NS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),NS=A.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,l=ai(po,r),c=A.useRef(null),u=kr(t,c);return yK(),s.jsxs(s.Fragment,{children:[s.jsx(fS,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:s.jsx(sp,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":IE(l.open),...o,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(xV,{titleId:l.titleId}),s.jsx(hV,{contentRef:c,descriptionId:l.descriptionId})]})]})}),$E="DialogTitle",DS=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ai($E,r);return s.jsx(It.h2,{id:i.titleId,...n,ref:t})});DS.displayName=$E;var FS="DialogDescription",PS=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ai(FS,r);return s.jsx(It.p,{id:i.descriptionId,...n,ref:t})});PS.displayName=FS;var OS="DialogClose",TS=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ai(OS,r);return s.jsx(It.button,{type:"button",...n,ref:t,onClick:ft(e.onClick,()=>i.onOpenChange(!1))})});TS.displayName=OS;function IE(e){return e?"open":"closed"}var $S="DialogTitleWarning",[W9e,IS]=gO($S,{contentName:po,titleName:$E,docsSlug:"dialog"}),xV=({titleId:e})=>{const t=IS($S),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 739 740If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 741 742For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return A.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},fV="DialogDescriptionWarning",hV=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${IS(fV).contentName}}.`;return A.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},pV=AS,mV=_S,MS=SS,RS=BS,LS=DS,zS=PS,gV=TS;const vV=pV,yV=mV,US=A.forwardRef(({className:e,...t},r)=>s.jsx(MS,{ref:r,className:Wr("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));US.displayName=MS.displayName;const WS=A.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(yV,{children:[s.jsx(US,{}),s.jsxs(RS,{ref:n,className:Wr("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
742nded-lg",e),...r,children:[t,s.jsxs(gV,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(_t,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));WS.displayName=RS.displayName;const HS=({className:e,...t})=>s.jsx("div",{className:Wr("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});HS.displayName="DialogHeader";const KS=A.forwardRef(({className:e,...t},r)=>s.jsx(LS,{ref:r,className:Wr("text-lg font-semibold leading-none tracking-tight",e),...t}));KS.displayName=LS.displayName;const VS=A.forwardRef(({className:e,...t},r)=>s.jsx(zS,{ref:r,className:Wr("text-sm text-muted-foreground",e),...t}));VS.displayName=zS.displayName;const GS="2027-08-19";function gg(e){return`${(e/100).toFixed(2).replace(".",",")} â¬`}function Qc(e){return e.net_price_cents>0?Math.round(e.net_price_cents*(1+e.vat_rate/100))+e.fee_cents:e.price_cents}function bV(e){if(!e)return null;const t=new Date(e);if(Number.isNaN(t.getTime()))return null;const r=new Date(GS);if(t>r)return null;let n=r.getFullYear()-t.getFullYear();const i=r.getMonth()-t.getMonth();return(i<0||i===0&&r.getDate()<t.getDate())&&n--,n}function qS({freeCategory:e,halfCategory:t,fullCategory:r,compact:n}){const{addItem:i,openCart:a}=b0(),[o,l]=A.useState(!1),[c,u]=A.useState(""),[d,x]=A.useState(!1),f=A.useMemo(()=>bV(c),[c]),h=A.useMemo(()=>f===null?null:f<4?{kind:"denied",label:"Kein Zutritt für Kinder unter 4 Jahren",cat:void 0,price:0}:f<6?{kind:"free",label:"Kostenfreier Zutritt",cat:e,price:0}:f<12?{kind:"half",label:"Halber Preis (Kinderticket)",cat:t,price:t?Qc(t):0}:{kind:"full",label:"Ab 12 Jahren gilt der volle Ticketpreis",cat:r,price:r?Qc(r):0},[f,e,t,r]),m=!!h&&h.kind!=="denied"&&!!h.cat;function p(){if(!(h!=null&&h.cat))return;const v=h.cat,y=v.total_stock-v.sold_count;i({categoryId:v.id,category:v.category,description:`Geburtsdatum: ${new Date(c).toLocaleDateString("de-DE")} (${f} Jahre beim Festival)`,unitPriceCents:Qc(v),maxQuantity:Math.max(1,Math.min(10,y))}),x(!0),l(!1),u(""),window.setTimeout(()=>x(!1),1800),a()}return s.jsxs(s.Fragment,{children:[s.jsxs("article",{className:`h-full flex flex-col rounded-2xl border border-border bg-card/60 transition-all hover:border-primary/60 hover:shadow-lg hover:shadow-primary/10 ${n?"p-6":"p-7"}`,children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsx("h2",{className:`font-display leading-tight uppercase ${n?"text-base":"text-xl"}`,children:"Kinderticket"}),s.jsx(hT,{size:n?16:20,className:"text-primary shrink-0","aria-hidden":"true"})]}),s.jsx("p",{className:`text-muted-foreground leading-relaxed ${n?"text-xs mt-3":"text-sm mt-4"}`,children:"Preis richtet sich nach dem Alter beim Festival â Geburtsdatum beim Hinzufügen angeben."}),s.jsxs("div",{className:`${n?"mt-5 pt-4":"mt-6 pt-5"} border-t border-border/60`,children:[s.jsxs("p",{className:`flex items-center gap-2 text-destructive font-semibold ${n?"text-xs":"text-sm"}`,children:[s.jsx(bn,{size:n?13:15,className:"shrink-0"})," Unter 4 Jahren: kein Zutritt"]}),s.jsxs("ul",{className:`mt-3 space-y-2.5 ${n?"text-xs":"text-sm"} text-muted-foreground`,children:[s.jsxs("li",{className:"flex items-baseline justify-between gap-3",children:[s.jsx("span",{children:"4â6 Jahre"}),s.jsx("span",{className:"text-primary font-semibold whitespace-nowrap",children:"kostenfrei"})]}),s.jsxs("li",{className:"flex items-baseline justify-between gap-3",children:[s.jsx("span",{children:"6â12 Jahre"}),s.jsxs("span",{className:"text-primary font-semibold whitespace-nowrap",children:["halber Preis",t?` · ${gg(Qc(t))}`:""]})]}),s.jsxs("li",{className:"flex items-baseline justify-between gap-3",children:[s.jsx("span",{children:"ab 12 Jahren"}),s.jsxs("span",{className:"text-foreground font-semibold whitespace-nowrap",children:["voller Preis",r?` · ${gg(Qc(r))}`:""]})]})]})]}),s.jsx("button",{type:"button",onClick:()=>l(!0),className:`mt-auto w-full inline-flex items-center justify-center gap-2 rounded-xl font-bold transition-all bg-primary text-primary-foreground hover:opacity-90 glow-primary ${n?"py-3 text-sm mt-6":"py-3.5 text-sm mt-8"}`,children:d?s.jsxs(s.Fragment,{children:[s.jsx(ti,{size:15})," Hinzugefügt"]}):s.jsxs(s.Fragment,{children:[s.jsx(kn,{size:15})," In den Warenkorb"]})})]}),s.jsx(vV,{open:o,onOpenChange:l,children:s.jsxs(WS,{className:"sm:max-w-md",children:[s.jsxs(HS,{children:[s.jsx(KS,{className:"font-display uppercase",children:"Geburtsdatum des Kindes"}),s.jsx(VS,{children:"Bitte Geburtsdatum eingeben â der Preis wird sofort berechnet."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{htmlFor:"kid-birthday",className:"block text-xs uppercase tracking-wider text-muted-foreground mb-1.5",children:"Geburtsdatum"}),s.jsx("input",{id:"kid-birthday",type:"date",value:c,max:GS,onChange:v=>u(v.target.value),className:"w-full rounded-xl border border-border bg-background px-3 py-2.5 text-sm focus:outline-none focus:border-primary"})]}),s.jsx("div",{"aria-live":"polite",className:"rounded-xl border border-border bg-card/60 p-4",children:h?h.kind==="denied"?s.jsxs("p",{className:"text-sm text-destructive font-semibold inline-flex items-start gap-2",children:[s.jsx(bn,{size:16,className:"mt-0.5 shrink-0"}),"Kinder unter 4 Jahren haben keinen Zutritt zum Festivalgelände."]}):s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Alter beim Festival: ",s.jsxs("span",{className:"text-foreground font-semibold",children:[f," Jahre"]})," · ",h.label]}),s.jsx("p",{className:"font-grunge text-4xl text-primary mt-2",children:h.price===0?"0,00 â¬":gg(h.price)}),s.jsx("p",{className:"text-[11px] text-muted-foreground mt-1",children:h.price===0?"Kostenfrei â bitte zusammen mit einem Erwachsenenticket bestellen.":"inkl. MwSt. · zzgl. 10 % Bearbeitungsgebühr"})]}):s.jsx("p",{className:"text-sm text-muted-foreground",children:"Noch kein gültiges Datum eingegeben."})}),s.jsxs("button",{type:"button",disabled:!m,onClick:p,className:`w-full inline-flex items-center justify-center gap-2 py-3 rounded-xl text-sm font-bold transition-all ${m?"bg-primary text-primary-foreground hover:opacity-90 glow-primary":"bg-muted text-muted-foreground cursor-not-allowed"}`,children:[s.jsx(kn,{size:15})," In den Warenkorb"]})]})]})})]})}function r5(e,t){const r=new Date(e),n={day:"numeric",month:"long",year:"numeric"};
742if(!t)return r.toLocaleDateString("de-DE",n);const i=new Date(t);return`${r.toLocaleDateString("de-DE",{day:"numeric"})}. â ${i.toLocaleDateString("de-DE",n)}`}function EV(e){return`${(e/100).toFixed(2).replace(".",",")} â¬`}function n5(e){return e.net_price_cents>0?Math.round(e.net_price_cents*(1+e.vat_rate/100))+e.fee_cents:e.price_cents}function wV(e){const t=new Date;return!(e.sale_from&&new Date(e.sale_from)>t||e.sale_until&&new Date(e.sale_until)<t)}function CV(){const[e,t]=A.useState(null),[r,n]=A.useState([]),[i,a]=A.useState(!0),[o,l]=A.useState(null),{addItem:c,openCart:u,setEventInfo:d,items:x,totalQuantity:f}=b0();A.useEffect(()=>{async function g(){a(!0);const{data:w}=await re.from("events").select("*").eq("status","approved").order("date_start",{ascending:!1}).limit(1),E=(w??[])[0]??null;if(t(E),E){const{data:C}=await re.from("ticket_categories").select("*").eq("event_name",E.title).order("price_cents",{ascending:!1});n(C??[]),d({id:E.id,title:E.title,date:E.date_start,dateLabel:r5(E.date_start,E.date_end),location:E.location,address:E.address??"",timeStart:E.time_start??""})}a(!1)}g()},[]);const h=e?r5(e.date_start,e.date_end):"",m=r.find(g=>g.category.startsWith("Kinderticket 4")),p=r.find(g=>
742g.category.startsWith("Kinderticket 6")),v=r.find(g=>g.category.toUpperCase().includes("WOCHENENDTICKET")),y=r.filter(g=>!g.category.startsWith("Kinderticket"));function b(g){c({categoryId:g.id,category:g.category,description:g.description,unitPriceCents:n5(g),maxQuantity:Math.max(1,Math.min(10,g.total_stock-g.sold_count))}),l(g.id),window.setTimeout(()=>l(w=>w===g.id?null:w),1600)}return s.jsxs(s.Fragment,{children:[s.jsx(Sr,{}),s.jsxs("main",{id:"main-content",className:"pt-20 min-h-screen",children:[s.jsx("section",{className:"py-20 bg-card/50 border-b border-border text-center","aria-label":"Ticketshop Ãberschrift",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-2",children:e?h:"Spirit Festival"}),s.jsx("h1",{className:"font-grunge text-6xl md:text-9xl",children:s.jsx("span",{className:"grunge-eroded",children:"TICKETSHOP"})}),s.jsx("div",{className:"w-24 h-0.5 bg-primary mx-auto mt-4 glow-primary"}),s.jsx("p",{className:"text-muted-foreground mt-4 max-w-lg mx-auto",children:"Drei Tage Punk, Oi!, Ska & Rock â sichere dir jetzt dein Ticket. Nach der Zahlung bekommst du dein E-Ticket samt QR-Code direkt per E-Mail."}),e&&s.jsxs("div",{className:"flex flex-wrap justify-center gap-x-6 gap-y-2 mt-6 text-sm text-muted-foreground",children:[s.jsxs("span",{className:"inline-flex items-center gap-2",children:[s.jsx(Lr,{size:15,className:"text-primary"}),h]}),s.jsxs("span",{className:"inline-flex items-center gap-2",children:[s.jsx(_r,{size:15,className:"text-primary"}),e.location]})]})]})}),s.jsx("section",{className:"py-16","aria-label":"Ticketkategorien","aria-live":"polite",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-5xl",children:[i?s.jsxs("div",{className:"flex flex-col items-center py-20 text-muted-foreground gap-3",children:[s.jsx(ar,{size:32,className:"animate-spin text-primary"}),s.jsx("p",{className:"text-sm",children:"Tickets werden geladenâ¦"})]}):r.length===0?s.jsxs("div",{className:"text-center py-20",children:[s.jsx("div",{className:"w-16 h-16 rounded-2xl glass border border-border flex items-center justify-center mx-auto mb-4",children:s.jsx(Pt,{size:28,className:"text-muted-foreground"})}),s.jsx("h2",{className:"font-display text-3xl mb-2",children:"AKTUELL KEINE TICKETS"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Der Ticketverkauf startet in Kürze â trag dich in den Newsletter ein, um nichts zu verpassen."})]}):s.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[y.map((g,w)=>{var I;const E=n5(g),C=g.total_stock-g.sold_count,j=C<=0,S=wV(g),_=S&&!j,O=((I=x.find(B=>B.categoryId===g.id))==null?void 0:I.quantity)??0;return s.jsx(Ce,{delay:w*100,children:s.jsxs("article",{className:`h-full flex flex-col rounded-2xl border bg-card/60 p-6 transition-all ${_?"border-border hover:border-primary/60 hover:shadow-lg hover:shadow-primary/10":"border-border/60 opacity-70"}`,children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsx("h2",{className:"font-display text-xl leading-tight uppercase",children:g.category}),s.jsx(Pt,{size:20,className:"text-primary shrink-0","aria-hidden":"true"})]}),g.description&&s.jsx("p",{className:"text-sm text-muted-foreground mt-3",children:g.description}),s.jsxs("div",{className:"mt-5",children:[s.jsx("span",{className:"font-grunge text-4xl text-primary",children:EV(E)}),s.jsx("span",{className:"block text-[11px] text-muted-foreground mt-1",children:"inkl. MwSt. · zzgl. 10 % Bearbeitungsgebühr"})]}),s.jsxs("div",{className:"mt-4 text-xs text-muted-foreground inline-flex items-center gap-2",children:[s.jsx(Je,{size:13,className:"text-primary"}),j?"Ausverkauft":C<=50?`Nur noch ${C} verfügbar`:"Verfügbar",O>0&&s.jsxs("span",{className:"text-primary",children:["· ",O,"à im Warenkorb"]})]}),s.jsx("button",{type:"button",disabled:!_,onClick:()=>b(g),className:`mt-6 w-full inline-flex items-center justify-center gap-2 py-3 rounded-xl text-sm font-bold transition-all ${_?"bg-primary text-primary-foreground hover:opacity-90 glow-primary":"bg-muted text-muted-foreground cursor-not-allowed"}`,children:j?"Ausverkauft":S?o===g.id?s.jsxs(s.Fragment,{children:[s.jsx(ti,{size:15})," Hinzugefügt"]}):s.jsxs(s.Fragment,{children:[s.jsx(kn,{size:15})," In den Warenkorb"]}):"Noch nicht im Verkauf"})]})},g.id)}),(m||p)&&s.jsx(Ce,{delay:y.length*100,children:s.jsx(qS,{freeCategory:m,halfCategory:p,fullCategory:v})})]}),s.jsx("div",{className:"grid gap-4 sm:grid-cols-3 mt-12",children:[{icon:$t,title:"E-Ticket per Mail",text:"Sofort nac
742h Zahlungseingang inkl. Rechnung als PDF."},{icon:ha,title:"Sichere Zahlung",text:"Kreditkarte, PayPal, SEPA & Klarna über Mollie."},{icon:A4,title:"Gelände & Camping",text:"Alle Bereiche findest du im Lageplan."}].map(g=>s.jsxs("div",{className:"rounded-xl border border-border bg-card/40 p-5",children:[s.jsx(g.icon,{size:18,className:"text-primary mb-2","aria-hidden":"true"}),s.jsx("h3",{className:"font-display text-base uppercase",children:g.title}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:g.text})]},g.title))}),s.jsxs("div",{className:"text-center mt-10 flex flex-wrap justify-center gap-4",children:[f>0&&s.jsxs("button",{type:"button",onClick:u,className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-xl bg-primary text-primary-foreground text-sm font-bold glow-primary hover:opacity-90 transition-all",children:[s.jsx(kn,{size:15})," Warenkorb (",f,") · zur Kasse"]}),s.jsx(we,{to:"/lageplan",className:"px-5 py-2.5 rounded-xl border border-border text-sm hover:border-primary/60 hover:text-primary transition-all",children:"Lageplan ansehen"}),s.jsx(we,{to:"/my-tickets",className:"px-5 py-2.5 rounded-xl border border-border text-sm hover:border-primary/60 hover:text-primary transition-all",children:"Meine Tickets"})]})]})})]}),s.jsx(Br,{})]})}const Gi=[{name:"Betontod",genre:"Deutschpunk",instagram:"https://www.instagram.com/betontod1990",spotify:"https://open.spotify.com/artist/1yHqgdbtHjBHnyc1Qk0b1f",website:"https://www.betontod.de",tier:"headliner",bio:"Punkrock-Hymnen aus Rheinberg â seit über 30 Jahren eine der gröÃten Live-Bands der deutschen Punkszene."},{name:"Die Kassierer",genre:"Fun-Punk",spotify:"https://open.spotify.com/artist/2ZlR9RxLbLLQBDNPFUZ9Cp",website:"https://www.diekassierer.de",tier:"headliner",bio:"Bochumer Kult-Punk mit Humor unter der Gürtellinie â seit den 80ern eine Klasse für sich."},{name:"Dritte Wahl",genre:"Deutschpunk",spotify:"https://open.spotify.com/artist/7zhSE4Ry047wUsemXtAzq9",website:"https://www.drittewahl.de",tier:"headliner",bio:"Rostocker Punkrock-Institution, laut, politisch und mit unverwechselbarem Ost-Charme."},{name:"The Exploited",genre:"UK82 / Punk",spotify:"https://open.spotify.com/artist/6NB4b8lltHCjOhW7vQZkAy",website:"https://the-exploited.net",tier:"headliner",bio:"Schottische Punk-Legenden. Wattie und Co. definieren seit 1979, wie roh Punk klingen darf."},{name:"Oxo 86",genre:"Oi! / Punkrock",spotify:"https://open.spotify.com/artist/0HsB2g2AEmb44yfaKKUtF5",tier:"headliner",bio:"Oi!-Klassiker aus Ostdeutschland â Mitgröl-Refrains und StraÃenpunk mit Herz."},{name:"Slime",genre:"Deutschpunk",spotify:"https://open.spotify.com/artist/12vN2Dsop9hTkjq5Xr3mf3",website:"https://www.slime.de",tier:"headliner",bio:"Die Hamburger Urgesteine des deutschen Punk â kompromisslos politisch, kompromisslos laut."},{name:"Stomper 98",genre:"Oi! / Skinhead Reggae",website:"https://en.stomper98.de",tier:"headliner",bio:"Göttinger Oi!-Aushängeschild mit Bläsern, Soul und StraÃen-Attitüde."},{name:"The Other",genre:"Horrorpunk",spotify:"https://open.spotify.com/artist/0a3Gua6g9TZBKlDSqebL7W",website:"https://theother.de",tier:"headliner",bio:"Deutschlands Horrorpunk-Fürsten â düstere Melodien, Grusel-Show und Punkrock-Wucht."},{name:"ZSK",genre:"Politpunk",instagram:"https://instagram.com/zskberlin",spotify:"https://open.spotify.com/artist/1uVlxzx7r6LBQsY4yqyxSa",website:"https://www.zsk.berlin",tier:"main",bio:"Berliner Punkrock mit klarer Kante gegen Rechts â live eine einzige SchweiÃperle."},{name:"Berliner Weisse",genre:"Deutschpunk",website:"http://berliner-weisse.com",tier:"main",bio:"Berliner Punkrock mit Humor, Herz und Kneipen-Chören."},{name:"Ryker's",genre:"Hardcore",instagram:"https://www.instagram.com/rykers_httc",spotify:"https://open.spotify.com/artist/2cZsml2zs2AUNFVFgLSPYX",tier:"main",bio:"Deutscher Old-School-Hardcore der Extraklasse â Moshpit garantiert."},{name:"Barcode",genre:"Oi! / Streetpunk",tier:"main",bio:"StraÃenpunk mit FuÃball-Chören und Whiskey-Stimme."},{name:"Cockney Rejects",genre:"Oi! (UK)",spotify:"https://open.spotify.com/artist/4EfSXeVFbCEYIde3E9k4wr",website:"https://www.cockneyrejects.com",tier:"main",bio:"Die Erfinder des Oi! aus dem Londoner East End."},{name:"Buster Shuffle",genre:"Ska / Piano Punk",spotify:"https://open.spotify.com/artist/52g6DEmghtDNa19ehPw9uM",website:"https://bustershufflemusic.com",tier:"main",bio:"Londoner Klavier-Ska â Party auf Bühnenniveau."},{name:"Montreal",genre:"Punkrock",spotify:"https://open.spotify.com/artist/1WBgY3ppwWenEynLyKUNRk",website:"https://www.montrealmusic.de",tier:"main",bio:"Hamburger Punkrock mit Ohrwurm-Garantie und Bläsersätzen."},{name:"Focus.",genre:"Punkrock",website:"https://focus-band.de",tier:"main",bio:"Melodischer Punkrock mit deutschen Texten und viel Wumms."},{name:"Butterwegge",genre:"Deutschpunk",website:"https://der-butterwegge.de",tier:"main",bio:"Dreckiger Punkrock mit Haltung."},{name:"Alpheus",genre:"Ska / Reggae",spotify:"https://open.spotify.com/artist/6AWmn7GNZJSsnC2ObP1YIN",website:"https://www.alpheus.store",tier:"main",bio:"Jamaikanische Reggae- und Ska-Stimme mit Vintage-Sound."},{name:"Drei Meter Feldweg",genre:"Deutschpunk",spotify:"https://open.spotify.com/artist/5FO43KoYFkPnekVZ1hN46I",website:"https://drei-meter-feldweg.de",tier:"main",bio:"Punkrock aus Sachsen-Anhalt â ehrlich, laut, nah dran."},{name:"Rantanplan",genre:"Ska-Punk",tier:"main",bio:"Hamburger Ska-Punk-Klassiker, seit den 90ern Dauergäste der Festivalbühnen."},{name:"Mr. Symarip",genre:"Skinhead Reggae",instagram:"https://www.instagram.com/mrsymarip",spotify:"https://open.spotify.com/artist/62WqEN59Hl7Q1K8Vlt33Mo",website:"http://www.symarip.com",tier:"main",bio:"Skinhead-Reggae-Legende â Original-Sound der Trojan-Ãra."},{name:"The Headlines",genre:"Streetpunk",spotify:"https://open.spotify.com/artist/4UEJ1BN9aU7QKDyI05yEPE",website:"https://www.theheadlinesband.com",tier:"main",bio:"Schwedischer Melodie-Streetpunk mit Hymnenpotenzial."},{name:"Elfmorgen",genre:"Punkrock",spotify:"https://open.spotify.com/artist/47oUEgg0OXCUJUHUUzd7TH",website:"https://www.elfmorgen.de",tier:"main",bio:"Punkrock mit deutschen Texten zwischen Wut und Wehmut."},{name:"Deadline",genre:"Punkrock",tier:"main",bio:"Rotzige Punkrock-Attacke mit Tempo und Mitsing-Refrains."},{name:"Jawless",genre:"Punk / Hardcore",tier:"support"}
742,{name:"Gruppa Karl-Marx-Stadt",genre:"Oi! / Punk",instagram:"https://www.instagram.com/gruppakarlmarxstadt",spotify:"https://open.spotify.com/artist/6yMCug4E6pJadTvp3RyaW1",website:"https://gruppa-kms.de",tier:"support"},{name:"Muuske",genre:"Punkrock",instagram:"https://www.instagram.com/muuske.band",tier:"support"},{name:"Last Caress",genre:"Punkrock",tier:"support"},{name:"Soifass",genre:"Deutschpunk",tier:"support"},{name:"Normalböse",genre:"Punkrock",spotify:"https://open.spotify.com/artist/04zoObw32BL4lA0ai6mBDf",website:"https://www.normalboese.de",tier:"support"},{name:"Inge & Heinz",genre:"Punk / Comedy",website:"https://www.inge-und-heinz.de",tier:"support"},{name:"Barney Army",genre:"Streetpunk",tier:"support"},{name:"Biertoifel",genre:"Deutschpunk",tier:"support"},{name:"Crushing Caspars",genre:"Hardcore",spotify:"https://open.spotify.com/artist/27o1OjyYtNpYFQf58dZssm",website:"https://www.crushingcaspars.com",tier:"support"}],AV=1,jV="be35e278-f04c-40dd-a178-c19e4656d463",kV="00ad90eb-066c-4de9-bf8e-eb51401bc797",_V="/__l5e/assets-v1/be35e278-f04c-40dd-a178-c19e4656d463/oxo-86.jpg",SV="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/be35e278-f04c-40dd-a178-c19e4656d463/oxo-86.jpg",BV="oxo-86.jpg",NV=390043,DV="image/jpeg",FV="2026-08-11T20:00:26Z",PV={version:AV,asset_id:jV,project_id:kV,url:_V,r2_key:SV,original_filename:BV,size:NV,content_type:DV,created_at:FV},OV=1,TV="5c64f2dd-913f-4477-aefb-4f75c4f2f2cc",$V="00ad90eb-066c-4de9-bf8e-eb51401bc797",IV="/__l5e/assets-v1/5c64f2dd-913f-4477-aefb-4f75c4f2f2cc/the-other.jpg",MV="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/5c64f2dd-913f-4477-aefb-4f75c4f2f2cc/the-other.jpg",RV="the-other.jpg",LV=181930,zV="image/jpeg",UV="2026-08-11T20:00:30Z",WV={version:OV,asset_id:TV,project_id:$V,url:IV,r2_key:MV,original_filename:RV,size:LV,content_type:zV,created_at:UV},HV=1,KV="b1d77d85-738c-4fc6-b719-b7978e502f3e",VV="00ad90eb-066c-4de9-bf8e-eb51401bc797",GV="/__l5e/assets-v1/b1d77d85-738c-4fc6-b719-b7978e502f3e/zsk.jpg",qV="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/b1d77d85-738c-4fc6-b719-b7978e502f3e/zsk.jpg",YV="zsk.jpg",ZV=178805,XV="image/jpeg",QV="2026-08-11T20:00:34Z",JV={version:HV,asset_id:KV,project_id:VV,url:GV,r2_key:qV,original_filename:YV,size:ZV,content_type:XV,created_at:QV},eG=1,tG="8018ab5b-c23f-4140-bfaf-1875c6319701",rG="00ad90eb-066c-4de9-bf8e-eb51401bc797",nG="/__l5e/assets-v1/8018ab5b-c23f-4140-bfaf-1875c6319701/cockney-rejects.jpg",iG="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/8018ab5b-c23f-4140-bfaf-1875c6319701/cockney-rejects.jpg",aG="cockney-rejects.jpg",sG=389744,oG="image/jpeg",lG="2026-08-11T20:00:38Z",cG={version:eG,asset_id:tG,project_id:rG,url:nG,r2_key:iG,original_filename:aG,size:sG,content_type:oG,created_at:lG},uG=1,dG="8a45c72f-f3ba-4c51-bb5c-3d685b19287b",xG="00ad90eb-066c-4de9-bf8e-eb51401bc797",fG="/__l5e/assets-v1/8a45c72f-f3ba-4c51-bb5c-3d685b19287b/buster-shuffle.jpg",hG="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/8a45c72f-f3ba-4c51-bb5c-3d685b19287b/buster-shuffle.jpg",pG="buster-shuffle.jpg",mG=509383,gG="image/jpeg",vG="2026-08-11T20:00:46Z",yG={version:uG,asset_id:dG,project_id:xG,url:fG,r2_key:hG,original_filename:pG,size:mG,content_type:gG,created_at:vG},bG=1,EG="a8ab39cf-24e4-4fa6-99b6-bf9200e046df",wG="00ad90eb-066c-4de9-bf8e-eb51401bc797",CG="/__l5e/assets-v1/a8ab39cf-24e4-4fa6-99b6-bf9200e046df/drei-meter-feldweg.jpg",AG="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/a8ab39cf-24e4-4fa6-99b6-bf9200e046df/drei-meter-feldweg.jpg",jG="drei-meter-feldweg.jpg",kG=94945,_G="image/jpeg",SG="2026-08-11T20:00:51Z",BG={version:bG,asset_id:EG,project_id:wG,url:CG,r2_key:AG,original_filename:jG,size:kG,content_type:_G,created_at:SG},NG=1,DG="8a333022-8cb9-4370-b00b-500c26ea7a21",FG="00ad90eb-066c-4de9-bf8e-eb51401bc797",PG="/__l5e/assets-v1/8a333022-8cb9-4370-b00b-500c26ea7a21/rantanplan.jpg",OG="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/8a333022-8cb9-4370-b00b-500c26ea7a21/rantanplan.jpg",TG="rantanplan.jpg",$G=236124,IG="image/jpeg",MG="2026-08-11T20:00:55Z",RG={version:NG,asset_id:DG,project_id:FG,url:PG,r2_key:OG,original_filename:TG,size:$G,content_type:IG,created_at:MG},LG=1,zG="9138fc54-7a2b-4ea6-b346-0f4605585157",UG="00ad90eb-066c-4de9-bf8e-eb51401bc797",WG="/__l5e/assets-v1/9138fc54-7a2b-4ea6-b346-0f4605585157/elfmorgen.jpg",HG="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/9138fc54-7a2b-4ea6-b346-0f4605585157/elfmorgen.jpg",KG="elfmorgen.jpg",VG=331732,GG="image/jpeg",qG="2026-08-11T20:00:59Z",YG={version:LG,asset_id:zG,project_id:UG,url:WG,r2_key:HG,original_filename:KG,size:VG,content_type:GG,created_at:qG},ZG=1,XG="b55b3aed-8b93-42e8-a0cc-0b7bfc641fb2",QG="00ad90eb-066c-4de9-bf8e-eb51401bc797",JG="/__l5e/assets-v1/b55b3aed-8b93-42e8-a0cc-0b7bfc641fb2/gruppa-karl-marx-stadt.jpg",eq="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/b55b3aed-8b93-42e8-a0cc-0b7bfc641fb2/gruppa-karl-marx-stadt.jpg",tq="gruppa-karl-marx-stadt.jpg",rq=276674,nq="image/jpeg",iq="2026-08-11T20:01:03Z",aq={version:ZG,asset_id:XG,project_id:QG,url:JG,r2_key:eq,original_filename:tq,size:rq,content_type:nq,created_at:iq},sq=1,oq="a702d389-99fa-4a72-a079-b374c3f6e1a5",lq="00ad90eb-066c-4de9-bf8e-eb51401bc797",cq="/__l5e/assets-v1/a702d389-99fa-4a72-a079-b374c3f6e1a5/crushing-caspars.jpg",uq="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/a702d389-99fa-4a72-a079-b374c3f6e1a5/crushing-caspars.jpg",dq="crushing-caspars.jpg",xq=327988,fq="image/jpeg",hq="2026-08-11T20:01:07Z",pq={version:sq,asset_id:oq,project_id:lq,url:cq,r2_key:uq,original_filename:dq,size:xq,content_type:fq,created_at:hq},mq=1,gq="2787c934-a77a-45a6-979e-6bc6f37c2e92",vq="00ad90eb-066c-4de9-bf8e-eb51401bc797",yq="/__l5e/assets-v1/2787c934-a77a-45a6-979e-6bc6f37c2e92/mr-symarip.jpg",bq="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/2787c934-a77a-45a6-979e-6bc6f37c2e92/mr-symarip.jpg",Eq="mr-symarip.jpg",wq=177253,Cq="image/jpeg",Aq="2026-08-11T20:01:11Z",jq={version:mq,asset_id:gq,project_id:vq,url:yq,r2_key:bq,original_filename:Eq,size:wq,content_type:Cq,created_at:Aq},kq=1,_q="f176d587-e630-4042-8181-e0f25fc1c50a",Sq="00ad90eb-066c-4de9-bf8e-eb51401bc797",Bq="/__l5e/assets-v1/f176d587-e630-4042-8181-e0f25fc1c50a/dritte-wahl.jpg",Nq="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/f176d587-e630-4042-8181-e0f25fc1c50a/dritte-wahl.jpg",Dq="dritte-wahl.jpg",Fq=319051,Pq="image/jpeg",Oq="2026-08-11T20:01:14Z",Tq={version:kq,asset_id:_q,project_id:Sq,url:Bq,r2_key:Nq,original_filename:Dq,size:Fq,content_type:Pq,created_at:Oq},$q=1,Iq="71e92db4-38c0-4211-8b03-230c73db5965",Mq="00ad90eb-066c-4de9-bf8e-eb51401bc797",Rq="/__l5e/assets-v1/71e92db4-38c0-4211-8b03-230c73db5965/ryker-s.jpg",Lq="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/71e92db4-38c0-4211-8b03-230c73db5965/ryker-s.jpg",zq="ryker-s.jpg",Uq=321729,Wq="image/jpeg",Hq="2026-08-11T20:01:17Z",Kq={version:$q,asset_id:Iq,project_id:Mq,url:Rq,r2_key:Lq,original_filename:zq,size:Uq,content_type:Wq,created_at:Hq},Vq=1,Gq="f0834d03-baa2-4aa3-b133-4ab5dc02c183",qq="00ad90eb-066c-4de9-bf8e-eb51401bc797",Yq="/__l5e/assets-v1/f0834d03-baa2-4aa3-b133-4ab5dc02c183/betontod.jpg",Zq="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/f0834d03-baa2-4aa3-b133-4ab5dc02c183/betontod.jpg",Xq="betontod.jpg",Qq=226605,Jq="image/jpeg",eY="2026-08-11T20:01:20Z",tY={version:Vq,asset_id:Gq,project_id:qq,url:Yq,r2_key:Zq,original_filename:Xq,size:Qq,content_type:Jq,created_at:eY},rY=1,nY="88142bdd-8432-458b-9729-1d3cfba9d4a3",iY="00ad90eb-066c-4de9-bf8e-eb51401bc797",aY="/__l5e/assets-v1/88142bdd-8432-458b-9729-1d3cfba9d4a3/slime.jpg",sY="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/88142bdd-8432-458b-9729-1d3cfba9d4a3/slime.jpg",oY="slime.jpg",lY=83077,cY="image/jpeg",uY="2026-08-11T20:01:23Z",dY={version:rY,asset_id:nY,project_id:iY,url:aY,r2_key:sY,original_filename:oY,size:lY,content_type:cY,created_at:uY},xY=1,fY="b3e72977-3a50-426d-9d99-3b2042f0f511",hY="00ad90eb-066c-4de9-bf8e-eb51401bc797",pY="/__l5e/assets-v1/b3e72977-3a50-426d-9d99-3b2042f0f511/the-exploited.jpg",mY="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/b3e72977-3a50-426d-9d99-3b2042f0f511/the-exploited.jpg",gY="the-exploited.jpg",vY=181063,yY="image/jpeg",bY="2026-08-11T20:01:27Z",EY={version:xY,asset_id:fY,project_id:hY,url:pY,r2_key:mY,original_filename:gY,size:vY,content_type:yY,created_at:bY},wY=1,CY="7820aa85-f94a-4b23-893e-e86cbe139d81",AY="00ad90eb-066c-4de9-bf8e-eb51401bc797",jY="/__l5e/assets-v1/7820aa85-f94a-4b23-893e-e86cbe139d81/alpheus.jpg",kY="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/7820aa85-f94a-4b23-893e-e86cbe139d81/alpheus.jpg",_Y="alpheus.jpg",SY=613617,BY="image/jpeg",NY="2026-08-26T11:20:45Z",DY={version:wY,asset_id:CY,project_id:AY,url:jY,r2_key:kY,original_filename:_Y,size:SY,content_type:BY,created_at:NY},FY=1,PY="d16d128d-f744-4b5d-848c-f636d16ed7d9",OY="00ad90eb-066c-4de9-bf8e-eb51401bc797",TY="/__l5e/assets-v1/d16d128d-f744-4b5d-848c-f636d16ed7d9/montreal.jpg",$Y="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/d16d128d-f744-4b5d-848c-f636d16ed7d9/montreal.jpg",IY="montreal.jpg",MY=192588,RY="image/jpeg",LY="2026-08-26T11:20:49Z",zY={version:FY,asset_id:PY,project_id:OY,url:TY,r2_key:$Y,original_filename:IY,size:MY,content_type:RY,created_at:LY},UY=1,WY="e558781b-f3ca-4ce3-94a1-59af831f723a",HY="00ad90eb-066c-4de9-bf8e-eb51401bc797",KY="/__l5e/assets-v1/e558781b-f3ca-4ce3-94a1-59af831f723a/die-kassierer.jpg",VY="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/e558781b-f3ca-4ce3-94a1-59af831f723a/die-kassierer.jpg",GY="die-kassierer.jpg",qY=177282,YY="image/jpeg",ZY="2026-08-26T11:17:48Z",XY={version:UY,asset_id:WY,project_id:HY,url:KY,r2_key:VY,original_filename:GY,size:qY,content_type:YY,created_at:ZY},QY=1,JY="cdf6bab2-444f-434b-ae75-aaf731c0219d",eZ="00ad90eb-066c-4de9-bf8e-eb51401bc797",tZ="/__l5e/assets-v1/cdf6bab2-444f-434b-ae75-aaf731c0219d/stomper-98.jpg",rZ="a/v1/00ad90eb-066c-4de9-bf8e-eb51401bc797/cdf6bab2-444f-434b-ae75-aaf731c0219d/stomper-98.jpg",nZ="stomper-98.jpg",iZ=240918,aZ="image/jpeg",sZ="2026-08-11T20:01:29Z",oZ={version:QY,asset_id:JY,project_id:eZ,url:tZ,r2_key:rZ,original_filename:nZ,size:iZ,content_type:aZ,created_at:sZ},lZ={"Oxo 86":{url:PV.url,credit:"Frank Schwichtenberg · CC BY-SA 4.0 · Wikimedia Commons"},"The Other":{url:WV.url,credit:"S. Bollmann · CC BY-SA 3.0 · Wikimedia Commons"},ZSK:{url:JV.url,credit:"Achim Raschka (talk) · CC BY-SA 4.0 · Wikimedia Commons"},"Cockney Rejects":{url:cG.url,credit:"Smial (talk) · FAL · Wikimedia Commons"},"Buster Shuffle":{url:yG.url,credit:"Frank Schwichtenberg · CC BY-SA 3.0 · Wikimedia Commons"}
742,"Drei Meter Feldweg":{url:BG.url,credit:"NickvanderWudel · CC BY-SA 4.0 · Wikimedia Commons"},Rantanplan:{url:RG.url,credit:"Franz Deelmann · CC BY-SA 3.0 de · Wikimedia Commons"},Elfmorgen:{url:YG.url,credit:"Elfmorgen · CC BY-SA 4.0 · Wikimedia Commons"},"Gruppa Karl-Marx-Stadt":{url:aq.url,credit:"Schorle · CC BY-SA 4.0 · Wikimedia Commons"},"Crushing Caspars":{url:pq.url,credit:"S. Bollmann · CC BY-SA 4.0 · Wikimedia Commons"},"Mr. Symarip":{url:jq.url,credit:"Michael Kranewitter · CC BY 2.5 · Wikimedia Commons"},"Dritte Wahl":{url:Tq.url,credit:"Arne List · CC BY-SA 3.0 · Wikimedia Commons"},"Ryker's":{url:Kq.url,credit:"Z thomas · CC BY-SA 4.0 · Wikimedia Commons"},Betontod:{url:tY.url,credit:"Frank Schwichtenberg · CC BY-SA 4.0 · Wikimedia Commons"},Slime:{url:dY.url,credit:"San Andreas · CC BY-SA 4.0 · Wikimedia Commons"},"The Exploited":{url:EY.url,credit:"Gaudencio Garcinuño · CC BY-SA 2.0 · Wikimedia Commons"},Alpheus:{url:DY.url,credit:"Jeroen Komen · CC BY-SA 2.0 · Wikimedia Commons"},Montreal:{url:zY.url,credit:"JoeJoeJoe93 · CC BY-SA 3.0 · Wikimedia Commons"},"Die Kassierer":{url:XY.url,credit:"Fotandi · CC BY-SA 4.0 · Wikimedia Commons"},"Stomper 98":{url:oZ.url,credit:"Toad77 · CC BY-SA 4.0 · Wikimedia Commons"}};function i5({band:e,className:t=""}){const r=lZ[e.name];return r?s.jsxs("figure",{className:`relative overflow-hidden border-b border-border xerox-overlay grain-overlay ${t}`,children:[s.jsx("img",{src:r.url,alt:`${e.name} live`,loading:"lazy",className:"w-full h-full object-cover xerox-img grayscale-[0.35] transition-transform duration-700 hover:scale-105"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-card via-card/20 to-transparent z-[2]"}),s.jsx("figcaption",{className:"absolute bottom-1 right-1 z-[3] text-[8px] text-muted-foreground/70 bg-background/60 px-1 rounded",children:r.credit})]}):s.jsx("div",{className:`relative overflow-hidden bg-background halftone flex items-center justify-center border-b border-border ${t}`,children:s.jsx("span",{className:"font-grunge text-5xl text-primary/40 leading-none select-none",children:e.name.slice(0,2).toUpperCase()})})}const cZ=[{id:"alle",label:"Alle Bands"},{id:"headliner",label:"Headliner"},{id:"main",label:"Bands"},{id:"support",label:"Newcomer & mehr"}];function vg({band:e}){const r=[{href:e.spotify??`https://open.spotify.com/search/${encodeURIComponent(e.name)}`,label:"Musik hören",Icon:PT},e.instagram&&{href:e.instagram,label:"Instagram",Icon:kf},e.website&&{href:e.website,label:"Website",Icon:AT}].filter(Boolean);return r.length===0?null:s.jsx("div",{className:"flex flex-wrap gap-2 mt-4",children:r.map(({href:n,label:i,Icon:a})=>s.jsxs("a",{href:n,target:"_blank",rel:"noopener noreferrer","aria-label":`${e.name} â ${i}`,className:"inline-flex items-center gap-1.5 px-2.5 py-1.5 border border-border rounded text-[11px] uppercase tracking-widest hover:border-primary hover:text-primary transition-colors",children:[s.jsx(a,{size:12})," ",i]},i))})}function uZ(){const[e,t]=A.useState("alle"),r=A.useMemo(()=>Gi.filter(c=>c.tier==="headliner"),[]),n=A.useMemo(()=>Gi.filter(c=>c.tier==="main"),[]),i=A.useMemo(()=>Gi.filter(c=>c.tier==="support"),[]),a=e==="alle"||e==="headliner",o=e==="alle"||e==="main",l=e==="alle"||e==="support";return s.jsxs(s.Fragment,{children:[s.jsx(Sr,{}),s.jsxs("main",{id:"main-content",className:"pt-20 min-h-screen",children:[s.jsx("section",{className:"relative py-20 halftone border-b-2 border-primary/40 text-center grain-overlay overflow-hidden","aria-labelledby":"lineup-heading",children:s.jsxs("div",{className:"container relative z-10 mx-auto px-4",children:[s.jsx("span",{className:"text-xs text-primary tracking-[0.35em] uppercase block mb-3",children:"20 Jahre Punkrock · 19.â21.08.2027"}),s.jsx("h1",{id:"lineup-heading",className:"font-grunge text-6xl md:text-9xl leading-none",children:"LINE-UP"}),s.jsx("p",{className:"text-muted-foreground mt-5 max-w-xl mx-auto",children:"Punk · Oi! · Ska · Hardcore · Reggae â Festwiesen Loburg (LSA)"})]})}),s.jsx("section",{className:"py-6 border-b border-border bg-card/30","aria-label":"Line-Up Filter",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsx("div",{className:"flex flex-wrap gap-2 justify-center",role:"group","aria-label":"Line-Up filtern",children:cZ.map(c=>s.jsx("button",{onClick:()=>t(c.id),"aria-pressed":e===c.id,className:`px-4 py-2 text-xs uppercase tracking-widest border transition-all ${e===c.id?"tape-label border-primary":"border-border hover:border-primary hover:text-primary"}`,children:c.label},c.id))})})}),a&&s.jsx("section",{className:"py-14","aria-label":"Headliner",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("h2",{className:"font-grunge text-4xl md:text-5xl mb-8",children:"HEADLINER"}),s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-5",children:r.map((c,u)=>s.jsx(Ce,{delay:u*50,children:s.jsxs("article",{className:"relative h-full border-2 border-primary/50 bg-card/60 halftone hover:border-primary transition-colors",children:[s.jsx("span",{className:"absolute -top-3 left-4 z-10 tape-label px-2 py-0.5 text-[10px] uppercase tracking-widest",children:"Headliner"}),s.jsx(i5,{band:c,className:"h-48"}),s.jsxs("div",{className:"p-6",children:[s.jsx("h3",{className:"font-grunge text-3xl md:text-4xl leading-none text-foreground",children:c.name}),s.jsx("p",{className:"text-[11px] text-primary uppercase tracking-[0.25em] mt-2",children:c.genre}),c.bio&&s.jsx("p",{className:"text-sm text-muted-foreground mt-3 leading-relaxed",children:c.bio}),s.jsx(vg,{band:c})]})]})},c.name))})]})}),o&&s.jsx("section",{className:"py-14 border-t border-border","aria-label":"Bands",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("h2",{className:"font-grunge text-4xl md:text-5xl mb-8",children:"BANDS"}),s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-5",children:n.map((c,u)=>s.jsx(Ce,{delay:u*40,children:s.jsxs("article",{className:"h-full border border-border bg-card/40 hover:border-primary/60 transition-colors",children:[s.jsx(i5,{band:c,className:"h-40"}),s.jsxs("div",{className:"p-5",children:[s.jsx("h3",{className:"font-display text-2xl text-foreground",children:c.name}),s.jsx("p",{className:"text-[11px] text-primary uppercase tracking-[0.25em] mt-1",children:c.genre}),c.bio&&s.jsx("p",{className:"text-sm text-muted-foreground mt-3 leading-relaxed",children:c.bio}),s.jsx(vg,{band:c})]})]})},c.name))})]})}),l&&s.jsx("section",{className:"py-14 border-t border-border halftone","aria-label":"Weitere Bands",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("h2",{className:"font-grunge text-4xl md:text-5xl mb-8",children:"UND AUSSERDEM"}),s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-4",children:i.map((c,u)=>s.jsx(Ce,{delay:u*30,children:s.jsxs("article",{className:"h-full p-4 border border-border bg-card/40 hover:border-primary/60 transition-colors",children:[s.jsx("h3",{className:"font-display text-xl text-foreground",children:c.name}),s.jsx("p",{className:"text-[10px] text-primary uppercase tracking-[0.25em] mt-1",children:c.genre}),s.jsx(vg,{band:c})]})},c.name))}),s.jsx("p",{className:"text-center font-grunge text-2xl md:text-3xl mt-12",children:"⦠und viele weitere Bands!"})]})})]}),s.jsx(Br,{})]})}
742const dZ=[{category:"Allgemeine Informationen",icon:"â¹ï¸",questions:[{q:"Was ist auf dem Festival nicht erlaubt?",a:`Auf unserem Festival gilt eine klare Haltung für ein respektvolles und sicheres Miteinander. Strikt untersagt sind: 743 744⢠Diskriminierendes, rassistisches, sexistisches oder extremistisches Verhalten 745⢠Homo- oder transfeindliche Aussagen oder Handlungen 746⢠Gewalt, aggressives Verhalten oder Belästigungen jeglicher Art 747⢠Haustiere oder Tiere aller Art 748⢠Glas auf dem gesamten Gelände 749 750Bei VerstöÃen behalten wir uns entsprechende MaÃnahmen vor.`},{q:"Wie soll ich mich auf dem Festival verhalten?",a:`Wir möchten, dass alle Gäste ein schönes Erlebnis haben. Daher bitten wir dich: 751 752⢠Freundlich und respektvoll mit anderen umzugehen 753⢠Grenzen zu akzeptieren (âNein heiÃt Neinâ) 754⢠Auffälligkeiten oder Probleme sofort unserem Sicherheitspersonal oder dem Infostand zu melden`}]},{category:"Gelände & Ãffnungszeiten",icon:"ð",questions:[{q:"Ab wann kann ich anreisen?",a:"Die Anreise ist ab Mittwoch, 13.08.2025, ca. 16:00 Uhr möglich. Camping- und Parkflächen sind ab diesem Zeitpunkt dauerhaft geöffnet. Eine frühere Anreise ist nicht möglich."},{q:"Wann öffnet das Festivalgelände?",a:`Ãffnungszeiten des Festivalgeländes (Bühnen, Stände): 755 756⢠Donnerstag: ab 13:00 Uhr 757⢠Freitag: ab 11:00 Uhr 758⢠Samstag: ab 11:00 Uhr 759 760Der Biergarten ist täglich von 09:00 Uhr bis 05:00 Uhr geöffnet.`}]},{category:"Tickets",icon:"ð«",questions:[{q:"Gibt es noch Tickets / eine Abendkasse?",a:"Das Festival ist ausverkauft. Es gibt keine Tickets vor Ort. Bitte reise nur mit gültiger Eintrittskarte an."},{q:"Wie erhalte ich mein Ticket nach dem Kauf?",a:"Dein Ticket wird nach dem Kauf automatisch per E-Mail zugesendet. Bitte überprüfe auch deinen Spam-Ordner. Das Ticket enthält einen individuellen QR-Code für den Einlass."}]},{category:"Camping & Parken",icon:"âº",questions:[{q:"Sind Camping und Parken getrennt?",a:`Nein. Camping und Parken sind nicht getrennt. Du darfst direkt neben deinem Fahrzeug campen. 761 762Bitte beachte: 763⢠Rücksicht auf Nachbar*innen nehmen 764⢠Keine Fahrzeuge blockieren 765⢠Campingflächen effizient nutzen 766⢠Platz für Gäste ohne Auto lassen 767⢠Wenn möglich, gemeinsam anreisen, wenn ihr zusammen campen möchtet`},{q:"Welche Gegenstände sind erlaubt / verboten?",a:`Nicht erlaubt: 768⢠Waffen 769⢠GroÃe Messer oder gefährliche Werkzeuge 770⢠Geräte wie Rasenmäher oder Laubbläser 771 772Erlaubt: 773⢠Normale Campingmesser und Besteck 774⢠Gummihammer in handelsüblicher GröÃe`}]},{category:"Essen & Trinken",icon:"ð",questions:[{q:"Was darf ich auf den Campingplatz mitbringen?",a:`Auf dem Campingplatz darfst du eigene Lebensmittel und Getränke mitbringen. Wichtige Regeln: 775 776⢠Kein Glas â alles in Plastikbehälter umfüllen! 777⢠Kein offenes Feuer 778⢠Grillen nur mit geeignetem Grillgerät und Abstand zum Boden 779⢠Vorsichtiger Umgang mit Feuer und Hitzequellen 780⢠Aktuelle Waldbrandstufen beachten`},{q:"Was gibt es vor Ort zu essen?",a:"Vor Ort gibt es ein groÃes Essensangebot mit Fleisch, vegetarischen und veganen Optionen. Wir machen unsere Stände selbst â kein typisches Festival-Massenabfertigungs-Catering!"}]},{category:"Tiere",icon:"ð¾",questions:[{q:"Darf ich mein Haustier mitbringen?",a:"Nein. Tiere sind auf dem gesamten Gelände nicht erlaubt. Festivals sind zu laut und stressig für Tiere. Bitte organisiere für die Festivaltage eine geeignete Betreuung. Danke!"}]},{category:"Anreise",icon:"ð",questions:[{q:"Wie komme ich mit Zug / Bus?",a:`Anreise bis Magdeburg Hauptbahnhof, anschlieÃend Buslinie 720 nach Loburg. 781Haltestelle: Loburg BahnhofstraÃe (ca. 15 Minuten FuÃweg zum Gelände). 782 783Das Deutschlandticket ist gültig. Tickets können auch im Bus gekauft werden.`},{q:"Wie komme ich mit dem Auto?",a:`Folge der Beschilderung nach Loburg. Vor Ort ist der Weg zum Festival ausgeschildert. 784 785Adresse: Festwiese, 39279 Loburg`}]},{category:"Sanitäranlagen",icon:"ð¿",questions:[{q:"Gibt es Duschen und Toiletten?",a:`Ja! Es stehen Duschen und Toiletten zur Verfügung: 786 787⢠Wochenend-Flatrate möglich 788⢠Einzelnutzung gegen Gebühr 789⢠Dixi-Toiletten auf dem gesamten Gelände 790 791Bitte gehe verantwortungsvoll mit Wasser und den Anlagen um.`}]},{category:"FuÃball-Special & Sonstiges",icon:"â½",questions:[{q:"Was ist das FuÃball-Special am Samstag?",a:`Am Samstag findet die Saisoneröffnung von Blau-Weià Loburg statt. 792 793Wichtige Hinweise: 794⢠Keine Pyrotechnik 795⢠Rücksicht auf Familien 796⢠Kein Betreten des Spielfelds 797⢠Ausreichend trinken`},{q:"Was gilt für den Jugendschutz?",a:"Der Jugendschutz richtet sich nach den gesetzlichen Vorgaben. Bitte entscheide verantwortungsvoll, ob ein mehrtägiger Festivalbesuch für Kinder geeignet ist."},{q:"Wo finde ich das vollständige Programm / die Running Order?",a:"Die vollständige Running Order für Donnerstag, Freitag und Samstag findest du im offiziellen Programm auf unserer Website oder im Geländeplan."}]},{category:"Hilfe & Support",icon:"ð",questions:[{q:"Ich habe mein Ticket nicht erhalten. Was soll ich tun?",a:"Bitte überprüfe zunächst de
797inen Spam-Ordner. Falls du dein Ticket nicht findest, nutze unser Formular weiter unten auf dieser Seite oder kontaktiere uns per E-Mail unter [email protected]."},{q:"Wie kann ich den Support erreichen?",a:"Du erreichst uns per E-Mail unter [email protected] oder über das Kontaktformular auf dieser Seite. Telefonischen Support bieten wir nicht an."}]}],xZ=["SPIRIT FESTIVAL 2025"];function fZ(){const{t:e}=ii(),[t,r]=A.useState(null),[n,i]=A.useState({event:"",firstname:"",lastname:"",email:""}),[a,o]=A.useState(!1),l=u=>r(t===u?null:u),c=u=>{u.preventDefault(),o(!0)};return s.jsxs(s.Fragment,{children:[s.jsx(Sr,{}),s.jsxs("main",{id:"main-content",className:"pt-20 min-h-screen",children:[s.jsx("section",{className:"py-20 bg-card/50 border-b border-border text-center","aria-label":"FAQ",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-2",children:e("faq.pageSubtitle")}),s.jsx("h1",{className:"font-grunge text-6xl md:text-9xl",children:e("faq.pageHeading")}),s.jsx("div",{className:"w-24 h-0.5 bg-primary mx-auto mt-4 glow-primary"}),s.jsx("p",{className:"text-muted-foreground mt-4",children:e("faq.pageDesc")})]})}),s.jsx("section",{className:"py-16","aria-label":"FAQ Kategorien",children:s.jsx("div",{className:"container mx-auto px-4 max-w-3xl",children:s.jsx("div",{className:"space-y-10",children:dZ.map(u=>s.jsx(Ce,{children:s.jsxs("div",{children:[s.jsxs("h2",{className:"font-display text-3xl flex items-center gap-3 mb-5",children:[s.jsx("span",{"aria-hidden":"true",children:u.icon}),u.category.toUpperCase()]}),s.jsx("div",{className:"space-y-2",children:u.questions.map((d,x)=>{const f=`${u.category}-${x}`,h=t===f;return s.jsxs("div",{className:"rounded-xl border border-border overflow-hidden gradient-card",children:[s.jsxs("button",{className:"w-full flex items-center justify-between p-4 text-left hover:text-primary transition-colors",onClick:()=>l(f),"aria-expanded":h,"aria-controls":`faq-answer-${f}`,children:[s.jsx("span",{className:"font-medium pr-4",children:d.q}),h?s.jsx(na,{size:18,className:"text-primary shrink-0","aria-hidden":"true"}):s.jsx(mr,{size:18,className:"shrink-0","aria-hidden":"true"})]}),h&&s.jsx("div",{id:`faq-answer-${f}`,className:"px-4 pb-4 text-sm text-muted-foreground leading-relaxed border-t border-border pt-3 animate-fade-up whitespace-pre-line",role:"region",children:d.a})]},f)})})]})},u.category))})})}),s.jsx("section",{className:"py-16 bg-card/30 border-t border-border","aria-labelledby":"ticket-form-heading",children:s.jsx("div",{className:"container mx-auto px-4 max-w-xl",children:s.jsxs(Ce,{children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx(E4,{className:"mx-auto mb-3 text-primary",size:32}),s.jsx("h2",{className:"font-display text-3xl",id:"ticket-form-heading",children:e("faq.ticketNotReceived")}),s.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:e("faq.ticketFormDesc")})]}),a?s.jsxs("div",{className:"text-center p-8 rounded-2xl border border-primary/30 bg-primary/5",children:[s.jsx($t,{className:"mx-auto mb-3 text-primary",size:40}),s.jsx("h3",{className:"font-display text-2xl text-primary mb-2",children:e("faq.thankYou")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e("faq.thankYouDesc")})]}):s.jsxs("form",{onSubmit:c,className:"space-y-4 p-6 rounded-2xl gradient-card border border-border","aria-label":e("faq.ticketNotReceived"),children:[s.jsxs("div",{children:[s.jsxs("label",{htmlFor:"ticket-event",className:"block text-sm font-medium mb-1.5",children:[e("faq.form.selectEvent")," ",s.jsx("span",{"aria-hidden":"true",children:"*"})]}),s.jsxs("select",{id:"ticket-event",required:!0,value:n.event,onChange:u=>i({...n,event:u.target.value}),className:"w-full bg-background border border-border rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50","aria-required":"true",children:[s.jsx("option",{value:"",children:e("faq.form.selectPlaceholder")}),xZ.map(u=>s.jsx("option",{value:u,children:u},u))]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsxs("label",{htmlFor:"ticket-firstname",className:"block text-sm font-medium mb-1.5",children:[e("faq.form.firstName")," ",s.jsx("span",{"aria-hidden":"true",children:"*"})]}),s.jsx("input",{id:"ticket-firstname",type:"text",required:!0,value:n.firstname,onChange:u=>i({...n,firstname:u.target.value}),className:"w-full bg-background border border-border rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50","aria-required":"true"})]}),s.jsxs("div",{children:[s.jsxs("label",{htmlFor:"ticket-lastname",className:"block text-sm font-medium mb-1.5",children:[e("faq.form.lastName")," ",s.jsx("span",{"aria-hidden":"true",children:"*"})]}),s.jsx("input",{id:"ticket-lastname",type:"text",required:!0,value:n.lastname,onChange:u=>i({...n,lastname:u.target.value}),className:"w-full bg-background border border-border rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50","aria-required":"true"})]})]}),s.jsxs("div",{children:[s.jsxs("label",{htmlFor:"ticket-email",className:"block text-sm font-medium mb-1.5",children:[e("faq.form.email")," ",s.jsx("span",{"aria-hidden":"true",children:"*"})]}),s.jsx("input",{id:"ticket-email",type:"email",required:!0,value:n.email,onChange:u=>i({...n,email:u.target.value}),className:"w-full bg-background border border-border rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50","aria-required":"true"})]}),s.jsxs("button",{type:"submit",className:"w-full flex items-center justify-center gap-2 py-3 bg-primary text-primary-foreground rounded-xl font-bold hover:opacity-90 transition-opacity",children:[s.jsx(os,{size:16}),e("faq.form.submit")]})]})]})})})]}),s.jsx(Br,{})]})}function hZ(){return s.jsxs(s.Fragment,{children:[s.jsx(Sr,{}),s.jsxs("main",{id:"main-content",className:"pt-20 min-h-screen",children:[s.jsx("section",{className:"py-20 bg-card/50 border-b border-border text-center","aria-label":"Impressum Ãberschrift",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("h1",{className:"font-grunge text-5xl md:text-7xl",children:"IMPRESSUM"}),s.jsx("div",{className:"w-24 h-0.5 bg-primary mx-auto mt-4 glow-primary"})]})}),s.jsx("section",{className:"py-16","aria-label":"Impressum Inhalt",children:s.jsx("div",{className:"container mx-auto px-4 max-w-2xl",children:s.jsxs("div",{className:"prose-festival space-y-8 text-sm text-muted-foreground leading-relaxed",children:[s.jsxs("div",{className:"p-6 rounded-2xl gradient-card border border-border",children:[s.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"ANGABEN GEMÃSS § 5 TMG"}
797),s.jsxs("address",{className:"not-italic space-y-1",children:[s.jsx("p",{className:"font-medium text-foreground",children:"GbR Werner Christian u. Peschke Susanne"}),s.jsx("p",{children:"Karl-Schmidt Str. 42"}),s.jsx("p",{children:"39104 Magdeburg"})]})]}),s.jsxs("div",{className:"p-6 rounded-2xl gradient-card border border-border",children:[s.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"KONTAKT"}),s.jsx("ul",{className:"space-y-2",children:s.jsxs("li",{children:[s.jsx("span",{className:"text-foreground/70",children:"E-Mail: "}),s.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})]})})]}),s.jsxs("div",{className:"p-6 rounded-2xl gradient-card border border-border",children:[s.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"FESTIVALGELÃNDE"}),s.jsxs("address",{className:"not-italic space-y-1",children:[s.jsx("p",{className:"font-medium text-foreground",children:"Festwiesen Loburg"}),s.jsx("p",{children:"39279 Loburg bei Magdeburg"})]})]}),s.jsxs("div",{className:"p-6 rounded-2xl gradient-card border border-border",children:[s.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"UMSATZSTEUER-ID"}),s.jsxs("p",{children:["Umsatzsteuer-Identifikationsnummer gemäà § 27 a UStG:",s.jsx("br",{}),s.jsx("span",{className:"text-foreground font-medium",children:"DE270762632"})]})]}),s.jsxs("div",{className:"p-6 rounded-2xl gradient-card border border-border",children:[s.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"VERANTWORTLICH FÃR DEN INHALT"}),s.jsxs("p",{children:["GbR Werner Christian u. Peschke Susanne",s.jsx("br",{}),"Karl-Schmidt Str. 42",s.jsx("br",{}),"39104 Magdeburg"]})]}),s.jsxs("div",{className:"p-6 rounded-2xl gradient-card border border-border",children:[s.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"HAFTUNGSAUSSCHLUSS"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-foreground mb-1",children:"Haftung für Inhalte"}),s.jsx("p",{children:"Als Diensteanbieter sind wir gemäà § 7 Abs.1 TMG für eigene Inhalte auf diesen Seiten nach den allgemeinen Gesetzen verantwortlich. Nach §§ 8 bis 10 TMG sind wir als Diensteanbieter jedoch nicht unter bestimmten Umständen verpflichtet, übermittelte oder gespeicherte fremde Informationen zu überwachen oder nach Umständen zu forschen, die auf eine rechtswidrige Tätigkeit hinweisen."})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-foreground mb-1",children:"Haftung für Links"}),s.jsx("p",{children:"Unser Angebot enthält Links zu externen Websites Dritter, auf deren Inhalte wir keinen Einfluss haben. Deshalb können wir für diese fremden Inhalte auch keine Gewähr übernehmen. Für die Inhalte der verlinkten Seiten ist stets der jeweilige Anbieter oder Betreiber der Seiten verantwortlich."})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-foreground mb-1",children:"Urheberrecht"}),s.jsx("p",{children:"Die durch die Seitenbetreiber erstellten Inhalte und Werke auf diesen Seiten unterliegen dem deutschen Urheberrecht. Die Vervielfältigung, Bearbeitung, Verbreitung und jede Art der Verwertung auÃerhalb der Grenzen des Urheberrechtes bedürfen der schriftlichen Zustimmung des jeweiligen Autors bzw. Erstellers."})]})]})]}),s.jsxs("div",{className:"p-6 rounded-2xl gradient-card border border-border",children:[s.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"STREITSCHLICHTUNG"}),s.jsxs("p",{children:["Die Europäische Kommission stellt eine Plattform zur Online-Streitbeilegung (OS) bereit:"," ",s.jsx("a",{href:"https://ec.europa.eu/consumers/odr/",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"https://ec.europa.eu/consumers/odr/"})]}),s.jsx("p",{className:"mt-2",children:"Wir sind nicht bereit oder verpflichtet, an Streitbeilegungsverfahren vor einer Verbraucherschlichtungsstelle teilzunehmen."})]})]})})})]}),s.jsx(Br,{})]})}function pZ(){return s.jsxs(s.Fragment,{children:[s.jsx(Sr,{}),s.jsxs("main",{id:"main-content",className:"pt-20 min-h-screen",children:[s.jsx("section",{className:"py-20 bg-card/50 border-b border-border text-center",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("h1",{className:"font-grunge text-5xl md:text-7xl",children:"DATENSCHUTZ"}),s.jsx("div",{className:"w-24 h-0.5 bg-primary mx-auto mt-4 glow-primary"})]})}),s.jsx("section",{className:"py-16",children:s.jsx("div",{className:"container mx-auto px-4 max-w-3xl",children:s.jsx("div",{className:"space-y-6 text-sm text-muted-foreground leading-relaxed",children:[{title:"1. DATENSCHUTZ AUF EINEN BLICK",content:s.jsxs(s.Fragment,{children:[s.jsx("h3",{className:"font-medium text-foreground mb-2",children:"Allgemeine Hinweise"}),s.jsx("p",{children:"Die folgenden Hinweise geben einen einfachen Ãberblick darüber, was mit Ihren personenbezogenen Daten passiert, wenn Sie diese Website besuchen. Personenbezogene Daten sind alle Daten, mit denen Sie persönlich identifiziert werden können. Ausführliche Informationen zum Thema Datenschutz entnehmen Sie unserer unter diesem Text aufgeführten Datenschutzerklärung."}),s.jsx("h3",{className:"font-medium text-foreground mt-4 mb-2",children:"Datenerfassung auf dieser Website"}),s.jsxs("p",{children:[s.jsx("strong",{className:"text-foreground",children:"Wer ist verantwortlich für die Datenerfassung auf dieser Website?"}),s.jsx("br",{}),'Die Datenverarbeitung auf dieser Website erfolgt durch den Websitebetreiber. Dessen Kontaktdaten können Sie dem Absc
797hnitt âHinweis zur Verantwortlichen Stelle" in dieser Datenschutzerklärung entnehmen.']})]})},{title:"2. VERANTWORTLICHE STELLE",content:s.jsxs("address",{className:"not-italic space-y-1",children:[s.jsx("p",{className:"font-medium text-foreground",children:"GbR Werner Christian u. Peschke Susanne"}),s.jsx("p",{children:"Karl-Schmidt Str. 42, 39104 Magdeburg"}),s.jsxs("p",{children:["E-Mail: ",s.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})]})]})},{title:"3. DATENERFASSUNG AUF DIESER WEBSITE",content:s.jsxs(s.Fragment,{children:[s.jsx("h3",{className:"font-medium text-foreground mb-2",children:"Cookies"}),s.jsx("p",{children:'Unsere Website verwendet Cookies. Das sind kleine Textdateien, die Ihr Webbrowser auf Ihrem Endgerät speichert. Cookies helfen uns dabei, unser Angebot nutzerfreundlicher, effektiver und sicherer zu machen. Einige Cookies sind âSession-Cookies." Solche Cookies werden nach Ende Ihrer Browser-Sitzung von selbst gelöscht. Hingegen bleiben andere Cookies auf Ihrem Endgerät bestehen, bis Sie diese selbst löschen. Solche Cookies helfen uns, Sie bei Rückkehr auf unserer Website wiederzuerkennen.'}),s.jsx("h3",{className:"font-medium text-foreground mt-4 mb-2",children:"Server-Log-Dateien"}),s.jsx("p",{children:"Der Provider der Seiten erhebt und speichert automatisch Informationen in so genannten Server-Log-Dateien, die Ihr Browser automatisch an uns übermittelt. Dies sind: Browsertyp und Browserversion, verwendetes Betriebssystem, Referrer URL, Hostname des zugreifenden Rechners, Uhrzeit der Serveranfrage, IP-Adresse."})]})},{title:"4. NEWSLETTER",content:s.jsxs(s.Fragment,{children:[s.jsx("p",{children:"Wenn Sie den auf der Website angebotenen
797Newsletter beziehen möchten, benötigen wir von Ihnen eine E-Mail-Adresse sowie Informationen, welche uns die Ãberprüfung gestatten, dass Sie der Inhaber der angegebenen E-Mail-Adresse sind und mit dem Empfang des Newsletters einverstanden sind. Weitere Daten werden nicht bzw. nur auf freiwilliger Basis erhoben."}),s.jsxs("p",{className:"mt-2",children:[s.jsx("strong",{className:"text-foreground",children:"Double-Opt-in:"})," Die Anmeldung zu unserem Newsletter erfolgt in einem sogenannten Double-Opt-in-Verfahren. Das heiÃt, Sie erhalten nach der Anmeldung eine E-Mail, in der Sie um die Bestätigung Ihrer Anmeldung gebeten werden. Diese Bestätigung ist notwendig, damit sich niemand mit fremden E-Mail-Adressen anmelden kann."]})]})},{title:"5. IHRE RECHTE",content:s.jsxs(s.Fragment,{children:[s.jsx("p",{children:"Sie haben jederzeit das Recht unentgeltlich Auskunft über Herkunft, Empfänger und Zweck Ihrer gespeicherten personenbezogenen Daten zu erhalten. Sie haben auÃerdem ein Recht, die Berichtigung oder Löschung dieser Daten zu verlangen. Wenn Sie eine Einwilligung zur Datenverarbeitung erteilt haben, können Sie diese Einwilligung jederzeit für die Zukunft widerrufen. AuÃerdem haben Sie das Recht, unter bestimmten Umständen die Einschränkung der Verarbeitung Ihrer personenbezogenen Daten zu verlangen."}),s.jsxs("p",{className:"mt-2",children:["Zur Ausübung Ihrer Rechte wenden Sie sich bitte an: ",s.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})]}),s.jsx("p",{className:"mt-2",children:"Des Weiteren steht Ihnen ein Beschwerderecht bei der zuständigen Aufsichtsbehörde zu."})]})},{title:"6. ZAHLUNGSABWICKLUNG",content:s.jsxs("p",{children:["Auf dieser Website werden zur Abwicklung von Zahlungen externe Zahlungsdienstleister eingesetzt. Die Zahlungsabwicklung erfolgt über den Zahlungsdienstleister Mollie B.V., Keizersgracht 313, 1016 EE Amsterdam, Niederlande. Ihre Zahlungsdaten werden direkt an Mollie übermittelt und nicht von uns gespeichert. Es gelten die Datenschutzbestimmungen von Mollie: ",s.jsx("a",{href:"https://www.mollie.com/de/privacy",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"www.mollie.com/de/privacy"})]})},{title:"7. ÃNDERUNG DIESER DATENSCHUTZERKLÃRUNG",content:s.jsxs("p",{children:["Wir behalten uns vor, diese Datenschutzerklärung anzupassen, damit sie stets den aktuellen rechtlichen Anforderungen entspricht oder um Ãnderungen unserer Leistungen in der Datenschutzerklärung umzusetzen. Für Ihren erneuten Besuch gilt dann die neue Datenschutzerklärung. Stand: ",new Date().toLocaleDateString("de-DE")]})}].map(e=>s.jsxs("div",{className:"p-6 rounded-2xl gradient-card border border-border",children:[s.jsx("h2",{className:"font-display text-xl text-foreground mb-4",children:e.title}),e.content]},e.title))})})})]}),s.jsx(Br,{})]})}function mZ(){return s.jsxs(s.Fragment,{children:[s.jsx(Sr,{}),s.jsxs("main",{id:"main-content",className:"pt-20 min-h-screen",children:[s.jsx("section",{className:"py-20 bg-card/50 border-b border-border text-center",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("h1",{className:"font-grunge text-4xl md:text-6xl",children:"WIDERRUFSBELEHRUNG"}),s.jsx("p",{className:"text-muted-foreground mt-2 text-sm",children:"für Veranstaltungstickets"}),s.jsx("div",{className:"w-24 h-0.5 bg-primary mx-auto mt-4 glow-primary"})]})}),s.jsx("section",{className:"py-16",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-3xl space-y-6 text-sm text-muted-foreground leading-relaxed",children:[s.jsxs("div",{className:"p-6 rounded-2xl gradient-card border border-border",children:[s.jsx("h2",{className:"font-display text-xl text-foreground mb-4",children:"AUSSCHLUSS DES WIDERRUFSRECHTS"}),s.jsxs("p",{children:["Gemäà § 312g Abs. 2 Nr. 9 BGB besteht bei Verträgen zur Erbringung von Dienstleistungen im Zusammenhang mit Freizeitbetätigungen, wenn der Vertrag für die Erbringung einen spezifischen Termin oder Zeitraum vorsieht, ",s.jsx("strong",{className:"text-foreground",children:"kein Widerrufsrecht"}),"."]}),s.jsx("p",{className:"mt-3",children:"Dies gilt insbesondere für den Kauf von Eintrittskarten (Tickets) für Veranstaltungen wie Konzerte, Festivals und ähnliche Veranstaltungen, da hierbei ein konkreter Veranstaltungstermin vereinbart wird."})]}),s.jsxs("div",{className:"p-6 rounded-2xl gradient-card border border-border",children:[s.jsx("h2",{className:"font-display text-xl text-foreground mb-4",children:"BEGRÃNDUNG"}),s.jsx("p",{children:"Da bei Veranstaltungstickets für das Spirit Festival ein konkreter Veranstaltungstermin (Datum und Uhrzeit) vereinbart wird und die Dienstleistung der Freizeitgestaltung dient, ist das gesetzliche Widerrufsrecht nach § 312g Abs. 2 Nr. 9 BGB ausgeschlossen."})]}),s.jsxs("div",{className:"p-6 rounded-2xl gradient-card border border-border",children:[s.jsx("h2",{className:"font-display text-xl text-foreground mb-4",children:"AUSNAHMEN UND KULANZREGELUNGEN"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-foreground mb-1",children:"Veranstaltungsabsage"}),s.jsx("p",{children:"Wird eine Veranstaltung durch den Veranstalter abgesagt, erhalten alle Käufer eine vollständige Rückerstattung des Kaufpreises. Die Rückerstattung erfolgt auf das ursprüngliche Zahlungsmittel innerhalb von 10-14 Werktagen."})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-foreground mb-1",children:"Veranstaltungsverlegung"}),s.jsx("p",{children:"Bei einer Verlegung des Veranstaltungstermins wird den Ticketinhabern die Möglichkeit geboten, den Kauf innerhalb einer gesetzten Frist zu widerrufen und eine vollständige Rückerstattung zu erhalten."})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-foreground mb-1",children:"Ticketübertragung"}),s.jsx("p",{children:"Als Kulanzleistung ermöglichen wir bei nicht personalisierten Tickets die Ãbertragung auf eine andere Person. Bitte kontaktieren Sie hierfür unseren Kundenservice."})]})]})]}),s.jsxs("div",{className:"p-6 rounded-2xl gradient-card border border-border",children:[s.jsx("h2",{className:"font-display text-xl text-foreground mb-4",children:"KONTAKT BEI FRAGEN"}
797),s.jsxs("address",{className:"not-italic space-y-1",children:[s.jsx("p",{className:"font-medium text-foreground",children:"GbR Werner Christian u. Peschke Susanne"}),s.jsx("p",{children:"Karl-Schmidt Str. 42, 39104 Magdeburg"}),s.jsxs("p",{children:["E-Mail: ",s.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})]})]}),s.jsxs("p",{className:"mt-3 text-xs",children:["Stand: ",new Date().toLocaleDateString("de-DE")]})]})]})})]}),s.jsx(Br,{})]})}function gZ(){const[e,t]=A.useState({firstname:"",lastname:"",email:"",phone:"",message:""}),[r,n]=A.useState(!1),i=a=>{a.preventDefault(),n(!0)};return s.jsxs(s.Fragment,{children:[s.jsx(Sr,{}),s.jsxs("main",{id:"main-content",className:"pt-20 min-h-screen",children:[s.jsx("section",{className:"py-20 bg-card/50 border-b border-border text-center",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-2",children:"Wir helfen dir gern"}),s.jsx("h1",{className:"font-grunge text-6xl md:text-9xl",children:"KONTAKT"}),s.jsx("div",{className:"w-24 h-0.5 bg-primary mx-auto mt-4 glow-primary"})]})}),s.jsx("section",{className:"py-16",children:s.jsx("div",{className:"container mx-auto px-4 max-w-5xl",children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-10",children:[s.jsx("div",{children:s.jsxs(Ce,{children:[s.jsx("h2",{className:"font-display text-3xl mb-6",children:"SO ERREICHST DU UNS"}),s.jsx("div",{className:"space-y-4",children:[{icon:$t,label:"E-Mail",value:"[email protected]",href:"mailto:[email protected]"},{icon:_r,label:"Veranstalter",value:"Karl-Schmidt Str. 42, 39104 Magdeburg",href:null},{icon:_r,label:"Festivalgelände",value:"Festwiesen Loburg, 39279 Loburg",href:null}].map(({icon:a,label:o,value:l,href:c})=>s.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-xl gradient-card border border-border hover:border-primary/30 transition-all group",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center text-primary group-hover:bg-primary group-hover:text-primary-foreground transition-all",children:s.jsx(a,{size:18})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:o}),c?s.jsx("a",{href:c,className:"text-sm font-medium hover:text-primary transition-colors",target:c.startsWith("http")?"_blank":void 0,rel:c.startsWith("http")?"noopener noreferrer":void 0,children:l}):s.jsx("p",{className:"text-sm font-medium",children:l})]})]},o))}),s.jsx("p",{className:"text-xs text-muted-foreground mt-6",children:"Servicezeiten: Montag â Freitag, 9:00 â 18:00 Uhr"})]})}),s.jsx(Ce,{delay:100,children:r?s.jsxs("div",{className:"text-center p-10 rounded-2xl border border-primary/30 bg-primary/5 h-full flex flex-col items-center justify-center",children:[s.jsx($t,{className:"mx-auto mb-4 text-primary",size:48}),s.jsx("h3",{className:"font-display text-3xl text-primary mb-2",children:"NACHRICHT GESENDET!"}),s.jsx("p",{className:"text-muted-foreground",children:"Wir melden uns innerhalb von 24 Stunden bei dir."})]}):s.jsxs("form",{onSubmit:i,className:"space-y-4 p-6 rounded-2xl gradient-card border border-border","aria-label":"Kontaktformular",noValidate:!0,children:[s.jsx("h2",{className:"font-display text-2xl mb-2",children:"SCHREIB UNS"}),s.jsx("div",{className:"grid grid-cols-2 gap-3",children:[{id:"firstname",label:"Vorname",type:"text"},{id:"lastname",label:"Nachname",type:"text"}].map(a=>s.jsxs("div",{children:[s.jsxs("label",{htmlFor:a.id,className:"block text-xs font-medium mb-1.5 text-muted-foreground",children:[a.label," *"]}),s.jsx("input",{id:a.id,type:a.type,required:!0,value:e[a.id],onChange:o=>t({...e,[a.id]:o.target.value}),className:"w-full bg-background border border-border rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50","aria-required":"true"})]},a.id))}),[{id:"email",label:"E-Mail-Adresse",type:"email",required:!0}].map(a=>s.jsxs("div",{children:[s.jsxs("label",{htmlFor:a.id,className:"block text-xs font-medium mb-1.5 text-muted-foreground",children:[a.label,a.required?" *":""]}),s.jsx("input",{id:a.id,type:a.type,required:a.required,value:e[a.id],onChange:o=>t({...e,[a.id]:o.target.value}),className:"w-full bg-background border border-border rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50","aria-required":a.required})]},a.id)),s.jsxs("div",{children:[s.jsx("label",{htmlFor:"message",className:"block text-xs font-medium mb-1.5 text-muted-foreground",children:"Kommentar / Nachricht *"}),s.jsx("textarea",{id:"message",required:!0,rows:4,value:e.message,onChange:a=>t({...e,message:a.target.value}),className:"w-full bg-background border border-border rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50 resize-none","aria-required":"true"})]}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Mit dem Absenden stimmst du unserer"," ",s.jsx("a",{href:"/datenschutz",className:"text-primary hover:underline",children:"Datenschutzerklärung"})," zu."]}),s.jsxs("button",{type:"submit",className:"w-full flex items-center justify-center gap-2 py-3 bg-primary text-primary-foreground rounded-xl font-bold hover:opacity-90 transition-opacity",children:[s.jsx(os,{size:16}),"Nachricht senden"]})]})})]})})})]}),s.jsx(Br,{})]})}var vZ=Object.defineProperty,Wf=Object.getOwnPropertySymbols,YS=Object.prototype.hasOwnProperty,ZS=Object.prototype.propertyIsEnumerable,a5=(e,t,r)=>t in e?vZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,s5=(e,t)=>{for(var r in t||(t={}))YS.call(t,r)&&a5(e,r,t[r]);if(Wf)for(var r of Wf(t))ZS.call(t,r)&&a5(e,r,t[r]);return e},yZ=(e,t)=>{var r={};for(var n in e)YS.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Wf)for(var n of Wf(e))t.indexOf(n)<0&&ZS.call(e,n)&&(r[n]=e[n]);return r};/** 798 * @license QR Code generator library (TypeScript) 799 * Copyright (c) Project Nayuki. 800 * SPDX-License-Identifier: MIT 801 */var mo;(e=>{const t=class{constructor(c,u,d,x){if(this.version=c,this.errorCorrectionLevel=u,this.modules=[],this.isFunction=[],c<t.MIN_VERSION||c>t.MAX_VERSION)throw new RangeError("Version value out of range");if(x<-1||x>7)throw new RangeError("Mask value out of range");this.size=c*4+17;let f=[];for(let m=0;m<this.size;m++)f.push(!1);for(let m=0;m<this.size;m++)this.modules.push(f.slice()),this.isFunction.push(f.slice());this.drawFunctionPatterns();const h=this.addEccAndInterleave(d);if(this.drawCodewords(h),x==-1){let m=1e9;for(let p=0;p<8;p++){this.applyMask(p),this.drawFormatBits(p);const v=this.getPenaltyScore();v<m&&(x=p,m=v),this.applyMask(p)}}a(0<=x&&x<=7),this.mask=x,this.applyMask(x),this.drawFormatBits(x),this.isFunction=[]}static encodeText(c,u){const d=e.QrSegment.makeSegments(c);return t.encodeSegments(d,u)}static encodeBinary(c,u){const d=e.QrSegment.makeBytes(c);return t.encodeSegments([d],u)}static encodeSegments(c,u,d=1,x=40,f=-1,h=!0){if(!(t.MIN_VERSION<=d&&d<=x&&x<=t.MAX_VERSION)||f<-1||f>7)throw new RangeError("Invalid value");let m,p;for(m=d;;m++){const g=t.getNumDataCodewords(m,u)*8,w=l.getTotalBits(c,m);if(w<=g){p=w;break}if(m>=x)throw new RangeError("Data too long")}for(const g of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])h&&p<=t.getNumDataCodewords(m,g)*8&&(u=g);let v=[];for(const g of c){n(g.mode.modeBits,4,v),n(g.numChars,g.mode.numCharCountBits(m),v);for(const w of g.getData())v.push(w)}a(v.length==p);const y=t.getNumDataCodewords(m,u)*8;a(v.length<=y),n(0,Math.min(4,y-v.length),v),n(0,(8-v.length%8)%8,v),a(v.length%8==0);for(let g=236;v.length<y;g^=253)n(g,8,v);let b=[];for(;b.length*8<v.length;)b.push(0);return v.forEach((g,w)=>b[w>>>3]|=g<<7-(w&7)),new t(m,u,b,f)}
vendor: 5,713 bytes, line 801
801getModule(c,u){return 0<=c&&c<this.size&&0<=u&&u<this.size&&this.modules[u][c]}getModules(){return this.modules}drawFunctionPatterns(){for(let d=0;d<this.size;d++)this.setFunctionModule(6,d,d%2==0),this.setFunctionModule(d,6,d%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const c=this.getAlignmentPatternPositions(),u=c.length;for(let d=0;d<u;d++)for(let x=0;x<u;x++)d==0&&x==0||d==0&&x==u-1||d==u-1&&x==0||this.drawAlignmentPattern(c[d],c[x]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(c){const u=this.errorCorrectionLevel.formatBits<<3|c;let d=u;for(let f=0;f<10;f++)d=d<<1^(d>>>9)*1335;const x=(u<<10|d)^21522;a(x>>>15==0);for(let f=0;f<=5;f++)this.setFunctionModule(8,f,i(x,f));this.setFunctionModule(8,7,i(x,6)),this.setFunctionModule(8,8,i(x,7)),this.setFunctionModule(7,8,i(x,8));for(let f=9;f<15;f++)this.setFunctionModule(14-f,8,i(x,f));for(let f=0;f<8;f++)this.setFunctionModule(this.size-1-f,8,i(x,f));for(let f=8;f<15;f++)this.setFunctionModule(8,this.size-15+f,i(x,f));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let c=this.version;for(let d=0;d<12;d++)c=c<<1^(c>>>11)*7973;const u=this.version<<12|c;a(u>>>18==0);for(let d=0;d<18;d++){const x=i(u,d),f=this.size-11+d%3,h=Math.floor(d/3);this.setFunctionModule(f,h,x),this.setFunctionModule(h,f,x)}}drawFinderPattern(c,u){for(let d=-4;d<=4;d++)for(let x=-4;x<=4;x++){const f=Math.max(Math.abs(x),Math.abs(d)),h=c+x,m=u+d;0<=h&&h<this.size&&0<=m&&m<this.size&&this.setFunctionModule(h,m,f!=2&&f!=4)}}drawAlignmentPattern(c,u){for(let d=-2;d<=2;d++)for(let x=-2;x<=2;x++)this.setFunctionModule(c+x,u+d,Math.max(Math.abs(x),Math.abs(d))!=1)}setFunctionModule(c,u,d){this.modules[u][c]=d,this.isFunction[u][c]=!0}addEccAndInterleave(c){const u=this.version,d=this.errorCorrectionLevel;if(c.length!=t.getNumDataCodewords(u,d))throw new RangeError("Invalid argument");const x=t.NUM_ERROR_CORRECTION_BLOCKS[d.ordinal][u],f=t.ECC_CODEWORDS_PER_BLOCK[d.ordinal][u],h=Math.floor(t.getNumRawDataModules(u)/8),m=x-h%x,p=Math.floor(h/x);let v=[];const y=t.reedSolomonComputeDivisor(f);for(let g=0,w=0;g<x;g++){let E=c.slice(w,w+p-f+(g<m?0:1));w+=E.length;const C=t.reedSolomonComputeRemainder(E,y);g<m&&E.push(0),v.push(E.concat(C))}let b=[];for(let g=0;g<v[0].length;g++)v.forEach((w,E)=>{(g!=p-f||E>=m)&&b.push(w[g])});return a(b.length==h),b}drawCodewords(c){if(c.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let u=0;for(let d=this.size-1;d>=1;d-=2){d==6&&(d=5);for(let x=0;x<this.size;x++)for(let f=0;f<2;f++){const h=d-f,p=(d+1&2)==0?this.size-1-x:x;!this.isFunction[p][h]&&u<c.length*8&&(this.modules[p][h]=i(c[u>>>3],7-(u&7)),u++)}}a(u==c.length*8)}applyMask(c){if(c<0||c>7)throw new RangeError("Mask value out of range");for(let u=0;u<this.size;u++)for(let d=0;d<this.size;d++){let x;switch(c){case 0:x=(d+u)%2==0;break;case 1:x=u%2==0;break;case 2:x=d%3==0;break;case 3:x=(d+u)%3==0;break;case 4:x=(Math.floor(d/3)+Math.floor(u/2))%2==0;break;case 5:x=d*u%2+d*u%3==0;break;case 6:x=(d*u%2+d*u%3)%2==0;break;case 7:x=((d+u)%2+d*u%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[u][d]&&x&&(this.modules[u][d]=!this.modules[u][d])}}getPenaltyScore(){let c=0;for(let f=0;f<this.size;f++){let h=!1,m=0,p=[0,0,0,0,0,0,0];for(let v=0;v<this.size;v++)this.modules[f][v]==h?(m++,m==5?c+=t.PENALTY_N1:m>5&&c++):(this.finderPenaltyAddHistory(m,p),h||(c+=this.finderPenaltyCountPatterns(p)*t.PENALTY_N3),h=this.modules[f][v],m=1);c+=this.finderPenaltyTerminateAndCount(h,m,p)*t.PENALTY_N3}for(let f=0;f<this.size;f++){let h=!1,m=0,p=[0,0,0,0,0,0,0];for(let v=0;v<this.size;v++)this.modules[v][f]==h?(m++,m==5?c+=t.PENALTY_N1:m>5&&c++):(this.finderPenaltyAddHistory(m,p),h||(c+=this.finderPenaltyCountPatterns(p)*t.PENALTY_N3),h=this.modules[v][f],m=1);c+=this.finderPenaltyTerminateAndCount(h,m,p)*t.PENALTY_N3}for(let f=0;f<this.size-1;f++)for(let h=0;h<this.size-1;h++){const m=this.modules[f][h];m==this.modules[f][h+1]&&m==this.modules[f+1][h]&&m==this.modules[f+1][h+1]&&(c+=t.PENALTY_N2)}let u=0;for(const f of this.modules)u=f.reduce((h,m)=>h+(m?1:0),u);const d=this.size*this.size,x=Math.ceil(Math.abs(u*20-d*10)/d)-1;return a(0<=x&&x<=9),c+=x*t.PENALTY_N4,a(0<=c&&c<=2568888),c}getAlignmentPatternPositions(){if(this.version==1)return[];{const c=Math.floor(this.version/7)+2,u=this.version==32?26:Math.ceil((this.version*4+4)/(c*2-2))*2;let d=[6];for(let x=this.size-7;d.length<c;x-=u)d.splice(1,0,x);return d}}static getNumRawDataModules(c){if(c<t.MIN_VERSION||c>t.MAX_VERSION)throw new RangeError("Version number out of range");let u=(16*c+128)*c+64;if(c>=2){const d=Math.floor(c/7)+2;u-=(25*d-10)*d-55,c>=7&&(u-=36)}return a(208<=u&&u<=29648),u}static getNumDataCodewords(c,u){return Math.floor(t.getNumRawDataModules(c)/8)-t.ECC_CODEWORDS_PER_BLOCK[u.ordinal][c]*t.NUM_ERROR_CORRECTION_BLOCKS[u.ordinal][c]}static reedSolomonComputeDivisor(c){if(c<1||c>255)throw new RangeError("Degree out of range");let u=[];for(let x=0;x<c-1;x++)u.push(0);u.push(1);let d=1;for(let x=0;x<c;x++){for(let f=0;f<u.length;f++)u[f]=t.reedSolomonMultiply(u[f],d),f+1<u.length&&(u[f]^=u[f+1]);d=t.reedSolomonMultiply(d,2)}return u}static reedSolomonComputeRemainder(c,u){let d=u.map(x=>0);for(const x of c){const f=x^d.shift();d.push(0),u.forEach((h,m)=>d[m]^=t.reedSolomonMultiply(h,f))}return d}static reedSolomonMultiply(c,u){if(c>>>8||u>>>8)throw new RangeError("Byte out of range");let d=0;for(let x=7;x>=0;x--)d=d<<1^(d>>>7)*285,d^=(u>>>x&1)*c;return a(d>>>8==0),d}finderPenaltyCountPatterns(c){const u=c[1];a(u<=this.size*3);const d=u>0&&c[2]==u&&c[3]==u*3&&c[4]==u&&c[5]==u;
801return(d&&c[0]>=u*4&&c[6]>=u?1:0)+(d&&c[6]>=u*4&&c[0]>=u?1:0)}finderPenaltyTerminateAndCount(c,u,d){return c&&(this.finderPenaltyAddHistory(u,d),u=0),u+=this.size,this.finderPenaltyAddHistory(u,d),this.finderPenaltyCountPatterns(d)}finderPenaltyAddHistory(c,u){u[0]==0&&(c+=this.size),u.pop(),u.unshift(c)}};let r=t;r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=r;function n(c,u,d){if(u<0||u>31||c>>>u)throw new RangeError("Value out of range");for(let x=u-1;x>=0;x--)d.push(c>>>x&1)}function i(c,u){return(c>>>u&1)!=0}function a(c){if(!c)throw new Error("Assertion error")}const o=class{constructor(c,u,d){if(this.mode=c,this.numChars=u,this.bitData=d,u<0)throw new RangeError("Invalid argument");this.bitData=d.slice()}static makeBytes(c){let u=[];for(const d of c)n(d,8,u);return new o(o.Mode.BYTE,c.length,u)}static makeNumeric(c){if(!o.isNumeric(c))throw new RangeError("String contains non-numeric characters");let u=[];for(let d=0;d<c.length;){const x=Math.min(c.length-d,3);n(parseInt(c.substr(d,x),10),x*3+1,u),d+=x}return new o(o.Mode.NUMERIC,c.length,u)}static makeAlphanumeric(c){if(!o.isAlphanumeric(c))throw new RangeError("String contains unencodable characters in alphanumeric mode");let u=[],d;for(d=0;d+2<=c.length;d+=2){let x=o.ALPHANUMERIC_CHARSET.indexOf(c.charAt(d))*45;x+=o.ALPHANUMERIC_CHARSET.indexOf(c.charAt(d+1)),n(x,11,u)}return d<c.length&&n(o.ALPHANUMERIC_CHARSET.indexOf(c.charAt(d)),6,u),new o(o.Mode.ALPHANUMERIC,c.length,u)}static makeSegments(c){return c==""?[]:o.isNumeric(c)?[o.makeNumeric(c)]:o.isAlphanumeric(c)?[o.makeAlphanumeric(c)]:[o.makeBytes(o.toUtf8ByteArray(c))]}static makeEci(c){let u=[];if(c<0)throw new RangeError("ECI assignment value out of range");if(c<128)n(c,8,u);else if(c<16384)n(2,2,u),n(c,14,u);else if(c<1e6)n(6,3,u),n(c,21,u);else throw new RangeError("ECI assignment value out of range");return new o(o.Mode.ECI,0,u)}static isNumeric(c){return o.NUMERIC_REGEX.test(c)}static isAlphanumeric(c){return o.ALPHANUMERIC_REGEX.test(c)}getData(){return this.bitData.slice()}static getTotalBits(c,u){let d=0;for(const x of c){const f=x.mode.numCharCountBits(u);if(x.numChars>=1<<f)return 1/0;d+=4+f+x.bitData.length}return d}static toUtf8ByteArray(c){c=encodeURI(c);let u=[];for(let d=0;d<c.length;d++)c.charAt(d)!="%"?u.push(c.charCodeAt(d)):(u.push(parseInt(c.substr(d+1,2),16)),d+=2);return u}};let l=o;l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=l})(mo||(mo={}));(e=>{(t=>{const r=class{constructor(i,a){this.ordinal=i,this.formatBits=a}};let n=r;n.LOW=new r(0,1),n.MEDIUM=new r(1,0),n.QUARTILE=new r(2,3),n.HIGH=new r(3,2),t.Ecc=n})(e.QrCode||(e.QrCode={}))})(mo||(mo={}));(e=>{(t=>{const r=class{constructor(i,a){this.modeBits=i,this.numBitsCharCount=a}numCharCountBits(i){return this.numBitsCharCount[Math.floor((i+7)/17)]}};let n=r;n.NUMERIC=new r(1,[10,12,14]),n.ALPHANUMERIC=new r(2,[9,11,13]),n.BYTE=new r(4,[8,16,16]),n.KANJI=new r(8,[8,10,12]),n.ECI=new r(7,[0,0,0]),t.Mode=n})(e.QrSegment||(e.QrSegment={}))})(mo||(mo={}));var gu=mo;/** 802 * @license qrcode.react 803 * Copyright (c) Paul O'Shannessy 804 * SPDX-License-Identifier: ISC 805 */var bZ={L:gu.QrCode.Ecc.LOW,M:gu.QrCode.Ecc.MEDIUM,Q:gu.QrCode.Ecc.QUARTILE,H:gu.QrCode.Ecc.HIGH},EZ=128,wZ="L",CZ="#FFFFFF",AZ="#000000",jZ=!1,XS=4,kZ=.1;function _Z(e,t=0){const r=[];return e.forEach(function(n,i){let a=null;
805n.forEach(function(o,l){if(!o&&a!==null){r.push(`M${a+t} ${i+t}h${l-a}v1H${a+t}z`),a=null;return}if(l===n.length-1){if(!o)return;a===null?r.push(`M${l+t},${i+t} h1v1H${l+t}z`):r.push(`M${a+t},${i+t} h${l+1-a}v1H${a+t}z`);return}o&&a===null&&(a=l)})}),r.join("")}function SZ(e,t){return e.slice().map((r,n)=>n<t.y||n>=t.y+t.h?r:r.map((i,a)=>a<t.x||a>=t.x+t.w?i:!1))}function BZ(e,t,r,n){if(n==null)return null;const i=r?XS:0,a=e.length+i*2,o=Math.floor(t*kZ),l=a/t,c=(n.width||o)*l,u=(n.height||o)*l,d=n.x==null?e.length/2-c/2:n.x*l,x=n.y==null?e.length/2-u/2:n.y*l;let f=null;if(n.excavate){let h=Math.floor(d),m=Math.floor(x),p=Math.ceil(c+d-h),v=Math.ceil(u+x-m);f={x:h,y:m,w:p,h:v}}return{x:d,y:x,h:u,w:c,excavation:f}}var NZ=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}();function DZ(e){const t=e,{value:r,size:n=EZ,level:i=wZ,bgColor:a=CZ,fgColor:o=AZ,includeMargin:l=jZ,style:c,imageSettings:u}=t,d=yZ(t,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),x=u==null?void 0:u.src,f=q.useRef(null),h=q.useRef(null),[m,p]=q.useState(!1);q.useEffect(()=>{if(f.current!=null){const b=f.current,g=b.getContext("2d");if(!g)return;let w=gu.QrCode.encodeText(r,bZ[i]).getModules();const E=l?XS:0,C=w.length+E*2,j=BZ(w,n,l,u),S=h.current,_=j!=null&&S!==null&&S.complete&&S.naturalHeight!==0&&S.naturalWidth!==0;_&&j.excavation!=null&&(w=SZ(w,j.excavation));const O=window.devicePixelRatio||1;b.height=b.width=n*O;const I=n/C*O;g.scale(I,I),g.fillStyle=a,g.fillRect(0,0,C,C),g.fillStyle=o,NZ?g.fill(new Path2D(_Z(w,E))):w.forEach(function(B,T){B.forEach(function(k,$){k&&g.fillRect($+E,T+E,1,1)})}),_&&g.drawImage(S,j.x+E,j.y+E,j.w,j.h)}}),q.useEffect(()=>{p(!1)},[x]);const v=s5({height:n,width:n},c);let y=null;return x!=null&&(y=q.createElement("img",{src:x,key:x,style:{display:"none"},onLoad:()=>{p(!0)},ref:h})),q.createElement(q.Fragment,null,q.createElement("canvas",s5({style:v,height:n,width:n,ref:f},d)),y)}const yg="https://cwpqqawfygddsennirrt.supabase.co/storage/v1/object/public/event-maps",hn=1536,ci=1024,Fr=(e,t)=>`${e/t*100}%`,bg={default:{url:`${yg}/ticket-template-2027-v2.jpg`,drawType:!0,drawLabels:!0,qr:{x:1198,y:536,size:276},ticketNo:{x:1196,width:288,y:862,start:36,maxW:250},buyer:{x:590,y:806,width:380,nameBaseline:868,mailBaseline:942,maxW:372}},kackmaut:{url:`${yg}/ticket-template-2027-kackmaut-v3.jpg`,drawType:!1,drawLabels:!1,qr:{x:1210,y:564,size:250},ticketNo:{x:1200,width:266,y:856,start:34,maxW:240},buyer:{x:600,y:824,width:360,nameBaseline:858,mailBaseline:938,maxW:356}},caravan:{url:`${yg}/ticket-template-2027-caravan-v3.jpg`,drawType:!1,drawLabels:!1,qr:{x:1214,y:622,size:236},ticketNo:{x:1222,width:230,y:852,start:34,maxW:214},buyer:{x:578,y:822,width:382,nameBaseline:862,mailBaseline:940,maxW:376}}},QS=e=>/caravan|wohnmobil/i.test(e)?bg.caravan:/dusch|kack|maut/i.test(e)?bg.kackmaut:bg.default;async function FZ(e,t){const r=QS(e.ticketType),n=document.createElement("canvas");n.width=hn,n.height=ci;const i=n.getContext("2d");await new Promise(x=>{const f=new Image;f.crossOrigin="anonymous",f.onload=()=>{i.drawImage(f,0,0,hn,ci),x()},f.onerror=()=>{i.fillStyle="#0D1416",i.fillRect(0,0,hn,ci),x()},f.src=r.url});const a="#E8E4DA",o="#13A0B8";if(i.textAlign="center",i.fillStyle=a,r.drawType){let x=48;const f=e.ticketType.toUpperCase();do i.font=`bold ${x}px Arial`,x-=2;while(i.measureText(f).width>296&&x>16);i.fillText(f,1340,348)}let l=r.ticketNo.start;do i.font=`bold ${l}px monospace`,l-=1;while(i.measureText(e.ticketNumber).width>r.ticketNo.maxW&&l>14);i.fillText(e.ticketNumber,r.ticketNo.x+r.ticketNo.width/2,r.ticketNo.y+30),t&&(i.fillStyle="#ffffff",i.fillRect(r.qr.x,r.qr.y,r.qr.size,r.qr.size),i.drawImage(t,r.qr.x,r.qr.y,r.qr.size,r.qr.size)),i.textAlign="left",r.drawLabels&&(i.fillStyle=o,i.font="bold 18px Arial",i.fillText("KÃUFER",r.buyer.x,r.buyer.nameBaseline-40),i.fillText("E-MAIL",r.buyer.x,r.buyer.mailBaseline-34)),i.fillStyle=a;let c=34;do i.font=`bold ${c}px Arial`,c-=1;while(i.measureText(e.holderName).width>r.buyer.maxW&&c>14);
805i.fillText(e.holderName,r.buyer.x,r.buyer.nameBaseline);let u=26;do i.font=`${u}px Arial`,u-=1;while(i.measureText(e.holderEmail).width>r.buyer.maxW&&u>12);i.fillText(e.holderEmail,r.buyer.x,r.buyer.mailBaseline);const d=document.createElement("a");d.download=`${e.ticketNumber}.png`,d.href=n.toDataURL("image/png"),d.click()}function PZ(e){const t=`ð« Spirit Festival Ticket 806 807${e.eventTitle} 808${e.eventDateLabel} 809${e.eventLocation} 810 811Ticket-Nr.: ${e.ticketNumber} 812Inhaber: ${e.holderName}`;navigator.share?navigator.share({title:"Spirit Festival Ticket",text:t}):navigator.clipboard.writeText(t).then(()=>alert("Ticket-Info in Zwischenablage kopiert!"))}function ME({ticket:e,compact:t=!1}){const r=A.useRef(null),n=QS(e.ticketType),i=A.useCallback(()=>{var o;const a=((o=r.current)==null?void 0:o.querySelector("canvas"))??null;FZ(e,a)},[e]);return s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"relative w-full overflow-hidden rounded-lg select-none",style:{aspectRatio:`${hn} / ${ci}`,containerType:"inline-size",backgroundImage:`url(${n.url})`,backgroundSize:"cover",backgroundPosition:"center",boxShadow:"0 20px 60px hsl(0 0% 0% / 0.6)"},children:[n.drawType&&s.jsx("div",{className:"absolute text-center leading-none uppercase font-display",style:{left:Fr(1186,hn),width:Fr(308,hn),top:Fr(300,ci),color:"hsl(45 20% 92%)",fontSize:"clamp(9px, 2.6cqw, 26px)"},children:e.ticketType}),s.jsx("div",{ref:r,className:"absolute bg-white",style:{left:Fr(n.qr.x,hn),top:Fr(n.qr.y,ci),width:Fr(n.qr.size,hn),height:Fr(n.qr.size,ci)},"aria-label":"QR-Code für Einlass",children:s.jsx(DZ,{value:e.qrData,size:276,bgColor:"#ffffff",fgColor:"#000000",level:"H",includeMargin:!0,style:{width:"100%",height:"100%"}})}),s.jsx("div",{className:"absolute text-center font-tech font-bold",style:{left:Fr(n.ticketNo.x,hn),width:Fr(n.ticketNo.width,hn),top:Fr(n.ticketNo.y,ci),color:"hsl(45 20% 92%)",fontSize:"clamp(7px, 1.5cqw, 16px)"},children:e.ticketNumber}),s.jsxs("div",{className:"absolute",style:{left:Fr(n.buyer.x,hn),top:Fr(n.buyer.y,ci),width:Fr(n.buyer.width,hn)},children:[n.drawLabels&&s.jsx("p",{className:"font-tech uppercase tracking-widest",style:{color:"hsl(188 82% 42%)",fontSize:"clamp(5px, 0.85cqw, 10px)"},children:"Käufer"}),s.jsx("p",{className:"font-bold truncate",style:{color:"hsl(45 20% 92%)",fontSize:"clamp(8px, 1.5cqw, 17px)"},children:e.holderName}),n.drawLabels?s.jsx("p",{className:"font-tech uppercase tracking-widest mt-[3%]",style:{color:"hsl(188 82% 42%)",fontSize:"clamp(5px, 0.85cqw, 10px)"},children:"E-Mail"}):s.jsx("div",{style:{height:Fr(52,ci)},"aria-hidden":"true"}),s.jsx("p",{className:"truncate",style:{color:"hsl(45 20% 92%)",fontSize:"clamp(7px, 1.2cqw, 13px)"},children:e.holderEmail})]}),e.isScanned&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",style:{background:"hsl(195 30% 4% / 0.65)",backdropFilter:"blur(2px)"},"aria-hidden":"true",children:s.jsxs("div",{className:"text-center",children:[s.jsx(up,{size:48,style:{color:"hsl(188 82% 42%)"},className:"mx-auto mb-2"}),s.jsx("p",{className:"font-display text-2xl",style:{color:"hsl(188 82% 42%)"},children:"GESCANNT"}),e.scannedAt&&s.jsx("p",{className:"text-xs mt-1",style:{color:"hsl(0 0% 75%)"},children:new Date(e.scannedAt).toLocaleString("de-DE")})]})})]}),!t&&s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("button",{onClick:i,className:"flex-1 flex items-center justify-center gap-2 py-2.5 rounded-xl border border-border text-sm hover:border-primary/50 hover:text-primary transition-all","aria-label":"Ticket als Bild herunterladen",children:[s.jsx(zr,{size:15}),"Als Bild speichern"]}),s.jsxs("button",{onClick:()=>PZ(e),className:"flex-1 flex items-center justify-center gap-2 py-2.5 rounded-xl border border-border text-sm hover:border-primary/50 hover:text-primary transition-all","aria-label":"Ticket teilen",children:[s.jsx(MT,{size:15}),"Teilen"]})]})]})}function OZ(e){return`${(e/100).toFixed(2).replace(".",",")} â¬`}function o5(e){return e.net_price_cents>0?Math.round(e.net_price_cents*(1+e.vat_rate/100))+e.fee_cents:e.price_cents}function TZ(e){const t=new Date;return!(e.sale_from&&new Date(e.sale_from)>t||e.sale_until&&new Date(e.sale_until)<t)}function l5(e,t){const r=new Date(e),n={day:"numeric",month:"long",year:"numeric"};
812if(!t)return r.toLocaleDateString("de-DE",n);const i=new Date(t);return`${r.toLocaleDateString("de-DE",{day:"numeric"})}. â ${i.toLocaleDateString("de-DE",n)}`}function $Z(){const[e,t]=A.useState(null),[r,n]=A.useState([]),[i,a]=A.useState(!0),[o,l]=A.useState(null),{addItem:c,openCart:u,setEventInfo:d,totalQuantity:x}=b0();A.useEffect(()=>{async function b(){const{data:g}=await re.from("events").select("*").eq("status","approved").order("date_start",{ascending:!1}).limit(1),w=(g??[])[0]??null;if(t(w),w){const{data:E}=await re.from("ticket_categories").select("*").eq("event_name",w.title).order("price_cents",{ascending:!1});n(E??[]),d({id:w.id,title:w.title,date:w.date_start,dateLabel:l5(w.date_start,w.date_end),location:w.location,address:w.address??"",timeStart:w.time_start??""})}a(!1)}b()},[]);const f=e?l5(e.date_start,e.date_end):"";function h(b){c({categoryId:b.id,category:b.category,description:b.description,unitPriceCents:o5(b),maxQuantity:Math.max(1,Math.min(10,b.total_stock-b.sold_count))}),l(b.id),window.setTimeout(()=>l(g=>g===b.id?null:g),1600)}if(i)return s.jsx("div",{className:"flex justify-center py-10 text-muted-foreground",children:s.jsx(ar,{size:26,className:"animate-spin text-primary"})});if(r.length===0)return null;const m=r.find(b=>b.category.startsWith("Kinderticket 4")),p=r.find(b=>
812b.category.startsWith("Kinderticket 6")),v=r.find(b=>b.category.toUpperCase().includes("WOCHENENDTICKET")),y=r.filter(b=>!b.category.startsWith("Kinderticket"));return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-center mb-6",children:[s.jsx("h3",{className:"font-display text-2xl uppercase",children:"Jetzt Ticket sichern"}),e&&s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[f," · ",e.location]})]}),s.jsxs("div",{className:"grid gap-4 sm:grid-cols-3 text-left",children:[y.map(b=>{const g=o5(b),w=b.total_stock-b.sold_count,E=w<=0,C=TZ(b),j=C&&!E;return s.jsxs("article",{className:`h-full flex flex-col rounded-2xl border bg-card/60 p-5 transition-all ${j?"border-border hover:border-primary/60 hover:shadow-lg hover:shadow-primary/10":"border-border/60 opacity-70"}`,children:[s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsx("h4",{className:"font-display text-base leading-tight uppercase",children:b.category}),s.jsx(Pt,{size:16,className:"text-primary shrink-0","aria-hidden":"true"})]}),b.description&&s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:b.description}),s.jsxs("div",{className:"mt-4",children:[s.jsx("span",{className:"font-grunge text-3xl text-primary",children:OZ(g)}),s.jsx("span",{className:"block text-[10px] text-muted-foreground mt-1",children:"inkl. MwSt. · zzgl. 10 % Bearbeitungsgebühr"})]}),s.jsxs("div",{className:"mt-3 text-[11px] text-muted-foreground inline-flex items-center gap-1.5",children:[s.jsx(Je,{size:12,className:"text-primary"}),E?"Ausverkauft":w<=50?`Nur noch ${w} verfügbar`:"Verfügbar"]}),s.jsx("button",{type:"button",disabled:!j,onClick:()=>h(b),className:`w-full inline-flex items-center justify-center gap-2 py-2.5 mt-5 rounded-xl text-sm font-bold transition-all ${j?"bg-primary text-primary-foreground hover:opacity-90 glow-primary":"bg-muted text-muted-foreground cursor-not-allowed"}`,children:E?"Ausverkauft":C?o===b.id?s.jsxs(s.Fragment,{children:[s.jsx(ti,{size:14})," Hinzugefügt"]}):s.jsxs(s.Fragment,{children:[s.jsx(kn,{size:14})," In den Warenkorb"]}):"Noch nicht im Verkauf"})]},b.id)}),(m||p)&&s.jsx(qS,{freeCategory:m,halfCategory:p,fullCategory:v,compact:!0})]}),x>0&&s.jsx("div",{className:"text-center mt-6",children:s.jsxs("button",{type:"button",onClick:u,className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-xl bg-primary text-primary-foreground text-sm font-bold glow-primary hover:opacity-90",children:[s.jsx(kn,{size:15})," Warenkorb (",x,") · zur Kasse"]})})]})}const JS="spirit-tickets";parseInt(localStorage.getItem("spirit-ticket-counter")??"1000",10);function IZ(e){return JSON.stringify({id:e.id,tn:e.ticketNumber,evt:e.eventTitle,dt:e.eventDate,loc:e.eventLocation,type:e.ticketType,holder:e.holderName,ts:e.purchasedAt,v:1})}function RE(){try{return JSON.parse(localStorage.getItem(JS)??"[]").map(t=>({deliveryStatus:"delivered",deliveryAttempts:1,...t}))}catch{return[]}}function eB(e){localStorage.setItem(JS,JSON.stringify(e))}function xx(e,t,r){const n=RE().map(i=>i.id===e?{...i,deliveryStatus:t,deliveryAttempts:(i.deliveryAttempts??0)+1,lastDeliveryAttempt:new Date().toISOString(),lastDeliveryError:r}:i);return eB(n),n}function MZ(e){const t=RE().filter(r=>r.id!==e);return eB(t),t}function RZ(e){return e==="delivered"||e==="failed"?e:"pending"}async function tB(){const{data:e,error:t}=await re.from("tickets").select("*, orders!inner(status)").eq("orders.status","paid").order("created_at",{ascending:!1});return t?(console.error("Failed to load tickets:",t.message),[]):(e??[]).map(r=>{const n={id:r.id,ticketNumber:r.ticket_number,eventId:r.event_id??"",eventTitle:r.event_title,eventDate:r.event_date??"",eventDateLabel:r.event_date_label??r.event_date??"",eventLocation:r.event_location??"",eventAddress:r.event_address??"",eventTime:r.event_time??"",ticketType:r.ticket_type,price:r.price_cents/100,currency:r.currency,holderName:r.holder_name,holderEmail:r.holder_email,purchasedAt:r.created_at,isScanned:r.is_checked_in,scannedAt:r.checked_in_at??void 0,deliveryStatus:RZ(r.delivery_status),deliveryAttempts:r.delivered_at||r.delivery_error?1:0,lastDeliveryAttempt:r.delivered_at??void 0,lastDeliveryError:r.delivery_error??void 0};return{...n,qrData:IZ(n),isRemote:!0}})}async function LZ(e){try{const{data:t,error:r}=await re.functions.invoke("send-ticket",{body:e});
812if(r){const i=r.message??"Unbekannter Fehler";return xx(e.id,"failed",i),{ok:!1,error:i}}if(t!=null&&t.ok)return xx(e.id,"delivered"),{ok:!0};const n=(t==null?void 0:t.error)??"Zustellung fehlgeschlagen";return xx(e.id,"failed",n),{ok:!1,error:n}}catch(t){const r=t instanceof Error?t.message:String(t);return xx(e.id,"failed",r),{ok:!1,error:r}}}function zZ({status:e}){return e==="delivered"?s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full bg-accent/10 text-accent-foreground border border-accent/20 font-medium",children:[s.jsx(ut,{size:9,"aria-hidden":"true"})," Zugestellt"]}):e==="failed"?s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full bg-destructive/10 text-destructive border border-destructive/20 font-medium",children:[s.jsx(Ul,{size:9,"aria-hidden":"true"})," Fehlgeschlagen"]}):s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full bg-muted text-muted-foreground border border-border font-medium",children:[s.jsx(gr,{size:9,"aria-hidden":"true"})," Ausstehend"]})}function UZ(){const[e,t]=A.useState([]),[r,n]=A.useState(""),[i,a]=A.useState(null),[o,l]=A.useState(null),[c,u]=A.useState(null),[d,x]=A.useState({}),[f,h]=A.useState(!0),[m,p]=A.useState(!1),v=A.useCallback(async()=>{h(!0);const{data:{session:E}}=await re.auth.getSession(),C=!!(E!=null&&E.user);p(C);const j=RE(),S=C?await tB():[],_=new Set(S.map(O=>O.ticketNumber));t([...S,...j.filter(O=>!_.has(O.ticketNumber))]),h(!1)},[]);A.useEffect(()=>{v()},[v]);const y=e.filter(E=>!r||E.eventTitle.toLowerCase().includes(r.toLowerCase())||E.ticketNumber.toLowerCase().includes(r.toLowerCase())||E.holderName.toLowerCase().includes(r.toLowerCase())),b=E=>{MZ(E),l(null),i===E&&a(null),v()};async function g(E){u(E.id),x(j=>{const S={...j};return delete S[E.id],S});const C=await LZ(E);x(j=>({...j,[E.id]:C})),u(null),v()}const w=e.filter(E=>E.deliveryStatus==="failed").length;return s.jsxs(s.Fragment,{children:[s.jsx(Sr,{}),s.jsxs("main",{id:"main-content",className:"pt-20 min-h-screen",children:[s.jsx("section",{className:"py-16 bg-card/50 border-b border-border text-center",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-2",children:"Deine Eintrittskarten"}),s.jsx("h1",{className:"font-grunge text-5xl md:text-8xl",children:"MEINE TICKETS"}),s.jsx("div",{className:"w-24 h-0.5 bg-primary mx-auto mt-4 glow-primary"}),s.jsx("p",{className:"text-muted-foreground mt-4 max-w-md mx-auto text-sm",children:"Alle deine Tickets mit QR-Code â offline gespeichert und jederzeit verfügbar."})]})}),w>0&&s.jsx("div",{className:"bg-destructive/5 border-b border-destructive/20",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-2xl py-3 flex items-center gap-3",children:[s.jsx(Ul,{size:15,className:"text-destructive shrink-0","aria-hidden":"true"}),s.jsxs("p",{className:"text-sm text-destructive flex-1",children:[w," Ticket",w!==1?"s":""," konnte",w!==1?"n":"",' nicht zugestellt werden. Ãffne das Ticket und klicke auf âErneut senden".']})]})}),s.jsx("div",{className:"sticky top-16 md:top-20 z-30 glass border-b border-border shadow-lg shadow-black/20",children:s.jsx("div",{className:"container mx-auto px-4 py-3 max-w-2xl",children:s.jsxs("div",{className:"relative",children:[s.jsx(Ur,{size:16,className:"absolute left-4 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none"}),s.jsx("input",{type:"search",placeholder:"Ticket oder Event suchen â¦",value:r,onChange:E=>n(E.target.value),className:"w-full bg-card border border-border rounded-xl pl-10 pr-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary/50","aria-label":"Tickets durchsuchen"}),r&&s.jsx("button",{onClick:()=>n(""),className:"absolute right-3 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Suche löschen",children:s.jsx(_t,{size:14})})]})})}),s.jsx("section",{className:"py-10","aria-label":"Ticket-Liste","aria-live":"polite",children:s.jsx("div",{className:"container mx-auto px-4 max-w-2xl",children:f?s.jsxs("div",{className:"text-center py-24 text-muted-foreground text-sm flex flex-col items-center gap-3",children:[s.jsx(Be,{size:22,className:"animate-spin text-primary","aria-hidden":"true"}),"Tickets werden geladen â¦"]}):e.length===0?s.jsxs("div",{className:"text-center py-16",children:[s.jsx("div",{className:"w-20 h-20 rounded-3xl glass border border-border flex items-center justify-center mx-auto mb-6",children:s.jsx(_f,{size:36,className:"text-muted-foreground"})}),s.jsx("h2",{className:"font-display text-3xl mb-2",children:"KEINE TICKETS"}),s.jsx("p",{className:"text-muted-foreground text-sm mb-8 max-w-sm mx-auto",children:m?"Für deine E-Mail-Adresse sind noch keine Tickets hinterlegt. Sichere dir jetzt deinen Platz!":"Melde dich mit der E-Mail-Adresse an, mit der du gekauft hast â oder kauf dein Ticket direkt hier."}),s.jsx($Z,{}),!m&&s.jsx("div",{className:"mt-8",children:s.jsx("a",{href:"/mein-bereich",className:"text-primary text-sm hover:underline",children:"Ich habe schon gekauft â anmelden"})})]}):y.length===0?s.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[s.jsxs("p",{className:"text-sm",children:["Kein Ticket für â",r,'" gefunden.']}),s.jsx("button",{onClick:()=>n(""),className:"mt-3 text-primary text-sm hover:underline",children:"Suche zurücksetzen"})]}):s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground mb-2",children:[s.jsxs("span",{children:[y.length," Ticket",y.length!==1?"s":""]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Lr,{size:11}),y.filter(E=>!E.isScanned).length," ausstehend"]})]}),y.map(E=>{const C=d[E.id],j=c===E.id;return s.jsxs("article",{className:`rounded-2xl border overflow-hidden gradient-card ${E.deliveryStatus==="failed"?"border-destructive/30":"border-border"}`,"aria-label":`Ticket: ${E.eventTitle}`,children:[s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3.5 cursor-pointer hover:bg-muted/30 transition-colors",onClick:()=>a(i===E.id?null:E.id),children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-muted/60 flex items-center justify-center shrink-0",children:s.jsx(_f,{size:20,className:"text-primary"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-semibold truncate",children:E.eventTitle}),s.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:[E.eventDateLabel," · ",E.ticketNumber]})]}),s.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[E.isScanned?s.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-primary/15 text-primary font-medium",children:"Gescannt"}):s.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-gold/15 text-gold font-medium",children:"Gültig"}),i===E.id?s.jsx(na,{size:16,className:"text-muted-foreground"}):s.jsx(mr,{size:16,className:"text-muted-foreground"})]})]}),i===E.id&&s.jsxs("div",{className:"border-t border-border p-4 space-y-4 animate-fade-up",children:[s.jsx(ME,{ticket:E}),s.jsxs("div",{className:`rounded-xl border p-3 text-xs space-y-2 ${E.deliveryStatus==="failed"?"bg-destructive/5 border-destructive/20":E.deliveryStatus==="delivered"?"bg-accent/5 border-accent/20":"bg-muted/40 border-border"}`,children:[s.jsxs("div",{className:"flex items-center justify-between gap-2 flex-wrap",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(os,{size:12,className:"text-muted-foreground","aria-hidden":"true"}),s.jsxs("span",{className:"text-muted-foreground",children:["E-Mail-Zustellung an ",s.jsx("strong",{className:"text-foreground",children:E.holderEmail})]})]}),s.jsx(zZ,{status:C!=null&&C.ok?"delivered":C&&!C.ok?"failed":E.deliveryStatus})]}),(E.deliveryStatus==="failed"||C&&!C.ok)&&!(C!=null&&C.ok)&&s.jsx("p",{className:"text-destructive/80 pl-5",children:(C==null?void 0:C.error)??E.lastDeliveryError??"Unbe
812kannter Fehler"}),(E.deliveryStatus==="failed"||E.deliveryStatus==="pending")&&!(C!=null&&C.ok)&&s.jsxs("button",{onClick:()=>g(E),disabled:j,className:"ml-5 flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-primary text-primary-foreground text-[11px] font-semibold hover:opacity-90 transition-opacity disabled:opacity-50","aria-label":"Ticket erneut senden",children:[j?s.jsx(Be,{size:10,className:"animate-spin","aria-hidden":"true"}):s.jsx(os,{size:10,"aria-hidden":"true"}),j?"Wird gesendet â¦":"Erneut senden"]}),(C==null?void 0:C.ok)&&s.jsxs("p",{className:"text-primary pl-5 flex items-center gap-1",children:[s.jsx(ut,{size:11,"aria-hidden":"true"})," Ticket erfolgreich zugestellt!"]}),E.deliveryAttempts>0&&s.jsxs("p",{className:"text-muted-foreground/60 pl-5 text-[10px]",children:[E.deliveryAttempts," Versuch",E.deliveryAttempts!==1?"e":"",E.lastDeliveryAttempt&&s.jsxs(s.Fragment,{children:[" · Zuletzt: ",new Date(E.lastDeliveryAttempt).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})]})]})]}),s.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-xs text-muted-foreground",children:[s.jsx(zr,{size:13,className:"text-primary shrink-0 mt-0.5"}),s.jsx("span",{children:"Speichere dein Ticket als Bild und füge es deiner Apple Wallet oder Google Wallet als Karte hinzu. Zeige den QR-Code am Einlass vor."})]}),E.isRemote?null:o===E.id?s.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-xl border border-destructive/40 bg-destructive/5",children:[s.jsx("p",{className:"flex-1 text-xs text-muted-foreground",children:"Ticket wirklich löschen?"}),s.jsx("button",{onClick:()=>b(E.id),className:"px-3 py-1.5 rounded-lg bg-destructive text-destructive-foreground text-xs font-medium",children:"Löschen"}),s.jsx("button",{onClick:()=>l(null),className:"px-3 py-1.5 rounded-lg border border-border text-xs",children:"Abbrechen"})]}):s.jsxs("button",{onClick:()=>l(E.id),className:"w-full flex items-center justify-center gap-1.5 py-2 text-xs text-destructive/70 hover:text-destructive transition-colors","aria-label":"Ticket löschen",children:[s.jsx(Vt,{size:12}),"Ticket entfernen"]})]})]},E.id)})]})})})]}),s.jsx(Br,{})]})}var WZ={name:"@lovable.dev/cloud-auth-js",version:"1.1.2",description:"Lovable Cloud Auth JS",main:"./dist/index.cjs",module:"./dist/index.js",types:"./dist/index.d.ts",type:"module",files:["dist"],scripts:{build:"tsup src/index.ts --format cjs,esm --dts --outDir dist",dev:"tsup src/index.ts --format cjs,esm --dts --watch",test:"vitest run",typecheck:"tsgo --noEmit",prepublishOnly:"npm run clean && npm run build",clean:"rimraf dist"},keywords:["lovable","oauth","authentication"],license:"MIT",devDependencies:{"@types/node":"^22",jsdom:"^26",rimraf:"^5.0.0",tsup:"^7.2.0",typescript:"^5",vitest:"^4.1.0"}},HZ="authorization_response",KZ="/~oauth/initiate",VZ=["https://oauth.lovable.app","https://lovable.dev"],GZ="lovable://oauth-callback",qZ="http://127.0.0.1/iframe-oauth/callback",YZ=500,ZZ=12e4;function XZ(e){let t;const r=new Promise(a=>{t=a}),n=a=>{if(!e.some(c=>a.origin===c))return;const l=a.data;!l||typeof l!="object"||l.type===HZ&&t(l.response)},i=()=>{window.removeEventListener("message",n)};return window.addEventListener("message",n),{cleanup:i,messagePromise:r}}function QZ(e){const t=window.screenX!==0||window.screenY!==0||!e,r=t?window.outerWidth*.5:window.screen.width*.5,n=t?window.outerHeight*.5:window.screen.height*.5,i=t?window.screenX+(window.outerWidth-r)/2:(window.screen.width-r)/2,a=t?window.screenY+(window.outerHeight-n)/2:(window.screen.height-n)/2;return{width:r,height:n,left:i,top:a}}function c5(e,t){return e.state!==t?{error:new Error("State is invalid")}:e.error?e.error==="legacy_flow"?{error:new Error("This flow is not supported in Preview mode. Please open the app in a new tab to sign in.")}:{error:new Error(e.error_description??"Sign in failed")}:!e.access_token||!e.refresh_token?{error:new Error("No tokens received")}:{tokens:{access_token:e.access_token,refresh_token:e.refresh_token},error:null}}function JZ(){const e=navigator.userAgent;return!!(/iPhone|iPad|iPod|Android/i.test(e)||/Macintosh/i.test(e)&&navigator.maxTouchPoints>1)}function eX(){return typeof crypto<"u"&&crypto.getRandomValues?[...crypto.getRandomValues(new Uint8Array(16))].map(e=>e.toString(16).padStart(2,"0")).join(""):Math.random().toString(36).substring(2)+Date.now().toString(36)}function tX(e={}){const t=e.oauthBrokerUrl??KZ,r=e.supportedOAuthOrigins??VZ;async function n(i,a={}){let o=!1;try{o=window.self!==window.top}catch{o=!0}const l=navigator.userAgent,c=/LovableApp\//.test(l),u=!c&&/lovable/i.test(l),d=eX();let x=a.redirect_uri??window.location.origin;c&&o?x=GZ:u&&o&&(x=qZ);const f=new URLSearchParams({...a.extraParams,provider:i,redirect_uri:x,state:d});if(!o)return window.location.href=`${t}?${f.toString()}`,{error:null,redirected:!0};!c&&!u&&f.set("response_mode","web_message");const h=`${t}?${f.toString()}`,m=u?[...r,window.location.origin]:r,{messagePromise:p,cleanup:v}=XZ(m);let y;if(JZ())y=window.open(h,"_blank");else{const{width:w,height:E,left:C,top:j}=QZ(o);y=window.open(h,"oauth",`width=${w},height=${E},left=${C},top=${j}`)}if(!y&&(c||u)){let w;const E=new Promise((C,j)=>{w=setTimeout(()=>{j(new Error("OAuth timed out waiting for response"))},ZZ)});try{const C=await Promise.race([p,E]);return c5(C,d)}catch(C){return{error:C instanceof Error?C:new Error(String(C))}}finally{w&&clearTimeout(w),v()}}if(!y)return v(),{error:new Error("Popup was blocked")};let b;const g=new Promise((w,E)=>{b=setInterval(()=>{y.closed&&(clearInterval(b),E(new Error("Sign in was cancelled")))},YZ)});try{const w=await Promise.race([p,g]);return c5(w,d)}catch(w){return{error:w instanceof Error?w:new Error(String(w))}}finally{clearInterval(b),v(),y==null||y.close()}}return{signInWithOAuth:n}}typeof window<"u"&&(window.__lovable_cloud_auth_js_version=WZ.version);function rX(e={}){return tX(e)}const nX=rX(),LE={auth:{signInWithOAuth:async(e,t)=>{const r=await nX.signInWithOAuth(e,{redirect_uri:t==null?void 0:t.redirect_uri,extraParams:{...t==null?void 0:t.extraParams}});if(r.redirected||r.error)return r;try{await re.auth.setSession(r.tokens)}catch(n){return{error:n instanceof Error?n:new Error(String(n))}}return r}}},iX=new Date("2027-08-19T16:00:00+02:00"),u5="spirit-customer-tab";function aX(){const e=iX.getTime()-Date.now();return Math.max(0,Math.ceil(e/864e5))}function sX(e){return`${(e/100).toFixed(2).replace(".",",")} â¬`}function d5(e){if(!e)return"TBA";if(/^\d{1,2}:\d{2}/.test(e))return e.slice(0,5);const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"})}function oX(){const e=["Donnerstag, 19.08.","Freitag, 20.08.","Samstag, 21.08."],t=["Hauptbühne","Punk-Zelt","Oi!-Stage"];return Gi.map((r,n)=>{const i=n%e.length,a=15+Math.floor(n/e.length)*2,o=n%2===0?"00":"30";return{id:`preview-${r.name}`,artist_name:r.name,stage:t[n%t.length],day_label:e[i],starts_at:`${String(a).padStart(2,"0")}:${o}`,ends_at:`${String(a+1).padStart(2,"0")}:${o}`}})}function lX(){const[e,t]=A.useState("login"),[r,n]=A.useState(""),[i,a]=A.useState(""),[o,l]=A.useState(""),[c,u]=A.useState(!1),[d,x]=A.useState(null),[f,h]=A.useState(null),[m,p]=A.useState(!1);async function v(g){if(g.preventDefault(),x(null),h(null),p(!0),e==="login"){const{error:E}=await re.auth.signInWithPassword({email:i,password:o});p(!1),E&&x("Ungültige Anmeldedaten. Bitte erneut versuchen.");return}if(o.length<6){p(!1),x("Passwort muss mindestens 6 Zeichen lang sein.");return}const{error:w}=await re.auth.signUp({email:i,password:o,options:{data:{full_name:r},emailRedirectTo:`${window.location.origin}/mein-bereich`}});if(p(!1),w){x(w.message);return}h(`Wir haben dir eine Bestätigungs-Mail an ${i} geschickt. Bitte bestätige deine Adresse.`)}async function y(){x(null);const g=await LE.auth.signInWithOAuth("google",{redirect_uri:`${window.location.origin}/mein-bereich`});g!=null&&g.error&&x("Google-Login fehlgeschlagen. Bitte erneut versuchen.")}async function b(){if(!i){x("Bitte zuerst deine E-Mail-Adresse eintragen.");return}x(null);const{error:g}=await re.auth.resetPasswordForEmail(i,{redirectTo:`${window.location.origin}/setup-account`});g?x(g.message):h("Passwort-Link ist unterwegs. Schau in dein Postfach.")}return s.jsx("section",{className:"py-16",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-md",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase",children:"Fanbereich"}),s.jsx("h1",{className:"font-display text-4xl md:text-5xl mt-1",children:"MEIN BEREICH"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Tickets, Festival-Pass, Timetable und alle wichtigen Infos an einem Ort."})]}),s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-7 shadow-2xl shadow-black/40",children:[s.jsx("div",{className:"grid grid-cols-2 gap-1 p-1 rounded-xl bg-muted mb-6",children:["login","register"].map(g=>s.jsx("button",{type:"button",onClick:()=>{t(g),x(null),h(null)},className:`py-2 rounded-lg text-sm font-bold transition-colors ${e===g?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"}`,children:g==="login"?"Anmelden":"Konto anlegen"},g))}),d&&s.jsx("div",{role:"alert",className:"mb-4 px-4 py-3 rounded-xl bg-destructive/10 border border-destructive/30 text-destructive text-sm",children:d}),f&&s.jsx("div",{className:"mb-4 px-4 py-3 rounded-xl bg-primary/10 border border-primary/30 text-sm",children:f}),s.jsxs("button",{type:"button",onClick:y,className:"flex items-center justify-center gap-2.5 w-full py-2.5 rounded-xl border border-border bg-muted hover:bg-muted/80 text-sm font-semibold transition-colors mb-5",children:[s.jsx(cp,{size:16,"aria-hidden":"true"})," Mit Google ",e==="login"?"anmelden":"registrieren"]}),s.jsxs("div",{className:"relative mb-5","aria-hidden":"true",children:[s.jsx("div",{className:"absolute inset-0 flex items-center",children:s.jsx("div",{className:"w-full border-t border-border"})}),s.jsx("div",{className:"relative flex justify-center",children:s.jsx("span",{className:"px-3 bg-card text-xs text-muted-foreground",children:"oder per E-Mail"})})]}),s.jsxs("form",{onSubmit:v,className:"space-y-4",children:[e==="register"&&s.jsxs("div",{children:[s.jsx("label",{htmlFor:"ma-name",className:"block text-xs text-muted-foreground mb-1.5",children:"Name"}),s.jsx("input",{id:"ma-name",required:!0,value:r,onChange:g=>n(g.target.value),className:"w-full bg-background border border-border rounded-xl px-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50",placeholder:"Vor- und Nachname"})]}),s.jsxs("div",{children:[s.jsx("label",{htmlFor:"ma-email",className:"block text-xs text-muted-foreground mb-1.5",children:"E-Mail"}),s.jsxs("div",{className:"relative",children:[s.jsx($t,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{id:"ma-email",type:"email",required:!0,autoComplete:"email",value:i,onChange:g=>a(g.target.value),className:"w-full bg-background border border-border rounded-xl pl-9 pr-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50",placeholder:"[email protected]"})]}),s.jsx("p",{className:"text-[11px] text-muted-foreground mt-1.5",children:"Nutze die Adresse, mit der du deine Tickets gekauft hast."})]}),s.jsxs("div",{children:[s.jsx("label",{htmlFor:"ma-pw",className:"block text-xs text-muted-foreground mb-1.5",children:"Passwort"}),s.jsxs("div",{className:"relative",children:[s.jsx(dp,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{id:"ma-pw",type:c?"text":"password",required:!0,autoComplete:e==="login"?"current-password":"new-password",value:o,onChange:g=>l(g.target.value),className:"w-full bg-background border border-border rounded-xl pl-9 pr-10 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢"}),s.jsx("button",{type:"button",onClick:()=>u(g=>!g),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors","aria-label":c?"Passwort verbergen":"Passwort anzeigen",children:c?s.jsx(uo,{size:15}):s.jsx(ki,{size:15})})]})]}),s.jsx("button",{type:"submit",disabled:m,className:"w-full py-2.5 rounded-xl bg-primary text-primary-foreground font-bold text-sm hover:opacity-90 transition-opacity glow-primary disabled:opacity-50",children:m?"Bitte warten â¦":e==="login"?"Anmelden":"Konto anlegen"})]}),e==="login"&&s.jsx("button",{type:"button",onClick:b,className:"w-full text-center text-xs text-muted-foreground hover:text-primary mt-4 transition-colors",children:"Passwort vergessen?"})]}),s.jsxs("div",{className:"mt-6 rounded-2xl border border-border bg-card/60 p-5",children:[s.jsxs("p",{className:"text-sm font-bold flex items-center gap-2 mb-1",children:[s.jsx(Ur,{size:14,className:"text-primary"})," Kein Konto, aber Tickets gekauft?"]}),s.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Lass dir deine Tickets erneut per E-Mail zusenden â ohne Anmeldung."}),s.jsx(we,{to:"/tickets-abruf",className:"text-sm font-bold text-primary hover:underline",children:"Zum Ticket-Abruf â"})]})]})})}const cX=[{to:"/events",label:"Ticketshop",desc:"Tickets & Caravan nachbuchen",icon:kn},{to:"/lineup",label:"Line-Up",desc:"Alle Bands 2027",icon:ia},{to:"/lageplan",label:"Geländeplan",desc:"Bühnen, Camping, Service",icon:_r},{to:"/faq",label:"FAQ",desc:"Antworten auf alles",icon:E4}];function go({icon:e,eyebrow:t,title:r,action:n}){return s.jsxs("div",{className:"flex items-end justify-between gap-4 mb-5",children:[s.jsxs("div",{children:[s.jsxs("span",{className:"text-[10px] tracking-[0.2em] uppercase text-primary inline-flex items-center gap-1.5",children:[s.jsx(e,{size:12})," ",t]}),s.jsx("h2",{className:"font-display text-2xl md:text-3xl mt-1",children:r})]}),n]})}function uX({posts:e,notificationsEnabled:t,onToggleNotifications:r}){return s.jsx("section",{className:"py-10 border-t border-border",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-5xl",children:[s.jsx(go,{icon:OT,eyebrow:"Frisch aus Loburg",title:"NEWS & UPDATES",action:s.jsxs("button",{type:"button",onClick:r,className:`inline-flex items-center gap-2 rounded-xl border px-3 py-2 text-xs font-bold transition-colors ${t?"border-primary/60 text-primary bg-primary/10":"border-border text-muted-foreground hover:text-primary"}`,children:[s.jsx(mT,{size:14})," ",t?"Hinweise aktiv":"News erlauben"]})}),s.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:e.map(n=>s.jsxs("article",{className:"border border-border bg-card/60 p-5 rounded-2xl",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3 text-[10px] uppercase tracking-widest text-primary",children:[s.jsx("span",{children:n.category}),n.published_at&&s.jsx("time",{children:new Date(n.published_at).toLocaleDateString("de-DE")})]}),s.jsx("h3",{className:"font-display text-xl mt-3",children:n.title}),s.jsx("p",{className:"text-sm text-muted-foreground mt-2 line-clamp-3",children:n.excerpt||n.body})]},n.id))}),s.jsxs("p",{className:"text-[11px] text-muted-foreground mt-3 flex items-center gap-1.5",children:[s.jsx(ST,{size:12,className:"text-primary"})," ",t?"Du erhältst Hinweise auf diesem Gerät, wenn neue Festival-News erscheinen.":"Aktiviere Hinweise, damit News nicht an dir vorbeigehe
812n."]})]})})}function dX({slots:e,favorites:t,onToggleFavorite:r}){const n=A.useMemo(()=>Array.from(new Set(e.map(u=>u.day_label))),[e]),[i,a]=A.useState(n[0]??""),[o,l]=A.useState(!1);A.useEffect(()=>{n.includes(i)||a(n[0]??"")},[i,n]);const c=e.filter(u=>u.day_label===i&&(!o||t.has(u.artist_name)));return s.jsxs("section",{children:[s.jsx(go,{icon:Vx,eyebrow:"Dein Festival-Plan",title:"MEIN TIMETABLE",action:s.jsxs("button",{type:"button",onClick:()=>l(u=>!u),className:`inline-flex items-center gap-2 rounded-xl border px-3 py-2 text-xs font-bold transition-colors ${o?"border-primary/60 text-primary bg-primary/10":"border-border text-muted-foreground hover:text-primary"}`,children:[s.jsx(ti,{size:14})," Nur meine Acts"]})}),s.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2 mb-5",children:n.map(u=>s.jsx("button",{type:"button",onClick:()=>a(u),className:`shrink-0 rounded-xl border px-4 py-2 text-xs font-bold ${i===u?"border-primary bg-primary text-primary-foreground":"border-border text-muted-foreground hover:text-primary"}`,children:u},u))}),s.jsx("div",{className:"border border-border rounded-2xl overflow-hidden bg-card/50",children:c.length===0?s.jsx("div",{className:"p-10 text-center text-sm text-muted-foreground",children:"Noch keine Acts markiert. Klicke auf den Stern, um deinen persönlichen Plan zu bauen."}):c.map((u,d)=>{const x=t.has(u.artist_name);return s.jsxs("div",{className:`grid grid-cols-[76px_1fr_auto] gap-3 items-center p-4 ${d>0?"border-t border-border":""}`,children:[s.jsxs("div",{className:"font-tech text-primary text-sm",children:[s.jsx("span",{children:d5(u.starts_at)}),s.jsx("span",{className:"block text-[10px] text-muted-foreground",children:d5(u.ends_at)})]}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"font-display text-lg truncate",children:u.artist_name}),s.jsx("p",{className:"text-xs text-muted-foreground",children:u.stage})]}),s.jsx("button",{type:"button",onClick:()=>r(u.artist_name),className:`w-9 h-9 rounded-lg border flex items-center justify-center transition-colors ${x?"border-primary text-primary bg-primary/10":"border-border text-muted-foreground hover:text-primary"}`,"aria-label":x?`${u.artist_name} aus Favoriten entfernen`:`${u.artist_name} merken`,children:x?s.jsx(ti,{size:15}):s.jsx(Ht,{size:15})})]},u.id)})}),s.jsx("p",{className:"text-[11px] text-muted-foreground mt-3",children:"Deine Auswahl wird mit deinem Konto synchronisiert. Zeiten ohne finale Veröffentlichung sind vorläufig."})]})}function xX({userId:e,displayName:t}){const[r,n]=A.useState([]),[i,a]=A.useState(new Set),[o,l]=A.useState([]),[c,u]=A.useState(null),[d,x]=A.useState(""),[f,h]=A.useState(""),[m,p]=A.useState(""),[v,y]=A.useState(null),[b,g]=A.useState(!1),w=re,E=A.useCallback(async()=>{const[{data:_},{data:O}]=await Promise.all([w.from("fan_groups").select("id,name,description,join_code,camp_field,owner_id").order("created_at",{ascending:!1}),w.from("fan_group_members").select("group_id").eq("user_id",e)]);n(_??[]),a(new Set((O??[]).map(I=>I.group_id)))},[w,e]);A.useEffect(()=>{E()},[E]);async function C(_){if(_.preventDefault(),!d.trim())return;g(!0),y(null);const O=crypto.randomUUID().replace(/-/g,"").slice(0,6).toUpperCase(),{data:I,error:B}=await w.from("fan_groups").insert({owner_id:e,name:d.trim(),camp_field:m.trim()||null,join_code:O}).select("id,name,description,join_code,camp_field,owner_id").single();B||!I?y("Die Crew konnte nicht angelegt werden."):(await w.from("fan_group_members").insert({group_id:I.id,user_id:e,display_name:t||"Crew-Owner"}),x(""),p(""),y(`Crew angelegt. Dein Beitrittscode: ${O}`),await E()),g(!1)}async function j(_){_.preventDefault();const O=f.trim().toUpperCase();if(!O)return;g(!0),y(null);const{data:I}=await w.from("fan_groups").select("id,name,description,join_code,camp_field,owner_id").eq("join_code",O).maybeSingle();if(!I)y("Kein Crew-Code gefunden.");else{const{error:B}=await w.from("fan_group_members").upsert({group_id:I.id,user_id:e,display_name:t||"Festival-Fan"},{onConflict:"group_id,user_id"});y(B?"Beitritt fehlgeschlagen.":`Du bist jetzt Teil von ${I.name}.`),h(""),await E()}g(!1)}async function S(_){u(_);const{data:O}=await w.from("fan_group_members").select("id,user_id,display_name").eq("group_id",_.id);l(O??[])}return s.jsxs("section",{children:[s.jsx(go,{icon:Je,eyebrow:"Zusammen anreisen",title:"DEINE CREW"}),s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2 mb-6",children:[s.jsxs("form",{onSubmit:C,className:"border border-border rounded-2xl bg-card/50 p-5",children:[s.jsx("p",{className:"font-display text-xl",children:"CREW GRÃNDEN"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1 mb-4",children:"Teile den Code mit deiner Gruppe und stimmt euch auf Camping und Anreise ab."}),s.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[s.jsx("input",{value:d,onChange:_=>x(_.target.value),required:!0,placeholder:"Name der Crew",className:"bg-background border border-border rounded-xl px-3 py-2.5 text-sm"}),s.jsx("input",{value:m,onChange:_=>p(_.target.value),placeholder:"Campingfeld (optional)",className:"bg-background border border-border rounded-xl px-3 py-2.5 text-sm"})]}),s.jsxs("button",{disabled:b,className:"mt-4 inline-flex items-center gap-2 rounded-xl bg-primary text-primary-foreground px-4 py-2.5 text-sm font-bold disabled:opacity-50",children:[s.jsx(Ht,{size:15})," Crew anlegen"]})]}),s.jsxs("form",{onSubmit:j,className:"border border-border rounded-2xl bg-card/50 p-5",children:[s.jsx("p",{className:"font-display text-xl",children:"CREW BEITRETEN"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1 mb-4",children:"Du hast einen Code bekommen? Hier eintragen und direkt dazustoÃen."}),s.jsx("input",{value:f,onChange:_=>h(_.target.value),required:!0,placeholder:"z. B. A7K2QF",className:"w-full bg-background border border-border rounded-xl px-3 py-2.5 text-sm uppercase tracking-widest"}),s.jsxs("button",{disabled:b,className:"mt-4 inline-flex items-center gap-2 rounded-xl border border-primary/50 text-primary px-4 py-2.5 text-sm font-bold disabled:opacity-50",children:[s.jsx(Je,{size:15})," Beitreten"]})]})]}),v&&s.jsx("div",{className:"mb-4 rounded-xl border border-primary/30 bg-primary/10 px-4 py-3 text-sm text-primary",children:v}),s.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:r.filter(_=>i.has(_.id)).map(_=>s.jsxs("div",{className:"border border-border rounded-2xl bg-card p-5 flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-display text-xl",children:_.name}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:_.camp_field||"Campingfeld noch offen"}),s.jsxs("p",{className:"font-tech text-primary tracking-widest mt-3",children:["CODE: ",_.join_code]})]}),s.jsx("button",{type:"button",onClick:()=>void S(_),className:"shrink-0 rounded-lg border border-border p-2 text-muted-foreground hover:text-primary","aria-label":`Mitglieder von ${_.name} anzeigen`,children:s.jsx(Je,{size:15})})]},_.id))}),c&&s.jsxs("div",{className:"mt-4 border border-primary/30 rounded-2xl bg-primary/5 p-5",children:[s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("p",{className:"font-display text-xl",children:c.name}),s.jsx("button",{type:"button",onClick:()=>u(null),"aria-label":"Crew schlieÃen",className:"text-muted-foreground hover:text-foreground",children:s.jsx(_t,{size:17})})]}),s.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:o.map(_=>s.jsx("span",{className:"rounded-full border border-border px-3 py-1 text-xs",children:_.display_name||"Festival-Fan"},_.id))})]})]})}function fX({merch:e,onSaveMerch:t}){const r=Gi.filter(n=>n.spotify).slice(0,8);return s.jsxs("section",{children:[s.jsx(go,{icon:ny,eyebrow:"Mehr aus deinem Festival",title:"UPGRADES & RADIO"}),s.jsxs("div",{className:"grid gap-5 lg:grid-cols-[1.1fr_0.9fr]",children:[s.jsxs("div",{className:"border border-border rounded-2xl bg-card/50 p-5",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-display text-xl",children:"UPGRADES"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Caravan, Dusche und weitere Festival-Extras findest du direkt im Ticketshop."})]}),s.jsx(kn,{size:20,className:"text-primary"})]}),s.jsxs("div",{className:"grid gap-2 mt-5",children:[s.jsxs(we,{to:"/events",className:"flex items-center justify-between gap-3 rounded-xl border border-border p-3 text-sm hover:border-primary/50",children:[s.jsxs("span",{children:[s.jsx("b",{children:"Caravan-Ticket"}),s.jsx("small",{className:"block text-xs text-muted-foreground",children:"Stellplatz fürs Festival"})]}),s.jsx(zl,{size:16,className:"text-primary"})]}),s.jsxs(we,{to:"/events",className:"flex items-center justify-between gap-3 rounded-xl border border-border p-3 text-sm hover:border-primary/50",children:[s.jsxs("span",{children:[s.jsx("b",{children:"Dusche & WC"}),s.jsx("small",{className:"block text-xs text-muted-foreground",children:"Sanitär-Upgrade nac
812hbuchen"})]}),s.jsx(zl,{size:16,className:"text-primary"})]})]}),e.length>0&&s.jsxs("div",{className:"mt-5 pt-5 border-t border-border",children:[s.jsx("p",{className:"font-display text-lg",children:"MERCH VORMERKEN"}),s.jsx("div",{className:"grid gap-2 mt-3",children:e.map(n=>s.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-xl bg-background/50 p-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold",children:n.name}),s.jsx("p",{className:"text-xs text-muted-foreground",children:sX(n.price_cents)})]}),s.jsx("button",{type:"button",onClick:()=>t(n.id),className:"rounded-lg border border-border p-2 text-muted-foreground hover:text-primary","aria-label":`${n.name} vormerken`,children:s.jsx(ti,{size:15})})]},n.id))})]})]}),s.jsxs("div",{className:"border border-border rounded-2xl bg-card/50 p-5",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-display text-xl",children:"FESTIVAL-RADIO"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Dein Line-up zum Reinhören â Favoriten sammeln und Vorfreude anschalten."})]}),s.jsx(ia,{size:20,className:"text-primary"})]}),s.jsx("div",{className:"space-y-2 mt-5",children:r.map(n=>s.jsxs("a",{href:n.spotify,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between rounded-xl border border-border px-3 py-2.5 text-sm hover:border-primary/50",children:[s.jsx("span",{children:n.name}),s.jsx(w4,{size:14,className:"text-primary"})]},n.name))})]})]})]})}function hX({tickets:e,expanded:t,onExpand:r}){return s.jsxs("section",{children:[s.jsx(go,{icon:h0,eyebrow:"Alles griffbereit",title:"RECHNUNGEN & DOWNLOADS",action:s.jsxs(we,{to:"/tickets-abruf",className:"inline-flex items-center gap-2 rounded-xl border border-border px-3 py-2 text-xs font-bold text-muted-foreground hover:text-primary",children:[s.jsx($t,{size:14})," Erneut per Mail"]})}),s.jsx("div",{className:"border border-border rounded-2xl bg-card/50 p-4 mb-5",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(zr,{size:18,className:"text-primary mt-0.5"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-bold",children:"Deine Ticket-Pässe sind offline speicherbar"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Ãffne einen Pass und speichere ihn als Bild. Der QR-Code bleibt auch ohne Netz auf deinem Gerät verfügbar. Rechnungen werden nach jeder Zahlung per E-Mail bereitgestellt."})]})]})}),s.jsx("div",{className:"space-y-3",children:e.map(n=>s.jsxs("div",{className:"border border-border rounded-2xl bg-card overflow-hidden",children:[s.jsxs("button",{type:"button",onClick:()=>r(n.id),className:"w-full flex items-center gap-3 p-4 text-left hover:bg-muted/30",children:[s.jsx(Pt,{size:16,className:"text-primary shrink-0"}),s.jsx("span",{className:"font-mono text-xs text-primary font-bold",children:n.ticketNumber}),s.jsx("span",{className:"text-sm font-semibold truncate",children:n.ticketType}),s.jsxs("span",{className:"ml-auto text-xs text-muted-foreground",children:["Pass öffnen ",s.jsx(zl,{size:14,className:"inline"})]})]}),t===n.id&&s.jsx("div",{className:"border-t border-border bg-muted/20 p-4",children:s.jsx(ME,{ticket:n})})]},n.id))})]})}function pX({userId:e,email:t,name:r,isAdmin:n,onSignOut:i}){const[a,o]=A.useState([]),[l,c]=A.useState(oX),[u,d]=A.useState(new Set),[x,f]=A.useState([]),[h,m]=A.useState([]),[p,v]=A.useState(!0),[y,b]=A.useState(null),[g,w]=A.useState(()=>localStorage.getItem(u5)||"overview"),[E,C]=A.useState(()=>localStorage.getItem("spirit-news-notifications")==="on"),[j,S]=A.useState(()=>localStorage.getItem("spirit-wallet-pass")==="saved"),[_,O]=A.useState(()=>JSON.parse(localStorage.getItem("spirit-merch-wishlist")||"[]")),I=re,B=A.useCallback(async()=>{v(!0);const[{data:K},{data:R},{data:H},{data:X}]=await Promise.all([I.from("timetable_slots").select("id,artist_name,stage,day_label,starts_at,ends_at").order("sort_order"),I.from("band_favorites").select("artist_name").eq("user_id",e),I.from("news_posts").select("id,title,excerpt,body,category,published_at").eq("published",!0).order("published_at",{ascending:!1}).limit(3),I.from("merch_products").select("id,name,description,category,price_cents,image_url,stock").eq("active",!0).order("created_at",{ascending:!1})]),ie=await tB();o(ie),K&&K.length>0&&c(K),d(new Set((R??[]).map(se=>se.artist_name))),f(H??[]),m(X??[]),v(!1)},[I,e]);A.useEffect(()=>{B()},[B]);const T=x.length>0?x:[{id:"welcome",title:"Willkommen beim Spirit Festival 2027",excerpt:"Dein persönlicher Festivalbereich ist bereit.",body:"Dein persönlicher Festivalbereich ist bereit.",category:"Festival",published_at:null}],k=a.reduce((K,R)=>K+R.price,0),$=aX(),W=a[0];function z(K){w(K),localStorage.setItem(u5,K)}async function L(K){const R=new Set(u);R.has(K)?(R.delete(K),await I.from("band_favorites").delete().eq("user_id",e).eq("artist_name",K)):(R.add(K),await I.from("band_favorites").insert({user_id:e,artist_name:K})),d(R)}async function F(){if(E)localStorage.removeItem("spirit-news-notifications"),C(!1);else{if(!("Notification"in window)||(Notification.permission==="default"?await Notification.requestPermission():Notification.permission)!=="granted")return;localStorage.setItem("spirit-news-notifications","on"),C(!0),new Notification("Spirit Festival 2027",{body:"News-Hinweise sind jetzt aktiv."})}}function U(){localStorage.setItem("spirit-wallet-pass","saved"),S(!0),W&&b(W.id)}function D(K){const R=_.includes(K)?_.filter(H=>H!==K):[..._,K];O(R),localStorage.setItem("spirit-merch-wishlist",JSON.stringify(R))}const N=[{id:"overview",label:"Ãbersicht",icon:h9},{id:"timetable",label:"Timetable",icon:Vx},{id:"crew",label:"Crew",icon:Je},{id:"extras",label:"Extras",icon:ny},{id:"documents",label:"Downloads",icon:h0}];return s.jsxs(s.Fragment,{children:[s.jsx("section",{className:"py-12 bg-card/50 border-b border-border",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-5xl",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end sm:justify-between gap-4",children:[s.jsxs("div",{children:[s.jsxs("span",{className:"text-xs text-primary tracking-widest uppercase flex items-center gap-1.5",children:[s.jsx(ny,{size:12})," Fanbereich"]}),s.jsxs("h1",{className:"font-display text-4xl md:text-6xl mt-1",children:["MOIN ",(r||t).split(" ")[0].toUpperCase(),"!"]}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t})]}),s.jsxs("div",{className:"flex gap-2",children:[n&&s.jsxs(we,{to:"/dashboard",className:"inline-flex items-center gap-2 px-4 py-2 rounded-xl border border-primary/40 text-primary text-sm font-bold hover:bg-primary/10",children:[s.jsx(ha,{size:14})," Admin-Panel"]}),s.jsxs("button",{onClick:i,className:"inline-flex items-center gap-2 px-4 py-2 rounded-xl border border-border text-sm font-bold text-muted-foreground hover:text-foreground",children:[s.jsx(ry,{size:14})," Abmelden"]})]})]}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3 mt-8",children:[{label:"Meine Tickets",value:a.length,icon:Pt}
812,{label:"Gesamt bezahlt",value:`⬠${k.toLocaleString("de-DE",{minimumFractionDigits:2})}`,icon:kn},{label:"Tage bis Festival",value:$,icon:Vx}].map(({label:K,value:R,icon:H})=>s.jsxs("div",{className:"p-4 rounded-xl border border-border bg-card gradient-card flex flex-col gap-1",children:[s.jsx(H,{size:14,className:"text-primary"}),s.jsx("p",{className:"font-display text-2xl",children:R}),s.jsx("p",{className:"text-[11px] text-muted-foreground",children:K})]},K))})]})}),s.jsx("div",{className:"container mx-auto px-4 max-w-5xl py-6",children:s.jsx("nav",{"aria-label":"Mein Bereich",className:"flex gap-2 overflow-x-auto pb-1",children:N.map(({id:K,label:R,icon:H})=>s.jsxs("button",{type:"button",onClick:()=>z(K),className:`shrink-0 inline-flex items-center gap-2 rounded-xl px-4 py-2.5 text-sm font-bold border transition-colors ${g===K?"bg-primary text-primary-foreground border-primary":"border-border text-muted-foreground hover:text-primary"}`,children:[s.jsx(H,{size:15})," ",R]},K))})}),s.jsx("main",{className:"pb-16",children:s.jsx("div",{className:"container mx-auto px-4 max-w-5xl",children:p?s.jsxs("div",{className:"flex items-center gap-2 py-16 text-muted-foreground text-sm",children:[s.jsx(Be,{size:16,className:"animate-spin"})," Lade deinen Festivalbereich â¦"]}):g==="overview"?s.jsxs(s.Fragment,{children:[s.jsxs("section",{className:"grid gap-5 lg:grid-cols-[1.25fr_0.75fr] mb-10",children:[s.jsxs("div",{className:"border border-primary/40 rounded-2xl bg-card overflow-hidden p-5 md:p-7 relative",children:[s.jsx("div",{className:"absolute top-0 right-0 text-primary/20",children:s.jsx(b9,{size:150})}),s.jsxs("div",{className:"relative",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("span",{className:"text-[10px] tracking-[0.2em] uppercase text-primary",children:"Dein Festival-Pass"}),s.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[10px] uppercase tracking-widest text-primary",children:[s.jsx("span",{className:"w-2 h-2 rounded-full bg-primary animate-pulse"})," ",j?"offline gespeichert":"bereit"]})]}),s.jsx("p",{className:"font-grunge text-5xl md:text-7xl mt-10 text-primary",children:"SPIRIT"}),s.jsx("p",{className:"font-display text-2xl mt-1",children:"19.â21. AUGUST 2027 · LOBURG"}),s.jsxs("div",{className:"flex flex-wrap gap-2 mt-6",children:[s.jsxs("button",{type:"button",onClick:U,className:"inline-flex items-center gap-2 rounded-xl bg-primary text-primary-foreground px-4 py-2.5 text-sm font-bold glow-primary",children:[s.jsx(b9,{size:15})," ",j?"Pass geöffnet":"Pass offline speichern"]}),s.jsxs("button",{type:"button",onClick:()=>W&&b(W.id),disabled:!W,className:"inline-flex items-center gap-2 rounded-xl border border-border px-4 py-2.5 text-sm font-bold text-muted-foreground hover:text-primary disabled:opacity-50",children:[s.jsx(ki,{size:15})," QR-Pass anzeigen"]})]})]})]}),s.jsxs("div",{className:"border border-border rounded-2xl bg-card/60 p-5",children:[s.jsx("p",{className:"text-[10px] tracking-[0.2em] uppercase text-primary",children:"Dein nächster Schritt"}),s.jsx("h2",{className:"font-display text-3xl mt-2",children:"BAU DEINEN PLAN"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Markiere deine Acts, gründe eine Crew und hab alles dabei, was du vor Ort brauchst."}),s.jsx("div",{className:"space-y-2 mt-6",children:[{tab:"timetable",icon:Vx,label:"Timetable personalisieren"},{tab:"crew",icon:Je,label:"Crew zusammenstellen"},{tab:"documents",icon:zr,label:"Pässe & Downloads öffnen"}].map(({tab:K,icon:R,label:H})=>s.jsxs("button",{type:"button",onClick:()=>z(K),className:"w-full flex items-center justify-between gap-3 rounded-xl border border-border p-3 text-sm hover:border-primary/50",children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(R,{size:15,className:"text-primary"}),H]}),s.jsx(zl,{size:15,className:"text-muted-foreground"})]},K))})]})]}),s.jsxs("section",{className:"mb-10",children:[s.jsx(go,{icon:Pt,eyebrow:"Deine Käufe",title:"MEINE TICKETS",action:s.jsxs("button",{onClick:()=>void B(),disabled:p,className:"inline-flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground",children:[s.jsx(Be,{size:13,className:p?"animate-spin":""})," Aktualisieren"]})}),a.length===0?s.jsxs("div",{className:"border border-border rounded-2xl bg-card p-8 text-center",children:[s.jsx(Pt,{size:32,className:"mx-auto text-primary/40 mb-3"}),s.jsx("p",{className:"font-bold mb-1",children:"Noch keine Tickets auf diesem Konto"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Hast du mit einer anderen E-Mail bestellt? Dann nutze den Ticket-Abruf."}),s.jsx(we,{to:"/events",className:"inline-flex px-4 py-2 rounded-xl bg-primary text-primary-foreground text-sm font-bold",children:"Tickets kaufen"})]}):s.jsxs("div",{className:"space-y-3",children:[a.slice(0,3).map(K=>s.jsxs("div",{className:"border border-border rounded-2xl bg-card overflow-hidden",children:[s.jsxs("button",{onClick:()=>b(y===K.id?null:K.id),className:"w-full flex flex-wrap items-center gap-3 p-4 text-left hover:bg-muted/30",children:[s.jsx(Pt,{size:16,className:"text-primary"}),s.jsx("span",{className:"font-mono text-xs font-bold text-primary",children:K.ticketNumber}),s.jsx("span",{className:"text-sm font-semibold",children:K.ticketType}),s.jsx("span",{className:"text-xs text-muted-foreground",children:K.eventDateLabel}),s.jsxs("span",{className:"ml-auto text-sm font-bold",children:["⬠",K.price.toLocaleStr
812ing("de-DE",{minimumFractionDigits:2})]})]}),y===K.id&&s.jsx("div",{className:"p-4 border-t border-border bg-muted/20",children:s.jsx(ME,{ticket:K})})]},K.id)),a.length>3&&s.jsxs("button",{type:"button",onClick:()=>z("documents"),className:"text-sm font-bold text-primary hover:underline",children:["Alle ",a.length," Tickets und Downloads öffnen â"]})]})]}),s.jsx(uX,{posts:T,notificationsEnabled:E,onToggleNotifications:()=>void F()}),s.jsxs("section",{className:"pt-10",children:[s.jsx(go,{icon:h9,eyebrow:"Alles dabei",title:"FESTIVAL-INFOS"}),s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-3",children:cX.map(({to:K,label:R,desc:H,icon:X})=>s.jsxs(we,{to:K,className:"p-5 rounded-2xl border border-border bg-card hover:border-primary/50 transition-colors group",children:[s.jsx(X,{size:18,className:"text-primary mb-3"}),s.jsx("p",{className:"font-display text-lg group-hover:text-primary",children:R}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:H})]},K))})]})]}):g==="timetable"?s.jsx(dX,{slots:l,favorites:u,onToggleFavorite:K=>void L(K)}):g==="crew"?s.jsx(xX,{userId:e,displayName:r||t.split("@")[0]}):g==="extras"?s.jsx(fX,{merch:h,onSaveMerch:D}):s.jsx(hX,{tickets:a,expanded:y,onExpand:K=>b(y===K?null:K)})})})]})}function mX(){const e=ms(),[t,r]=A.useState(!0),[n,i]=A.useState(null),[a,o]=A.useState(!1);A.useEffect(()=>{const{data:{subscription:c}}=re.auth.onAuthStateChange((u,d)=>{var x,f;d!=null&&d.user?(i({id:d.user.id,email:d.user.email??"",name:((x=d.user.user_metadata)==null?void 0:x.full_name)??((f=d.user.user_metadata)==null?void 0:f.name)??""}),setTimeout(async()=>{const{data:h}=await re.rpc("has_role",{_user_id:d.user.id,_role:"admin"});o(!!h)},0)):(i(null),o(!1)),r(!1)});return re.auth.getSession().then(({data:{session:u}})=>{var d,x;u!=null&&u.user&&(i({id:u.user.id,email:u.user.email??"",name:((d=u.user.user_metadata)==null?void 0:d.full_name)??((x=u.user.user_metadata)==null?void 0:x.name)??""}),re.rpc("has_role",{_user_id:u.user.id,_role:"admin"}).then(({data:f})=>o(!!f))),r(!1)}),()=>c.unsubscribe()},[]);async function l(){await re.auth.signOut(),i(null),e("/")}return s.jsxs(s.Fragment,{children:[s.jsx(Sr,{}),s.jsx("main",{id:"main-content",className:"pt-16 min-h-screen",children:t?s.jsxs("div",{className:"flex items-center justify-center py-32 text-muted-foreground gap-2 text-sm",children:[s.jsx(ar,{size:16,className:"animate-spin"})," Einen Moment â¦"]}):n?s.jsx(pX,{userId:n.id,email:n.email,name:n.name,isAdmin:a,onSignOut:l}):s.jsx(lX,{})}),s.jsx(Br,{})]})}const gX=g4("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ge=A.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...i},a)=>{const o=n?yO:"button";return s.jsx(o,{className:Wr(gX({variant:t,size:r,className:e})),ref:a,...i})});Ge.displayName="Button";function vX(){const[e,t]=A.useState(""),[r,n]=A.useState("idle"),[i,a]=A.useState(null),[o,l]=A.useState(null),c=async u=>{u.preventDefault(),l(null),n("loading");const{data:d,error:x}=await re.functions.invoke("request-tickets",{body:{email:e.trim()}});if(x){n("idle"),l("Anfrage fehlgeschlagen. Bitte versuche es in einigen Minuten erneut.");return}a((d==null?void 0:d.message)??"Deine Tickets sind unterwegs."),n("done")};return s.jsxs(s.Fragment,{children:[s.jsx(Sr,{}),s.jsx("main",{id:"main-content",className:"pt-24 min-h-screen",children:s.jsx("section",{className:"py-14",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-xl",children:[s.jsxs(we,{to:"/",className:"inline-flex items-center gap-2 text-xs uppercase tracking-widest text-muted-foreground hover:text-primary transition-colors",children:[s.jsx(Sn,{size:13})," Startseite"]}),s.jsx("h1",{className:"font-display text-4xl md:text-6xl mt-4",children:"TICKETS ERNEUT ANFORDERN"}),s.jsx("p",{className:"text-muted-foreground mt-3 text-sm leading-relaxed",children:"Keine Ticket-Mail im Postfach? Gib hier die E-Mail-Adresse ein, mit der du bestellt hast. Wir schicken dir alle Tickets und Rechnungen deiner bezahlten Bestellungen erneut zu."}),r==="done"?s.jsxs("div",{className:"mt-8 p-6 rounded-2xl border border-primary/40 bg-card space-y-3",children:[s.jsx(ut,{className:"text-primary",size:26}),s.jsx("p",{className:"font-bold text-foreground",children:"Anfrage erhalten"}),s.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:i}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Tipp: Suche in deinem Postfach nach âSpirit Festivalâ und prüfe Spam- bzw. Werbe-Ordner. Der Versand kann einige Minuten dauern."})]}):s.jsxs("form",{onSubmit:c,className:"mt-8 space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx($t,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx("input",{type:"email",required:!0,autoComplete:"email",value:e,onCh
812ange:u=>t(u.target.value),placeholder:"[email protected]",className:"w-full pl-10 pr-4 py-3 rounded-xl border border-border bg-card text-sm focus:outline-none focus:ring-1 focus:ring-primary"})]}),o&&s.jsx("p",{className:"text-sm text-destructive",children:o}),s.jsxs(Ge,{type:"submit",disabled:r==="loading",className:"w-full gap-2",children:[r==="loading"&&s.jsx(ar,{size:15,className:"animate-spin"}),"Tickets zusenden"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Aus Datenschutzgründen bestätigen wir nicht, ob zu einer Adresse Bestellungen existieren."})]})]})})}),s.jsx(Br,{})]})}const x5=.25,f5=.5,h5=3,Eg=[{id:"mainstage",icon:ia,label:"Mainstage",color:"text-primary",overlayColor:"bg-primary",hotspot:{top:42,left:18,width:22,height:18},description:"Die Hauptbühne â Mitte-links auf dem Gelände"},{id:"stage2",icon:ia,label:"Stage II",color:"text-primary",overlayColor:"bg-primary",hotspot:{top:55,left:8,width:16,height:14},description:"Zweite Bühne â links-mittig auf dem Gelände"},{id:"camping1",icon:Gx,label:"Camping & Parking Area I",color:"text-primary",overlayColor:"bg-primary",hotspot:{top:30,left:62,width:30,height:40},description:"GroÃe Camping- und Parkfläche â rechts"},{id:"camping2",icon:Gx,label:"Camping & Parking Area II",color:"text-primary",overlayColor:"bg-primary",hotspot:{top:50,left:2,width:14,height:28},description:"Camping- und Parkfläche â weit links"},{id:"camping3",icon:Gx,label:"Camping & Parking Area III",color:"text-primary",overlayColor:"bg-primary",hotspot:{top:5,left:30,width:25,height:18},description:"Camping- und Parkfläche â oben-mittig"},{id:"biergarten",icon:pT,label:"Biergarten / Markt / Merch",color:"text-primary",overlayColor:"bg-primary",hotspot:{top:8,left:55,width:28,height:22},description:"Biergarten, Markt, Merch und Stände â oben rechts"},{id:"einlass",icon:ha,label:"Einlass / Kontrolle",color:"text-primary",overlayColor:"bg-primary",hotspot:{top:38,left:48,width:16,height:12},description:"Einlass und Sicherheitskontrolle â mittig-rechts"},{id:"barrierefrei",icon:fT,label:"Barrierefreier Bereich",color:"text-primary",overlayColor:"bg-primary",hotspot:{top:48,left:36,width:14,height:10},description:"Barrierefreier Bereich â Mitte des Geländes"},{id:"sanitaer",icon:_r,label:"Sanitäranlagen (Dixi / WC)",color:"text-primary",overlayColor:"bg-primary",hotspot:{top:74,left:20,width:50,height:14},description:"Dixiland I (unten rechts), Dixiland II (unten links), WC und Duschen verteilt"},{id:"erstehilfe",icon:_r,label:"Erstehilfe / Sanitäter",color:"text-destructive",overlayColor:"bg-destructive",hotspot:{top:6,left:40,width:14,height:10},description:"Erstehilfe und Sanitäter â oben mittig (rotes Kreuz)"}];function yX(){const[e,t]=A.useState(1),[r,n]=A.useState(!1),[i,a]=A.useState({x:0,y:0}),[o,l]=A.useState(null),c=A.useRef(null),u=A.useRef(null),d=A.useCallback(()=>t(_=>Math.min(+(_+x5).toFixed(2),h5)),[]),x=A.useCallback(()=>t(_=>Math.max(+(_-x5).toFixed(2),f5)),[]),f=A.useCallback(()=>{t(1),a({x:0,y:0})},[]),h=_=>l(O=>O===_?null:_),m=()=>l(null),p=Eg.find(_=>_.id===o)??null,v=()=>{const _=window.open("","_blank","width=900,height=700");_&&(_.document.write(` 813<!DOCTYPE html> 814<html lang="de"> 815<head> 816 <meta charset="UTF-8" /> 817 <title>Spirit Festival 2025 â Geländeplan</title> 818 <style> 819 * { margin: 0; padding: 0; box-sizing: border-box; } 820 @page { size: A4 portrait; margin: 10mm; } 821 body { font-family: Arial, sans-serif; color: #000; background: #fff; } 822 823 .print-header { text-align: center; padding-bottom: 6mm; border-bottom: 2px solid #ff6b00; margin-bottom: 6mm; } 824 .print-header h1 { font-size: 22pt; letter-spacing: 0.08em; text-transform: uppercase; } 825 .print-header p { font-size: 9pt; color: #555; margin-top: 2mm; } 826 827 .map-wrapper { display: flex; justify-content: center; margin-bottom: 6mm; } 828 .map-wrapper img { max-width: 100%; max-height: 200mm; object-fit: contain; } 829 830 .legend { border-top: 1px solid #ccc; padding-top: 4mm; } 831 .legend h2 { font-size: 11pt; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3mm; color: #ff6b00; } 832 .legend ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5mm 6mm; } 833 .legend li { font-size: 8pt; display: flex; align-items: center; gap: 2mm; } 834 .legend li::before { content: "â"; font-size: 7pt; color: #ff6b00; flex-shrink: 0; } 835 .legend li.emergency::before { color: #cc0000; } 836 837 .text-desc { margin-top: 5mm; font-size: 7.5pt; color: #444; line-height: 1.5; border-top: 1px solid #ddd; padding-top: 4mm; } 838 .text-desc h3 { font-size: 8.5pt; text-transform: uppercase; letter-spacing: 0.05em; color: #ff6b00; margin-bottom: 2mm; } 839 .text-desc p { margin-bottom: 1.5mm; } 840 .text-desc strong { color: #000; } 841 842 .print-footer { margin-top: 6mm; border-top: 1px solid #ccc; padding-top: 3mm; font-size: 7pt; color: #888; text-align: center; } 843 844 @media print { 845 body { -webkit-print-color-adjust: exact; print-color-adjust: exact; } 846 } 847 </style> 848</head> 849<body> 850 <div class="print-header"> 851 <h1>Spirit Festival 2025 â Geländeplan</h1> 852 <p>20. â 22. August 2025 | Festwiesen, 39279 Loburg bei Magdeburg</p> 853 <p style="font-size:8pt;color:#888;margin-top:1mm;">spirit-festival.com | [email protected]</p> 854 </div> 855 856 <div class="map-wrapper"> 857 <img src="${Yx}" alt="Geländeplan Spirit Festival Loburg" /> 858 </div> 859 860 <div class="legend"> 861 <h2>Legende</h2> 862 <ul> 863 <li>Mainstage</li> 864 <li>Stage II</li> 865 <li>Camping & Parking Area I (rechts)</li> 866 <li>Camping & Parking Area II (links)</li> 867 <li>Camping & Parking Area III (oben)</li> 868 <li>Biergarten / Markt / Merch / Stände</li> 869 <li>Einlass / Kontrolle</li> 870 <li>Band-Merch (Mitte)</li> 871 <li>Barrierefreier Bereich</li> 872 <li>Sanitäranlagen (Dixi / WC / Duschen)</li> 873 <li class="emergency">Erstehilfe / Sanitäter (rotes Kreuz)</li> 874 <li>Parking Backstage</li> 875 </ul> 876 </div> 877 878 <div class="text-desc"> 879 <h3>Textbeschreibung (Barrierefreiheit)</h3> 880 <p><strong>Zufahrt:</strong> FreiheitsstraÃe / Besucherzufahrt (oben, von Norden). Am Triptweg / Rettungsweg verläuft links.</p> 881 <p><strong>Einlass:</strong> Einlass / Kontrolle befindet sich mittig-rechts auf dem Gelände.</p> 882 <p><strong>Bühnen:</strong> Mainstage (Mitte-links, groÃ), Stage II (links-mittig, kleiner).</p> 883 <p><strong>Camping & Parken:</strong> Area I (rechts, groÃ), Area II (weit links), Area III (oben-mittig). Camping und Parken sind nicht getrennt.</p> 884 <p><strong>Versorgung:</strong> Biergarten, Markt, Merch und Stände (oben rechts). Band-Merch (Mitte). Getränke- und Essensstände verteilt.</p> 885 <p><strong>Sanitär:</strong> Dixiland I (unten rechts), Dixiland II (unten links), WC-Anlagen und Duschen verteilt.</p> 886 <p><strong>Sicherheit / Hilfe:</strong> Erstehilfe / Sanitäter (oben mittig, rotes Kreuz). Barrierefreier Bereich (Mitte).</p> 887 </div> 888 889 <div class="print-footer"> 890 Gedruckt von spirit-festival.com | Ãnderungen vorbehalten | Stand: 2025 891 </div> 892 893 <script>window.onload = () => { window.print(); window.onafterprint = () => window.close(); };<\/script> 894</body> 895</html>`),_.document.close())},y=_=>{e<=1||(n(!0),c.current={x:_.clientX,y:_.clientY,ox:i.x,oy:i.y})},b=_=>{!r||!c.current||a({x:c.current.ox+_.clientX-c.current.x,y:c.current.oy+_.clientY-c.
895current.y})},g=()=>{n(!1),c.current=null},w=_=>{if(e<=1)return;const O=_.touches[0];c.current={x:O.clientX,y:O.clientY,ox:i.x,oy:i.y}},E=_=>{if(!c.current)return;const O=_.touches[0];a({x:c.current.ox+O.clientX-c.current.x,y:c.current.oy+O.clientY-c.current.y})},C=()=>{c.current=null},j=_=>{(_.key==="+"||_.key==="=")&&(_.preventDefault(),d()),_.key==="-"&&(_.preventDefault(),x()),_.key==="0"&&(_.preventDefault(),f()),_.key==="Escape"&&(_.preventDefault(),m()),_.key==="ArrowUp"&&(_.preventDefault(),a(O=>({...O,y:O.y+40}))),_.key==="ArrowDown"&&(_.preventDefault(),a(O=>({...O,y:O.y-40}))),_.key==="ArrowLeft"&&(_.preventDefault(),a(O=>({...O,x:O.x+40}))),_.key==="ArrowRight"&&(_.preventDefault(),a(O=>({...O,x:O.x-40})))},S=Math.round(e*100);return s.jsxs(s.Fragment,{children:[s.jsx(Sr,{}),s.jsxs("main",{id:"main-content",className:"pt-20 min-h-screen",children:[s.jsx("section",{className:"py-20 bg-card/50 border-b border-border text-center","aria-label":"Geländeplan Ãberschrift",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-2",children:"Orientierung vor Ort"}),s.jsx("h1",{className:"font-grunge text-6xl md:text-9xl",children:"GELÃNDEPLAN"}),s.jsx("div",{className:"w-24 h-0.5 bg-primary mx-auto mt-4 glow-primary"}),s.jsx("p",{className:"text-muted-foreground mt-4 max-w-lg mx-auto",children:"Mainstage · Stage II · Camping-Areas · Biergarten · Merch · Sanitäranlagen"}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-2 flex items-center justify-center gap-1",children:[s.jsx(_r,{size:14,className:"text-primary","aria-hidden":"true"}),"Festwiesen, 39279 Loburg bei Magdeburg"]})]})}),s.jsxs("section",{className:"py-12","aria-labelledby":"map-section-heading",children:[s.jsx("h2",{id:"map-section-heading",className:"sr-only",children:"Interaktiver Geländeplan"}),s.jsxs("div",{className:"container mx-auto px-4 max-w-5xl",children:[s.jsxs("p",{className:"text-xs text-muted-foreground text-center mb-4",children:["Tastatur:"," ",s.jsx("kbd",{className:"px-1.5 py-0.5 rounded bg-muted text-foreground text-[10px]",children:"+"})," / ",s.jsx("kbd",{className:"px-1.5 py-0.5 rounded bg-muted text-foreground text-[10px] mx-1",children:"â"}),"Zoomen ·",s.jsx("kbd",{className:"px-1.5 py-0.5 rounded bg-muted text-foreground text-[10px] mx-1",children:"0"}),"Reset · Pfeiltasten Verschieben ·",s.jsx("kbd",{className:"px-1.5 py-0.5 rounded bg-muted text-foreground text-[10px] mx-1",children:"Esc"}),"Auswahl aufheben"]}),s.jsxs("div",{className:"flex items-center justify-center gap-2 mb-4 flex-wrap",role:"toolbar","aria-label":"Kartensteuerung",children:[s.jsx("button",{onClick:x,disabled:e<=f5,className:"w-10 h-10 rounded-xl border border-border flex items-center justify-center text-muted-foreground hover:text-primary hover:border-primary/50 transition-all disabled:opacity-30 disabled:cursor-not-allowed","aria-label":"Herauszoomen",children:s.jsx(VT,{size:18})}),s.jsxs("span",{className:"font-tech text-sm text-primary min-w-[52px] text-center","aria-live":"polite","aria-atomic":"true","aria-label":`Zoom: ${S} Prozent`,children:[S,"%"]}),s.jsx("button",{onClick:d,disabled:e>=h5,className:"w-10 h-10 rounded-xl border border-border flex items-center justify-center text-muted-foreground hover:text-primary hover:border-primary/50 transition-all disabled:opacity-30 disabled:cursor-not-allowed","aria-label":"Hineinzoomen",children:s.jsx(KT,{size:18})}),s.jsx("button",{onClick:f,className:"w-10 h-10 rounded-xl border border-border flex items-center justify-center text-muted-foreground hover:text-primary hover:border-primary/50 transition-all","aria-label":"Zoom und Position zurücksetzen",children:s.jsx(aa,{size:16})}),s.jsx("div",{className:"w-px h-6 bg-border mx-1","aria-hidden":"true"}),s.jsxs("button",{onClick:v,className:"flex items-center gap-2 px-4 py-2 rounded-xl bg-primary text-primary-foreground text-sm font-bold hover:opacity-90 transition-opacity glow-primary","aria-label":"Geländeplan als PDF drucken",children:[s.jsx(v9,{size:15}),s.jsx("span",{children:"Als PDF drucken"})]}),s.jsxs("a",{href:Yx,download:"Spirit-Festival-Gelaendeplan.png",className:"flex items-center gap-2 px-4 py-2 rounded-xl border border-border text-sm text-muted-foreground hover:text-primary hover:border-primary/50 transition-all","aria-label":"Geländeplan al
895s Bild herunterladen",children:[s.jsx(zr,{size:15}),s.jsx("span",{className:"hidden sm:inline",children:"Bild-Download"})]})]}),p&&s.jsxs("div",{className:"flex items-center justify-between gap-3 mb-3 px-4 py-2.5 rounded-xl border border-primary/40 bg-primary/10 text-sm",role:"status","aria-live":"polite",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(p.icon,{size:16,className:p.color,"aria-hidden":"true"}),s.jsx("span",{className:"font-semibold text-foreground",children:p.label}),s.jsxs("span",{className:"text-muted-foreground",children:["â ",p.description]})]}),s.jsx("button",{onClick:m,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors","aria-label":"Auswahl aufheben",children:s.jsx(_t,{size:15})})]}),s.jsxs("div",{ref:u,className:"relative overflow-hidden rounded-2xl border border-border bg-card shadow-2xl shadow-black/60",style:{cursor:e>1?r?"grabbing":"grab":"default",height:"70vh",minHeight:340},tabIndex:0,role:"img","aria-label":"Geländeplan des Spirit Festivals. Eingang oben rechts (FreiheitsstraÃe/Besucherzufahrt). Mainstage mittig-links. Stage II links-mittig. Camping Areas I rechts, II links, III oben. Biergarten und Merch oben rechts. Sanitäranlagen unten. Erstehilfe oben mittig.","aria-roledescription":"Interaktive Karte â mit Tastatur zoomen und navigieren",onKeyDown:j,onMouseDown:y,onMouseMove:b,onMouseUp:g,onMouseLeave:g,onTouchStart:w,onTouchMove:E,onTouchEnd:C,children:[s.jsx("img",{src:Yx,alt:"Detaillierter Geländeplan Spirit Festival Loburg: Mainstage (Mitte-links), Stage II (links), Camping & Parking Area I (rechts), Area II (weit links), Area III (oben), Biergarten und Merch-Stände (oben rechts), Einlass/Kontrolle (Mitte-rechts), Erstehilfe (oben mittig, rotes Kreuz), Barrierefreier Bereich (Mitte), Band-Merch (Mitte), Dixiland I und II (unten), WC-Anlagen verteilt auf dem Gelände, Parking Backstage (unten mittig)",style:{transform:`scale(${e}) translate(${i.x/e}px, ${i.y/e}px)`,transformOrigin:"center center",transition:r?"none":"transform 0.2s ease",width:"100%",height:"100%",objectFit:"contain",userSelect:"none",pointerEvents:"none"},draggable:!1}),Eg.map(_=>{const O=o===_.id,I=_.id==="erstehilfe";return s.jsxs("button",{onClick:()=>h(_.id),className:"absolute group transition-all duration-200 focus:outline-none",style:{top:`${_.hotspot.top}%`,left:`${_.hotspot.left}%`,width:`${_.hotspot.width}%`,height:`${_.hotspot.height}%`,zIndex:O?20:10},"aria-pressed":O,"aria-label":`${_.label} â ${_.description}`,children:[o&&!O&&s.jsx("div",{className:"absolute inset-0 bg-background/50 rounded-lg transition-opacity duration-300"}),s.jsx("div",{className:`absolute inset-0 rounded-lg border transition-all duration-200 ${O?I?"border-2 border-destructive bg-destructive/20":"border-2 border-primary bg-primary/20":I?"border border-destructive/0 bg-destructive/0 group-hover:border-destructive/70 group-hover:bg-destructive/10":"border border-primary/0 bg-primary/0 group-hover:border-primary/70 group-hover:bg-primary/10"} ${O?"animate-pulse":""}`}),s.jsxs("div",{className:`pointer-events-none absolute left-1/2 -translate-x-1/2 transition-all duration-150 ${O?"-top-9 opacity-100 scale-100":"-top-9 opacity-0 scale-95 group-hover:opacity-100 group-hover:scale-100"}`,style:{zIndex:30},children:[s.jsxs("div",{className:`whitespace-nowrap flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-[11px] font-bold text-primary-foreground shadow-lg ${I?"bg-destructive":"bg-primary"}`,children:[s.jsx(_.icon,{size:11,"aria-hidden":"true"}),_.label]}),s.jsx("div",{className:`mx-auto mt-0.5 w-2 h-1.5 ${I?"bg-destructive":"bg-primary"}`,style:{clipPath:"polygon(0 0, 100% 0, 50% 100%)"},"aria-hidden":"true"})]}),s.jsx("div",{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-3 h-3 rounded-full border-2 border-background shadow transition-all duration-200 ${O?I?"bg-destructive scale-125":"bg-primary scale-125":I?"bg-destructive/60 group-hover:bg-destructive group-hover:scale-110":"bg-primary/60 group-hover:bg-primary group-hover:scale-110"}`,"aria-hidden":"true"})]},_.id)}),e!==1&&s.jsxs("div",{className:"absolute bottom-3 right-3 px-2.5 py-1 rounded-lg bg-background/80 border border-border text-xs font-tech text-primary","aria-hidden":"true",children:[S,"%"]})]}),s.jsxs("details",{className:"mt-4",children:[s.jsx("summary",{className:"text-sm text-muted-foreground cursor-pointer hover:text-primary transition-colors w-fit select-none",children:"Textbeschreibung des Geländeplans (Barrierefreiheit)"}),s.jsxs("div",{className:"mt-3 p-4 rounded-xl border border-border bg-card text-sm text-muted-foreground leading-relaxed space-y-2",children:[s.jsxs("p",{children:[s.jsx("strong",{className:"text-foreground",children:"Zufahrt:"})," FreiheitsstraÃe / Besucherzufahrt (oben, von Norden). Am Triptweg / Rettungsweg verläuft links."]}),s.jsxs("p",{children:[s.jsx("strong",{className:"text-foreground",children:"Einlass:"})," Einlass / Kontrolle befindet sich mittig-rechts auf dem Gelände."]}),s.jsxs("p",{children:[s.jsx("strong",{className:"text-foreground",children:"Bühnen:"})," Mainstage (Mitte-links, groÃ), Stage II (links-mittig, kleiner)."]}),s.jsxs("p",{children:[s.jsx("strong",{className:"text-foreground",children:"Camping & Parken:"})," Area I (rechts, groÃ), Area II (weit links), Area III (oben-mittig). Camping und Parken sind nicht getrennt."]}),s.jsxs("p",{children:[s.jsx("strong",{className:"text-foreground",children:"Versorgung:"})," Biergarten, Markt, Merch und Stände (oben rechts). Band-Merch (Mitte). Getränke- und Essensstände verteilt."]}),s.jsxs("p",{children:[s.jsx("strong",{className:"text-foreground",children:"Sanitär:"})," Dixiland I (unten rechts), Dixiland II (unten links), WC-Anlagen und Duschen verteilt."]}),s.jsxs("p",{children:[s.jsx("strong",{className:"text-foreground",children:"Sicherheit / Hilfe:"})," Erstehilfe / Sanitäter (oben mittig, rotes Kreuz). Barrierefreier Bereich (Mitte, Rollstuhl-Symbol)."]}),s.jsxs("p",{children:[s.jsx("strong",{className:"text-foreground",children:"Backstage:"})," Parking Backstage (unten mittig)."]})]})]})]})]}),s.jsx("section",{className:"py-12 bg-card/30 border-t border-border","aria-labelledby":"legend-heading",children:s.jsx("div",{className:"container mx-auto px-4 max-w-3xl",children:s.jsxs(Ce,{children:[s.jsx("h2",{className:"font-display text-3xl text-center mb-2",id:"legend-heading",children:"LEGENDE"}),s.jsx("p",{className:"text-sm text-muted-foreground text-center mb-8",children:"Bereich anklicken, um ihn auf der Karte hervorzuheben"}),s.jsx("ul",{className:"grid sm:grid-cols-2 gap-3",role:"list","aria-label":"Geländebereiche",children:Eg.map(_=>{const O=o===_.id;return s.jsx("li",{children:s.jsxs("button",{onClick:()=>h(_.id),className:`w-full flex items-center gap-3 p-3 rounded-xl border text-left transition-all duration-200 ${O?_.id==="erstehilfe"?"border-destructive bg-destructive/10 shadow-md":"border-primary bg-primary/10 shadow-md shadow-primary/10":"border-border gradient-card hover:border-primary/40 hover:bg-primary/5"}`,"aria-pressed":O,"aria-label":`${_.label} auf der Karte ${O?"ausgeblendet":"hervorheben"}`,children:[s.jsx(_.icon,{size:18,className:O?_.color:"text-muted-foreground","aria-hidden":"true"}),s.jsx("span",{className:`text-sm font-medium ${O?"text-foreground":"text-muted-foreground"}`,children:_.label}),O&&s.jsx("span",{className:"ml-auto text-[10px] font-bold tracking-wide uppercase text-primary",children:"Aktiv"})]})},_.id)})}),o&&s.jsx("div",{className:"mt-4 text-center",children:s.jsx("button",{onClick:m,className:"text-sm text-muted-foreground hover:text-primary transition-colors underline underline-offset-4",children:"Alle Bereiche anzeigen"})}),s.jsxs("div",{className:"mt-10 text-center",children:[s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Für Ausdrucke empfehlen wir das DIN-A4-Hochformat im Browser-Druckdialog."}),s.jsxs("button",{onClick:v,className:"inline-flex items-center gap-2 px-8 py-3 bg-primary text-primary-foreground rounded-xl font-bold hover:opacity-90 transition-opacity glow-primary","aria-label":"Geländeplan al
895s PDF drucken oder speichern",children:[s.jsx(v9,{size:18}),"Geländeplan drucken / als PDF speichern"]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-3",children:'Im Browser-Druckdialog âAls PDF speichern" wählen, um eine PDF-Datei zu erzeugen.'})]})]})})})]}),s.jsx(Br,{})]})}const Jc={event_name:"",category:"",price_cents:0,total_stock:0,sold_count:0,restock_threshold:50};function Qx(e,t){return t===0?0:Math.round(e/t*100)}function bX(e){return e>=90?"bg-destructive":e>=70?"bg-orange-500":"bg-primary"}function rB(e,t,r){const n=t-e;return n===0?{label:"Ausverkauft",cls:"bg-destructive/15 text-destructive"}:n<=r?{label:"Nachfüllen!",cls:"bg-orange-500/15 text-orange-400"}:{label:"OK",cls:"bg-green-500/15 text-green-400"}}function EX(e){const t=["Veranstaltung","Kategorie","Preis (â¬)","Gesamt","Verkauft","Verfügbar","Auslastung (%)","Schwellenwert","Status"],r=e.map(l=>{const c=l.total_stock-l.sold_count,u=rB(l.sold_count,l.total_stock,l.restock_threshold);return[l.event_name,l.category,(l.price_cents/100).toFixed(2),l.total_stock,l.sold_count,c,Qx(l.sold_count,l.total_stock),l.restock_threshold,u.label].join(";")}),n=[t.join(";"),...r].join(` 896`),i=new Blob(["\uFEFF"+n],{type:"text/csv;charset=utf-8;"}),a=URL.createObjectURL(i),o=document.createElement("a");o.href=a,o.download=`ticket-inventory-${new Date().toISOString().slice(0,10)}.csv`,o.click(),URL.revokeObjectURL(a)}function p5({draft:e,onSave:t,onCancel:r,saving:n,onChange:i}){const a="w-full bg-background border border-border rounded-lg px-2 py-1.5 text-xs focus:outline-none focus:ring-1 focus:ring-primary/60";return s.jsxs("tr",{className:"border-b border-primary/30 bg-primary/5",children:[s.jsx("td",{className:"px-5 py-2.5",children:s.jsx("input",{className:a,placeholder:"Event-Name",value:e.event_name,onChange:o=>i("event_name",o.target.value)})}),s.jsx("td",{className:"px-3 py-2.5",children:s.jsx("input",{className:a,placeholder:"Kategorie",value:e.category,onChange:o=>i("category",o.target.value)})}),s.jsx("td",{className:"px-3 py-2.5",children:s.jsx("input",{className:a,type:"number",min:"0",step:"0.01",placeholder:"0.00",value:(e.price_cents/100).toFixed(2),onChange:o=>i("price_cents",Math.round(parseFloat(o.target.value||"0")*100))})}),s.jsx("td",{className:"px-3 py-2.5",children:s.jsx("input",{className:a,type:"number",min:"0",placeholder:"0",value:e.total_stock,onChange:o=>i("total_stock",parseInt(o.target.value||"0",10))})}),s.jsx("td",{className:"px-3 py-2.5",children:s.jsx("input",{className:a,type:"number",min:"0",placeholder:"0",value:e.sold_count,onChange:o=>i("sold_count",parseInt(o.target.value||"0",10))})}),s.jsx("td",{className:"px-3 py-2.5",children:s.jsx("input",{className:a,type:"number",min:"0",placeholder:"50",value:e.restock_threshold,onChange:o=>i("restock_threshold",parseInt(o.target.value||"0",10))})}),s.jsx("td",{className:"px-3 py-2.5",children:s.jsxs("div",{className:"flex items-center gap-1.5 justify-end",children:[s.jsxs("button",{onClick:t,disabled:n||!e.event_name||!e.category,className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg bg-primary text-primary-foreground text-xs font-bold hover:opacity-90 transition-opacity disabled:opacity-50","aria-label":"Speichern",children:[n?s.jsx(ar,{size:12,className:"animate-spin"}):s.jsx(p0,{size:12}),"Speichern"]}),s.jsx("button",{onClick:r,className:"p-1.5 rounded-lg border border-border text-muted-foreground hover:text-foreground hover:border-primary/40 transition-all","aria-label":"Abbrechen",children:s.jsx(_t,{size:14})})]})})]})}function wX({cat:e,onConfirm:t,onCancel:r,deleting:n}){return s.jsxs("div",{className:"fixed inset-0 z-[300] flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"delete-modal-title",children:[s.jsx("div",{className:"absolute inset-0 bg-background/80 backdrop-blur-sm",onClick:r,"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-sm bg-card border border-destructive/30 rounded-2xl shadow-2xl shadow-black/60 p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-destructive/10 flex items-center justify-center",children:s.jsx(Vt,{size:18,className:"text-destructive"})}),s.jsx("h2",{className:"font-display text-lg text-destructive",id:"delete-modal-title",children:"KATEGORIE LÃSCHEN"})]}),s.jsxs("p",{className:"text-sm text-muted-foreground mb-1",children:["Soll ",s.jsx("span",{className:"font-bold text-foreground",children:e.category})," (",e.event_name,") wirklich gelöscht werden?"]}
896),s.jsx("p",{className:"text-xs text-destructive/80 mb-5",children:"Diese Aktion kann nicht rückgängig gemacht werden."}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:r,className:"flex-1 py-2 rounded-xl border border-border text-sm hover:bg-muted transition-colors",children:"Abbrechen"}),s.jsxs("button",{onClick:t,disabled:n,className:"flex-1 flex items-center justify-center gap-2 py-2 rounded-xl bg-destructive text-destructive-foreground text-sm font-bold hover:opacity-90 transition-opacity disabled:opacity-50",children:[n?s.jsx(ar,{size:14,className:"animate-spin"}):s.jsx(Vt,{size:14}),"Löschen"]})]})]})]})}function CX(){const[e,t]=A.useState([]),[r,n]=A.useState(!0),[i,a]=A.useState(null),[o,l]=A.useState(null),[c,u]=A.useState(null),[d,x]=A.useState(Jc),[f,h]=A.useState(null),[m,p]=A.useState(!1),[v,y]=A.useState(Jc),[b,g]=A.useState(!1),[w,E]=A.useState(null),[C,j]=A.useState(!1),[S,_]=A.useState(null),O=(H,X="ok")=>{_({msg:H,type:X}),setTimeout(()=>_(null),3500)},I=A.useCallback(async()=>{n(!0),a(null);const{data:H,error:X}=await re.from("ticket_categories").select("*").order("event_name").order("category");X?a(X.message):(t(H??[]),l(new Date)),n(!1)},[]);A.useEffect(()=>{I()},[I]);const B=H=>{u(H.id),x({event_name:H.event_name,category:H.category,price_cents:H.price_cents,total_stock:H.total_stock,sold_count:H.sold_count,restock_threshold:H.restock_threshold}),p(!1)},T=()=>{u(null)},k=async()=>{if(!c)return;h(c);const{error:H}=await re.from("ticket_categories").update({event_name:d.event_name,category:d.category,price_cents:d.price_cents,total_stock:d.total_stock,sold_count:d.sold_count,restock_threshold:d.restock_threshold}).eq("id",c);h(null),H?O(H.message,"err"):(O("Kategorie aktualisiert."),u(null),I())},$=async()=>{g(!0);const{error:H}=await re.from("ticket_categories").insert({...v});g(!1),H?O(H.message,"err"):(O("Kategorie hinzugefügt."),p(!1),y(Jc),I())},W=async()=>{if(!w)return;j(!0);const{error:H}=await re.from("ticket_categories").delete().eq("id",w.id);j(!1),H?O(H.message,"err"):(O("Kategorie gelöscht."),E(null),I())},z=e.reduce((H,X)=>H+X.sold_count*X.price_cents,0),L=e.reduce((H,X)=>H+X.sold_count,0),F=e.reduce((H,X)=>H+X.total_stock,0),U=e.filter(H=>H.total_stock-H.sold_count<=H.restock_threshold&&H.sold_count<H.total_stock).length,D=e.filter(H=>H.sold_count>=H.total_stock).length,N=Qx(L,F),K=e.reduce((H,X)=>{var ie;return(H[ie=X.event_name]??(H[ie]=[])).push(X),H},{}),R="text-left px-3 py-2.5 font-medium first:px-5";return s.jsx("section",{"aria-labelledby":"inventory-heading",className:"py-14 border-t border-border",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-6xl",children:[S&&s.jsxs("div",{role:"status",className:`fixed bottom-6 right-6 z-[400] flex items-center gap-2 px-5 py-3 rounded-xl shadow-xl text-sm font-semibold ${S.type==="ok"?"bg-primary/20 border border-primary/40 text-primary":"bg-destructive/20 border border-destructive/40 text-destructive"}`,children:[S.type==="ok"?s.jsx(ut,{size:16}):s.jsx(bn,{size:16}),S.msg]}),w&&s.jsx(wX,{cat:w,onConfirm:W,onCancel:()=>E(null),deleting:C}),s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-8",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-1",children:"Admin · Bestandsverwaltung"}),s.jsx("h2",{className:"font-display text-4xl md:text-5xl",id:"inventory-heading",children:"TICKET-INVENTAR"})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsxs("button",{onClick:I,disabled:r,className:"flex items-center gap-1.5 px-3 py-2 rounded-xl border border-border text-xs text-muted-foreground hover:text-foreground hover:border-primary/40 transition-all disabled:opacity-50","aria-label":"Daten neu laden",children:[s.jsx(Be,{size:13,className:r?"animate-spin":"","aria-hidden":"true"}),"Aktualisieren"]}),s.jsxs("button",{onClick:()=>{p(!0),u(null),y(Jc)},className:"flex items-center gap-1.5 px-3 py-2 rounded-xl border border-primary/40 text-primary text-xs font-bold hover:bg-primary/10 transition-colors","aria-label":"Neue Kategorie hinzufügen",children:[s.jsx(Ht,{size:13,"aria-hidden":"true"}),"Neue Kategorie"]}),s.jsxs("button",{onClick:()=>EX(e),disabled:e.length===0,className:"flex items-center gap-1.5 px-4 py-2 rounded-xl bg-primary text-primary-foreground text-xs font-bold hover:opacity-90 transition-opacity glow-primary disabled:opacity-50","aria-label":"Inventar als CSV exportieren",children:[s.jsx(zr,{size:13,"aria-hidden":"true"}),"CSV Export"]})]})]}),U>0&&s.jsxs("div",{role:"alert",className:"mb-4 flex items-start gap-3 px-5 py-4 rounded-2xl bg-orange-500/10 border border-orange-500/30",children:[s.jsx(bn,{size:18,className:"text-orange-400 shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsxs("p",{className:"font-bold text-sm text-orange-300",children:[U," ",U===1?"Kategorie benötigt":"Kategorien benötigen"," Nachfüllung"]}),s.jsx("p",{className:"text-xs text-orange-400/80 mt-0.5",children:"Bestand liegt unter dem definierten Schwellenwert."})]})]}),D>0&&s.jsxs("div",{role:"alert",className:"mb-6 flex items-start gap-3 px-5 py-4 rounded-2xl bg-destructive/10 border border-destructive/30",children:[s.jsx(bn,{size:18,className:"text-destructive shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsxs("p",{className:"font-bold text-sm text-destructive",children:[D," ",D===1?"Kategorie ist":"Kategorien sind"," ausverkauft"]}),s.jsx("p",{className:"text-xs text-destructive/70 mt-0.5",children:"Diese Tickets können nicht mehr verkauft werden."})]})]}),s.jsx("dl",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[{label:"Gesamt-Umsatz",value:`⬠${(z/100).toLocaleStr
896ing("de-DE")}`,icon:ji,sub:"aus Ticketverkäufen"},{label:"Tickets verkauft",value:L.toLocaleString("de-DE"),icon:xE,sub:`von ${F.toLocaleString("de-DE")} gesamt`},{label:"Auslastung",value:`${N} %`,icon:cE,sub:"alle Kategorien"},{label:"Kategorien",value:e.length,icon:p9,sub:`${D} ausverkauft`}].map(({label:H,value:X,icon:ie,sub:se})=>s.jsxs("div",{className:"p-5 rounded-2xl border border-border gradient-card flex flex-col gap-2",children:[s.jsx(ie,{size:18,className:"text-primary","aria-hidden":"true"}),s.jsx("dd",{className:"font-display text-3xl text-foreground leading-none",children:X}),s.jsx("dt",{className:"text-xs text-muted-foreground",children:H}),s.jsx("p",{className:"text-[10px] text-primary/70",children:se})]},H))}),i&&s.jsxs("div",{role:"alert",className:"text-center py-10 text-destructive text-sm",children:["Fehler beim Laden: ",i]}),r&&!i&&s.jsx("div",{className:"text-center py-10 text-muted-foreground text-sm animate-pulse",children:"Inventar wird geladen â¦"}),m&&s.jsxs("div",{className:"mb-6 rounded-2xl border border-primary/40 bg-card overflow-hidden",children:[s.jsxs("div",{className:"px-5 py-3 border-b border-border bg-primary/5 flex items-center gap-2",children:[s.jsx(Ht,{size:14,className:"text-primary"}),s.jsx("span",{className:"font-bold text-sm text-primary",children:"Neue Ticketkategorie"})]}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border text-xs text-muted-foreground",children:[s.jsx("th",{className:R,children:"Event"}),s.jsx("th",{className:R,children:"Kategorie"}),s.jsx("th",{className:R,children:"Preis (â¬)"}),s.jsx("th",{className:R,children:"Gesamt"}),s.jsx("th",{className:R,children:"Verkauft"}),s.jsx("th",{className:R,children:"Schwellenwert"}),s.jsx("th",{className:R+" text-right",children:"Aktionen"})]})}),s.jsx("tbody",{children:s.jsx(p5,{draft:v,onSave:$,onCancel:()=>{p(!1),y(Jc)},saving:b,onChange:(H,X)=>y(ie=>({...ie,[H]:X}))})})]})})]}),!r&&!i&&Object.entries(K).map(([H,X])=>{const ie=X.reduce((ce,ae)=>ce+ae.sold_count,0),se=X.reduce((ce,ae)=>ce+ae.total_stock,0),ne=X.reduce((ce,ae)=>ce+ae.sold_count*ae.price_cents,0);return s.jsxs("div",{className:"mb-8 rounded-2xl border border-border bg-card overflow-hidden",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2 px-5 py-4 border-b border-border bg-card/80",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-2 h-8 rounded-full bg-primary glow-primary","aria-hidden":"true"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-sm text-foreground",children:H}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[ie.toLocaleString("de-DE")," / ",se.toLocaleString("de-DE")," Tickets · ",Qx(ie,se)," % Auslastung"]})]})]}),s.jsxs("p",{className:"text-sm font-bold text-primary",children:["⬠",(ne/100).toLocaleString("de-DE")," Umsatz"]})]}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm","aria-label":`Inventar: ${H}`,children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border text-xs text-muted-foreground",children:[s.jsx("th",{className:"text-left px-5 py-2.5 font-medium",children:"Kategorie"}),s.jsx("th",{className:"text-right px-4 py-2.5 font-medium",children:"Preis"}),s.jsx("th",{className:"text-right px-4 py-2.5 font-medium",children:"Gesamt"}),s.jsx("th",{className:"text-right px-4 py-2.5 font-medium",children:"Verkauft"}),s.jsx("th",{className:"text-right px-4 py-2.5 font-medium",children:"Verfügbar"}),s.jsx("th",{className:"px-4 py-2.5 font-medium w-36",children:"Auslastung"}),s.jsx("th",{className:"text-center px-4 py-2.5 font-medium",children:"Status"}),s.jsx("th",{className:"text-right px-4 py-2.5 font-medium",children:"Aktionen"})]})}),s.jsx("tbody",{children:X.map(ce=>{const ae=ce.total_stock-ce.sold_count,Q=Qx(ce.sold_count,ce.total_stock),he=rB(ce.sold_count,ce.total_stock,ce.restock_threshold);return c===ce.id?s.jsx(p5,{draft:{id:ce.id,...d},onSave:k,onCancel:T,saving:f===ce.id,onChange:(G,Z)=>x(V=>({...V,[G]:Z}
896))},ce.id):s.jsxs("tr",{className:"border-b border-border/50 last:border-0 hover:bg-muted/30 transition-colors group",children:[s.jsx("td",{className:"px-5 py-3 font-medium text-foreground",children:ce.category}),s.jsxs("td",{className:"px-4 py-3 text-right text-muted-foreground",children:["⬠",(ce.price_cents/100).toFixed(2)]}),s.jsx("td",{className:"px-4 py-3 text-right text-muted-foreground",children:ce.total_stock}),s.jsx("td",{className:"px-4 py-3 text-right font-semibold text-foreground",children:ce.sold_count}),s.jsx("td",{className:"px-4 py-3 text-right font-semibold text-foreground",children:ae}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-1 h-1.5 rounded-full bg-muted overflow-hidden",role:"progressbar","aria-valuenow":Q,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`${Q}% verkauft`,children:s.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${bX(Q)}`,style:{width:`${Q}%`}})}),s.jsxs("span",{className:"text-xs text-muted-foreground w-8 text-right shrink-0",children:[Q,"%"]})]})}),s.jsx("td",{className:"px-4 py-3 text-center",children:s.jsxs("span",{className:`inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full font-bold ${he.cls}`,children:[he.label==="OK"?s.jsx(ut,{size:10,"aria-hidden":"true"}):s.jsx(bn,{size:10,"aria-hidden":"true"}),he.label]})}),s.jsx("td",{className:"px-4 py-3 text-right",children:s.jsxs("div",{className:"flex items-center gap-1.5 justify-end opacity-0 group-hover:opacity-100 transition-opacity",children:[s.jsx("button",{onClick:()=>B(ce),className:"p-1.5 rounded-lg border border-border text-muted-foreground hover:text-primary hover:border-primary/40 transition-all","aria-label":`Kategorie ${ce.category} bearbeiten`,children:s.jsx(ss,{size:13})}),s.jsx("button",{onClick:()=>E(ce),className:"p-1.5 rounded-lg border border-border text-muted-foreground hover:text-destructive hover:border-destructive/40 transition-all","aria-label":`Kategorie ${ce.category} löschen`,children:s.jsx(Vt,{size:13})})]})})]},ce.id)})})]})})]},H)}),!r&&!i&&e.length===0&&!m&&s.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[s.jsx(p9,{size:40,className:"mx-auto mb-3 opacity-30"}),s.jsx("p",{className:"text-sm",children:"Noch keine Ticketkategorien vorhanden."}),s.jsxs("button",{onClick:()=>p(!0),className:"mt-4 inline-flex items-center gap-1.5 px-4 py-2 rounded-xl bg-primary text-primary-foreground text-sm font-bold hover:opacity-90 transition-opacity",children:[s.jsx(Ht,{size:14})," Erste Kategorie anlegen"]})]}),o&&s.jsxs("p",{className:"text-xs text-muted-foreground text-right mt-2",children:["Zuletzt aktualisiert: ",o.toLocaleTimeString("de-DE")]})]})})}const $y=[{label:"Ãbersicht",icon:f9,items:[{to:"/dashboard",label:"Dashboard",icon:f9},{to:"/admin/analytics",label:"Analytics",icon:cE}]},{label:"Festival",icon:Jv,items:[{to:"/admin/event-manager",label:"Festival & Tickets",icon:Jv},{to:"/admin/event-overview",label:"Ticketverkäufe",icon:hu}]},{label:"Kunden & Marketing",icon:iy,items:[{to:"/admin/customers",label:"Kunden",icon:iy},{to:"/admin/newsletter",label:"Newsletter",icon:$t},{to:"/admin/coupons",label:"Gutscheine",icon:ay},{to:"/admin/refunds",label:"Erstattungen",icon:aa}]},{label:"System",icon:ty,items:[{to:"/admin/roles",label:"Rollen",icon:Je},{to:"/admin/audit",label:"Audit Log",icon:bT},{to:"/admin/secrets",label:"Vault",icon:ty},{to:"/admin/tracking",label:"Tracking",icon:y4}]}];$y.flatMap(e=>e.items);function AX({group:e,currentPath:t}){const[r,n]=A.useState(!1),i=A.useRef(),a=e.items.some(c=>t===c.to||t.startsWith(c.to+"/"));function o(){clearTimeout(i.current),n(!0)}function l(){i.current=setTimeout(()=>n(!1),150)}return s.jsxs("div",{className:"relative",onMouseEnter:o,onMouseLeave:l,children:[s.jsxs("button",{className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-semibold transition-all ${a?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground hover:bg-muted"}`,children:[s.jsx(e.icon,{size:13,"aria-hidden":"true"}
896),e.label,s.jsx(mr,{size:10,className:`transition-transform ${r?"rotate-180":""}`})]}),r&&s.jsx("div",{className:"absolute left-0 top-full pt-1 z-[60]",children:s.jsx("div",{className:"min-w-[180px] rounded-xl border border-border bg-card shadow-lg py-1",children:e.items.map(c=>{const u=t===c.to||t.startsWith(c.to+"/");return s.jsxs(we,{to:c.to,onClick:()=>n(!1),className:`flex items-center gap-2 px-4 py-2 text-xs font-medium transition-colors ${u?"bg-primary/10 text-primary":"text-muted-foreground hover:text-foreground hover:bg-muted"}`,children:[s.jsx(c.icon,{size:13,"aria-hidden":"true"}),c.label]},c.to)})})})]})}function Hr(){const e=ms(),t=ps(),[r,n]=A.useState(null),[i,a]=A.useState(!1);A.useEffect(()=>{re.auth.getUser().then(({data:c})=>{var u,d;c.user&&n({email:c.user.email??"",display_name:((u=c.user.user_metadata)==null?void 0:u.full_name)??((d=c.user.user_metadata)==null?void 0:d.name)??null})})},[]);async function o(){await re.auth.signOut(),e("/admin/login")}const l=t.pathname;return s.jsxs("div",{className:"fixed top-0 inset-x-0 z-50 h-14 border-b border-border bg-card/95 backdrop-blur-md flex items-center px-4 gap-3",children:[s.jsxs(we,{to:"/dashboard",className:"flex items-center gap-1.5 shrink-0 mr-2","aria-label":"Admin Dashboard",children:[s.jsx(uE,{size:16,className:"text-primary","aria-hidden":"true"}),s.jsx("span",{className:"font-display text-sm tracking-wider text-foreground hidden sm:block",children:"ADMIN"})]}),s.jsx("nav",{className:"hidden md:flex items-center gap-0.5 flex-1","aria-label":"Admin-Navigation",children:$y.map(c=>s.jsx(AX,{group:c,currentPath:l},c.label))}),s.jsxs("button",{onClick:()=>a(c=>!c),className:"md:hidden flex items-center gap-1 px-2 py-1.5 rounded-lg border border-border text-xs text-muted-foreground hover:text-foreground transition-colors","aria-expanded":i,"aria-label":"Navigation öffnen",children:["Menü ",s.jsx(mr,{size:12,className:`transition-transform ${i?"rotate-180":""}`,"aria-hidden":"true"})]}),s.jsx("div",{className:"flex-1 md:flex-none"}),r&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"hidden sm:flex flex-col items-end leading-none",children:[s.jsx("span",{className:"text-[10px] font-bold text-primary",children:r.display_name??r.email.split("@")[0]}),s.jsx("span",{className:"text-[9px] text-muted-foreground",children:r.email})]}),s.jsxs("button",{onClick:o,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border text-xs text-muted-foreground hover:text-destructive hover:border-destructive/40 transition-all","aria-label":"Abmelden",children:[s.jsx(ry,{size:12,"aria-hidden":"true"}),s.jsx("span",{className:"hidden sm:inline",children:"Abmelden"})]})]}),i&&s.jsxs("div",{className:"absolute top-14 left-0 right-0 bg-card border-b border-border shadow-lg p-3 flex flex-col gap-1 md:hidden z-50",children:[s.jsx("button",{onClick:()=>a(!1),className:"self-end text-muted-foreground hover:text-foreground p-1","aria-label":"Menü schlieÃen",children:s.jsx(_t,{size:14,"aria-hidden":"true"})}),$y.map(c=>s.jsxs("div",{children:[s.jsx("span",{className:"px-3 py-1 text-[10px] uppercase tracking-wider text-muted-foreground/60 font-bold",children:c.label}),c.items.map(({to:u,label:d,icon:x})=>{const f=l===u;return s.jsxs(we,{to:u,onClick:()=>a(!1),"aria-current":f?"page":void 0,className:`flex items-center gap-2 px-3 py-2.5 rounded-xl text-sm font-semibold transition-all ${f?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground hover:bg-muted"}`,children:[s.jsx(x,{size:15,"aria-hidden":"true"}),d]},u)})]},c.label)),r&&s.jsxs("button",{onClick:o,className:"flex items-center gap-2 px-3 py-2.5 rounded-xl text-sm font-semibold text-destructive hover:bg-destructive/10 transition-colors mt-1 border-t border-border pt-3",children:[s.jsx(ry,{size:15,"aria-hidden":"true"})," Abmelden"]})]})]})}function nB(){const[e,t]=A.useState([]),[r,n]=A.useState(!0);return A.useEffect(()=>{let i=!0;async function a(c){const u=["admin","moderator","user"],d=await Promise.all(u.map(async x=>{const{data:f,error:h}=await re.rpc("has_role",{_user_id:c,_role:x});return!h&&f===!0?x:null}));i&&t(d.filter(x=>x!==null))}const{data:{subscription:o}}=re.auth.onAuthStateChange((c,u)=>{i&&(u!=null&&u.user?setTimeout(()=>{i&&a(u.user.id)},0):(t([]),n(!1)))});return(async()=>{try{const{data:{session:c}}=await re.auth.getSession();if(!i)return;c!=null&&c.user?await a(c.user.id):t([])}finally{i&&n(!1)}})(),()=>{i=!1,o.unsubscribe()}},[]),{roles:e,loading:r,isAdmin:e.includes("admin"),isModerator:e.includes("moderator"),isUser:e.includes("user"),hasAnyRole:(...i)=>i.some(a=>e.includes(a))}}const jX=6e3,kX=25e6;
896function _X(e){return`⬠${(e/100).toLocaleString("de-DE",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function SX(e){return e.net_price_cents>0?Math.round(e.net_price_cents*(1+e.vat_rate/100))+e.fee_cents:e.price_cents}function BX(e){const t=e.capacity>0?e.sold/e.capacity*100:0;return[{label:"Besucher erwartet",value:jX.toLocaleString("de-DE"),sub:"Planwert",trend:"up",icon:Je,highlight:!0},{label:"Tickets verkauft",value:e.sold.toLocaleString("de-DE"),sub:e.capacity>0?`${t.toLocaleString("de-DE",{maximumFractionDigits:1})} % Auslastung`:"Keine Kapazität hinterlegt",trend:"up",icon:Wl,highlight:!0},{label:"Umsatz (Tickets)",value:`⬠${(e.revenueCents/100).toLocaleString("de-DE",{maximumFractionDigits:0})}`,sub:`Ziel: ⬠${(kX/100).toLocaleString("de-DE")}`,trend:"up",icon:ji,highlight:!0},{label:"Check-ins gesamt",value:e.checkins.toLocaleString("de-DE"),sub:e.sold>0?`${Math.round(e.checkins/e.sold*100)} % eingelöst`:"Ãffnung: 19. Aug 2027",trend:"neutral",icon:WT,highlight:!1}]}const NX=[{label:"Festival-Tage",value:"3",icon:Lr},{label:"Bands",value:`${Gi.length}`,icon:j4},{label:"Bühnen",value:"2",icon:ia},{label:"Camping-Areas",value:"3",icon:Gx}],DX=Gi.filter(e=>e.tier==="headliner"),FX=Gi.filter(e=>e.tier==="main").slice(0,5);function PX(){const{isAdmin:e,isModerator:t,roles:r}=nB(),[n,i]=A.useState({sold:0,capacity:0,revenueCents:0,checkins:0}),[a,o]=A.useState([]);A.useEffect(()=>{let f=!0;return(async()=>{const[h,m,p]=await Promise.all([re.from("orders").select("quantity,total_amount_cents").eq("status","paid"),re.from("ticket_categories").select("*").order("price_cents",{ascending:!1}),re.from("tickets").select("id",{count:"exact",head:!0}).eq("is_checked_in",!0)]);if(!f)return;const v=m.data??[];o(v),i({sold:(h.data??[]).reduce((y,b)=>y+(b.quantity??0),0),revenueCents:(h.data??[]).reduce((y,b)=>y+(b.total_amount_cents??0),0),capacity:v.reduce((y,b)=>y+(b.total_stock??0),0),checkins:p.count??0})})(),()=>{f=!1}},[]);const l=BX(n),c=a.reduce((f,h)=>f+h.sold_count,0),u=a.reduce((f,h)=>f+h.total_stock,0),d=u>0?Math.round(c/u*100):0,x=e?"Admin":t?"Moderator":r[0]??"User";return s.jsxs(s.Fragment,{children:[s.jsx(Hr,{}),s.jsxs("main",{id:"main-content",className:"pt-14 min-h-screen",children:[s.jsx("section",{className:"py-16 bg-card/50 border-b border-border text-center","aria-label":"Dashboard Ãberschrift",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-2",children:"Projektübersicht"}),s.jsxs("div",{className:"flex items-center justify-center gap-2 mb-3",children:[s.jsx("h1",{className:"font-display text-5xl md:text-8xl",children:"DASHBOARD"}),s.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-bold px-2 py-0.5 rounded-full border border-primary/30 bg-primary/10 text-primary self-start mt-3",children:[s.jsx(ha,{size:10,"aria-hidden":"true"}),x]})]}),s.jsx("div",{className:"w-24 h-0.5 bg-primary mx-auto mt-4 glow-primary"}),s.jsx("p",{className:"text-muted-foreground mt-4 max-w-lg mx-auto",children:"Deine zentrale Anlaufstelle für das Spirit Festival 2027"}),s.jsxs("div",{className:"flex items-center justify-center gap-2 mt-3 text-sm text-muted-foreground",children:[s.jsx(_r,{size:14,className:"text-primary","aria-hidden":"true"}),s.jsx("span",{children:"19. â 21. August 2027 · Festwiesen, 39279 Loburg bei Magdeburg"})]}),s.jsxs("div",{className:"mt-5 flex items-center justify-center gap-3 flex-wrap",children:[s.jsxs(we,{to:"/admin/analytics",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-xl border border-primary/40 text-primary text-sm font-bold hover:bg-primary/10 transition-colors",children:[s.jsx(cE,{size:15,"aria-hidden":"true"}),"Analytics & Berichte"]}),e&&s.jsxs(we,{to:"/admin/refunds",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-xl border border-destructive/40 text-destructive text-sm font-bold hover:bg-destructive/10 transition-colors",children:[s.jsx(aa,{size:15,"aria-hidden":"true"}),"Erstattungen"]}),s.jsxs(we,{to:"/admin/event-manager",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-xl border border-border text-foreground text-sm font-bold hover:bg-muted transition-colors",children:[s.jsx(Jv,{size:15,"aria-hidden":"true"}),"Festival & Tickets"]}),e&&s.jsxs(we,{to:"/admin/roles",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-xl border border-border text-foreground text-sm font-bold hover:bg-muted transition-colors",children:[s.jsx(Je,{size:15,"aria-hidden":"true"}),"Rollen & Rechte"]}),s.jsxs(we,{to:"/admin/scanner",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-xl border border-green-500/40 text-green-400 text-sm font-bold hover:bg-green-500/10 transition-colors",children:[s.jsx(_f,{size:15,"aria-hidden":"true"}),"Ticket Scanner"]}),e&&s.jsxs(s.Fragment,{children:[s.jsxs(we,{to:"/admin/event-overview",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-xl border border-border text-foreground text-sm font-bold hover:bg-muted transition-colors",children:[s.jsx(kT,{size:15,"aria-hidden":"true"}),"Ticketverkäufe"]}),s.jsxs(we,{to:"/admin/customers",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-xl border border-border text-foreground text-sm font-bold hover:bg-muted transition-colors",children:[s.jsx(iy,{size:15,"aria-hidden":"true"}),"Kundendatenbank"]}),s.jsxs(we,{to:"/admin/newsletter",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-xl border border-primary/40 text-primary text-sm font-bold hover:bg-primary/10 transition-colors",children:[s.jsx($t,{size:15,"aria-hidden":"true"}),"Newsletter"]})]})]})]})}),s.jsx("section",{className:"py-10 border-b border-border","aria-label":"Festival-Kennzahlen",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsx("dl",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 max-w-3xl mx-auto",children:NX.map(({label:f,value:h,icon:m})=>s.jsx(Ce,{children:s.jsxs("div",{className:"flex flex-col items-center gap-2 p-5 rounded-2xl border border-border gradient-card text-center",children:[s.jsx(m,{size:22,className:"text-primary","aria-hidden":"true"}),s.jsx("dd",{className:"font-display text-4xl text-primary",children:h}),s.jsx("dt",{className:"text-xs text-muted-foreground uppercase tracking-widest",children:f})]})},f))})})}),e&&s.jsx("section",{className:"py-10 border-b border-border","aria-labelledby":"kpi-heading",children:s.jsx("div",{className:"container mx-auto px-4 max-w-5xl",children:s.jsxs(Ce,{children:[s.jsx("h2",{className:"font-display text-2xl text-center mb-1",id:"kpi-heading",children:"LIVE KPIs"}),s.jsxs("p",{className:"text-xs text-muted-foreground text-center mb-6 flex items-center justify-center gap-1",children:[s.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-primary animate-pulse","aria-hidden":"true"}),"Echtzeitdaten aus bezahlten Bestellungen"]}),s.jsx("dl",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:l.map(({label:f,value:h,sub:m,trend:p,icon:v,highlight:y})=>s.jsxs("div",{className:`relative flex flex-col gap-3 p-5 rounded-2xl border gradient-card overflow-hidden ${y?"border-primary/30":"border-border"}`,children:[y&&s.jsx("div",{className:"absolute inset-0 bg-primary/5 pointer-events-none rounded-2xl","aria-hidden":"true"}),s.jsxs("div",{className:"flex items-center justify-between relative z-10",children:[s.jsx("div",{className:`w-9 h-9 rounded-xl flex items-center justify-center ${y?"bg-primary/15":"bg-muted"}`,children:s.jsx(v,{size:18,className:y?"text-primary":"text-muted-foreground","aria-hidden":"true"})}),p==="up"&&s.jsx(xE,{size:14,className:"text-primary","aria-hidden":"true"})]}),s.jsxs("div",{className:"relative z-10",children:[s.jsx("dd",{className:"font-display text-2xl md:text-3xl text-foreground leading-none",children:h}),s.jsx("dt",{className:"text-xs text-muted-foreground mt-1 leading-snug",children:f}),s.jsx("p",{className:"text-[10px] text-primary/80 mt-1.5 font-medium",children:m})]})]},f))})]})})}),s.jsx("section",{className:"py-14","aria-labelledby":"widgets-heading",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-5xl",children:[s.jsxs(Ce,{children:[s.jsx("h2",{className:"font-display text-3xl text-center mb-2",id:"widgets-heading",children:"SCHNELLZUGRIFF"}),s.jsx("p",{className:"text-sm text-muted-foreground text-center mb-8",children:"Direkt zu Line-Up, Tickets und Gelände"})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsx(Ce,{children:s.jsxs("div",{className:"flex flex-col h-full rounded-2xl border border-primary/30 bg-card overflow-hidden hover:border-primary/60 hover:shadow-lg hover:shadow-
896primary/10 transition-all duration-200","aria-labelledby":"lineup-widget-heading",children:[s.jsxs("div",{className:"flex items-center justify-between px-5 pt-5 pb-3 border-b border-border",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(j4,{size:16,className:"text-primary","aria-hidden":"true"})}),s.jsx("h3",{className:"font-bold text-sm text-foreground",id:"lineup-widget-heading",children:"Line-Up 2027"})]}),s.jsxs(we,{to:"/lineup",className:"text-xs text-primary hover:underline flex items-center gap-1",children:["Alle Bands ",s.jsx(Af,{size:11,"aria-hidden":"true"})]})]}),s.jsxs("div",{className:"px-5 pt-4 pb-3 border-b border-border/60",children:[s.jsx("p",{className:"text-[10px] font-tech text-primary tracking-widest uppercase mb-2",children:"Headliner"}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:DX.map(f=>s.jsx("span",{className:"text-[11px] font-bold px-2 py-1 rounded-lg bg-primary/10 border border-primary/20 text-primary",children:f.name},f.name))})]}),s.jsxs("div",{className:"px-5 pt-3 pb-3 flex-1",children:[s.jsx("p",{className:"text-[10px] font-tech text-muted-foreground tracking-widest uppercase mb-2",children:"Weitere Acts"}),s.jsx("ul",{className:"space-y-1.5",children:FX.map(f=>s.jsxs("li",{className:"flex items-center gap-2 text-xs py-1 border-b border-border/40 last:border-0",children:[s.jsx("span",{className:"font-medium text-foreground flex-1 truncate",children:f.name}),s.jsx("span",{className:"shrink-0 text-[9px] px-1.5 py-0.5 rounded font-bold bg-muted text-muted-foreground",children:f.genre})]},f.name))})]}),s.jsxs("div",{className:"px-5 pb-5 pt-2 border-t border-border flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(fE,{size:11,className:"text-primary","aria-hidden":"true"}),Gi.length," Bands"]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(ia,{size:11,className:"text-primary","aria-hidden":"true"}),"2 Bühnen"]})]}),s.jsxs(we,{to:"/lineup",className:"flex items-center gap-1.5 px-4 py-1.5 rounded-xl bg-primary/10 text-primary text-xs font-bold hover:bg-primary/20 transition-colors",children:["Vollständiges Line-Up ",s.jsx(Af,{size:12,"aria-hidden":"true"})]})]})]})}),s.jsx(Ce,{children:s.jsxs("div",{className:"flex flex-col h-full rounded-2xl border border-primary/30 bg-card overflow-hidden hover:border-primary/60 hover:shadow-lg hover:shadow-primary/10 transition-all duration-200","aria-labelledby":"tickets-widget-heading",children:[s.jsxs("div",{className:"flex items-center justify-between px-5 pt-5 pb-3 border-b border-border",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(Pt,{size:16,className:"text-primary","aria-hidden":"true"})}),s.jsx("h3",{className:"font-bold text-sm text-foreground",id:"tickets-widget-heading",children:"Tickets & Verfügbarkeit"})]}),s.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-green-400 font-bold border border-green-500/30 rounded px-1.5 py-0.5 bg-green-500/10",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-400 animate-pulse","aria-hidden":"true"}),"LIVE"]})]}),s.jsxs("div",{className:"px-5 pt-4 pb-3 border-b border-border/60",children:[s.jsxs("div",{className:"flex justify-between text-xs mb-1.5",children:[s.jsx("span",{className:"text-muted-foreground",children:"Gesamtauslastung"}),s.jsxs("span",{className:"font-bold text-primary",children:[d," %"]})]}),s.jsx("div",{className:"w-full h-2 rounded-full bg-muted overflow-hidden",role:"progressbar","aria-valuenow":d,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Auslastung ${d} Prozent`,children:s.jsx("div",{className:"h-full rounded-full bg-primary glow-primary transition-all duration-500",style:{width:`${d}%`}})}),s.jsxs("p",{className:"text-[10px] text-muted-foreground mt-1.5",children:[c.toLocaleStr
896ing("de-DE")," von ",u.toLocaleString("de-DE")," Tickets verkauft"]})]}),s.jsx("ul",{className:"flex-1 px-5 py-3 space-y-2",children:a.length===0?s.jsx("li",{className:"text-xs text-muted-foreground py-4 text-center",children:"Noch keine Ticketkategorien hinterlegt."}):a.map(f=>{const h=f.total_stock>0?Math.round(f.sold_count/f.total_stock*100):0,p=f.total_stock-f.sold_count<=0?{label:"ausverkauft",color:"bg-destructive/15 text-destructive"}:h>=85?{label:"nur noch wenige",color:"bg-destructive/15 text-destructive"}:h>=70?{label:"fast ausverkauft",color:"bg-orange-500/15 text-orange-400"}:{label:"verfügbar",color:"bg-green-500/15 text-green-400"};return s.jsxs("li",{children:[s.jsxs("div",{className:"flex items-center justify-between text-xs mb-1",children:[s.jsx("span",{className:"font-medium text-foreground truncate flex-1",children:f.category}),s.jsxs("div",{className:"shrink-0 ml-2 flex items-center gap-2",children:[s.jsx("span",{className:"font-bold text-primary",children:_X(SX(f))}),s.jsx("span",{className:`text-[9px] px-1.5 py-0.5 rounded font-bold ${p.color}`,children:p.label})]})]}),s.jsx("div",{className:"w-full h-1 rounded-full bg-muted overflow-hidden",role:"presentation",children:s.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${h>=85?"bg-destructive":h>=70?"bg-orange-500":"bg-primary"}`,style:{width:`${h}%`}})})]},f.id)})}),s.jsxs("div",{className:"px-5 pb-5 pt-3 border-t border-border space-y-2",children:[s.jsxs(we,{to:"/events",className:"flex items-center justify-center gap-2 w-full py-2.5 rounded-xl bg-primary text-primary-foreground text-xs font-bold hover:opacity-90 transition-opacity glow-primary",children:[s.jsx(Pt,{size:13,"aria-hidden":"true"})," Zum Ticketshop"]}),s.jsxs(we,{to:"/my-tickets",className:"flex items-center justify-center gap-2 w-full py-2 rounded-xl bg-muted text-muted-foreground text-xs font-semibold hover:text-foreground transition-colors",children:[s.jsx(Wl,{size:13,"aria-hidden":"true"})," Meine Tickets anzeigen"]})]})]})})]}),s.jsx("div",{className:"mt-4 grid grid-cols-3 gap-3",children:[{label:"Geländeplan",href:"/lageplan",icon:_r},{label:"FAQ",href:"/faq",icon:NT},{label:"Kontakt",href:"/kontakt",icon:Je}].map(({label:f,href:h,icon:m})=>s.jsxs(we,{to:h,className:"flex items-center justify-center gap-2 py-2.5 rounded-xl border border-border text-xs text-muted-foreground hover:text-primary hover:border-primary/40 transition-all",children:[s.jsx(m,{size:13,"aria-hidden":"true"}),f,s.jsx(zl,{size:11,"aria-hidden":"true"})]},h))})]})}),e&&s.jsx(CX,{})]})]})}function m5(){const e=ms(),[t,r]=A.useState(""),[n,i]=A.useState(""),[a,o]=A.useState(!1),[l,c]=A.useState(null),[u,d]=A.useState(!1),[x,f]=A.useState(!1);A.useEffect(()=>{const{data:{subscription:v}}=re.auth.onAuthStateChange(async(y,b)=>{var w;if(!(b!=null&&b.user))return;const{data:g}=await re.rpc("has_role",{_user_id:b.user.id,_role:"admin"});g?(y==="SIGNED_IN"&&(((w=b.user.app_metadata)==null?void 0:w.provider)==="google"?"google":"email")==="google"&&await re.from("admin_login_audit").insert({user_id:b.user.id,email:b.user.email??"",method:"google",success:!0,user_agent:navigator.userAgent}),e("/dashboard")):(await re.auth.signOut(),c("Kein Zugriff. Dein Account hat keine Admin-Berechtigung."),f(!1))});return()=>v.unsubscribe()},[e]);async function h(v,y,b,g){await re.from("admin_login_audit").insert({user_id:v,email:y,method:b,success:g,user_agent:navigator.userAgent})}async function m(v){v.preventDefault(),c(null),d(!0);const{data:y,error:b}=await re.auth.signInWithPassword({email:t,password:n});if(b||!y.user){c("Ungültige Anmeldedaten. Bitte erneut versuchen."),d(!1);return}const{data:g}=await re.rpc("has_role",{_user_id:y.user.id,_role:"admin"});if(!g){await re.auth.signOut(),c("Kein Zugriff. Dein Account hat keine Admin-Berechtigung."),d(!1);return}await h(y.user.id,y.user.email??t,"email",!0),e("/dashboard")}async function p(){c(null),f(!0);const v=await LE.auth.signInWithOAuth("google",{redirect_uri:`${window.location.origin}/admin/login`});v!=null&&v.error&&(c("Google-Login fehlgeschlagen. Bitte erneut versuchen."),f(!1))}return s.jsx("main",{className:"min-h-screen flex items-center justify-center bg-background px-4","aria-label":"Admin-Login",children:s.jsxs("div",{className:"w-full max-w-sm",children:[s.jsxs("div",{className:"flex flex-col items-center gap-3 mb-8",children:[s.jsx("img",{src:Gl,alt:"Spirit Festival Logo",className:"h-14 w-auto"}),s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground border border-border rounded-full px-3 py-1",children:[s.jsx(uE,{size:12,className:"text-primary","aria-hidden":"true"}),"Admin-Bereich"]})]}),s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-8 shadow-2xl shadow-black/40",children:[s.jsx("h1",{className:"font-display text-3xl mb-1 text-center",children:"ANMELDEN"}),s.jsx("p",{className:"text-xs text-muted-foreground text-center mb-6",children:"Nur für autorisierte Administratoren"}),l&&s.jsx("div",{role:"alert",className:"mb-4 px-4 py-3 rounded-xl bg-destructive/10 border border-destructive/30 text-destructive text-sm",children:l}),s.jsxs("button",{type:"button",onClick:p,disabled:x||u,className:"flex items-center justify-center gap-2.5 w-full py-2.5 rounded-xl border border-border bg-muted hover:bg-muted/80 text-sm font-semibold transition-colors disabled:opacity-50 mb-5",children:[x?s.jsx("span",{className:"w-4 h-4 border-2 border-foreground
896/30 border-t-foreground rounded-full animate-spin","aria-hidden":"true"}):s.jsx(cp,{size:16,"aria-hidden":"true"}),"Mit Google anmelden"]}),s.jsxs("div",{className:"relative mb-5","aria-hidden":"true",children:[s.jsx("div",{className:"absolute inset-0 flex items-center",children:s.jsx("div",{className:"w-full border-t border-border"})}),s.jsx("div",{className:"relative flex justify-center",children:s.jsx("span",{className:"px-3 bg-card text-xs text-muted-foreground",children:"oder per E-Mail"})})]}),s.jsxs("form",{onSubmit:m,className:"space-y-4","aria-label":"E-Mail Login-Formular",children:[s.jsxs("div",{children:[s.jsx("label",{htmlFor:"email",className:"block text-xs text-muted-foreground mb-1.5",children:"E-Mail"}),s.jsxs("div",{className:"relative",children:[s.jsx($t,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{id:"email",type:"email",required:!0,autoComplete:"email",value:t,onChange:v=>r(v.target.value),className:"w-full bg-background border border-border rounded-xl pl-9 pr-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50",placeholder:"[email protected]"})]})]}),s.jsxs("div",{children:[s.jsx("label",{htmlFor:"password",className:"block text-xs text-muted-foreground mb-1.5",children:"Passwort"}),s.jsxs("div",{className:"relative",children:[s.jsx(dp,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{id:"password",type:a?"text":"password",required:!0,autoComplete:"current-password",value:n,onChange:v=>i(v.target.value),className:"w-full bg-background border border-border rounded-xl pl-9 pr-10 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢"}),s.jsx("button",{type:"button",onClick:()=>o(v=>!v),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors","aria-label":a?"Passwort verbergen":"Passwort anzeigen",children:a?s.jsx(uo,{size:15}):s.jsx(ki,{size:15})})]})]}),s.jsx("button",{type:"submit",disabled:u||x,className:"w-full py-2.5 rounded-xl bg-primary text-primary-foreground font-bold text-sm hover:opacity-90 transition-opacity glow-primary disabled:opacity-50 disabled:cursor-not-allowed",children:u?"Wird geprüft â¦":"Anmelden"})]})]}),s.jsxs("p",{className:"text-center text-xs text-muted-foreground mt-6",children:["Kein Admin-Zugang?"," ",s.jsx("a",{href:"/",className:"text-primary hover:underline",children:"Zurück zur Website"})," · ",s.jsx("a",{href:"/register",className:"text-primary hover:underline",children:"Registrieren"})]})]})})}var OX=Array.isArray,Kr=OX,TX=typeof Li=="object"&&Li&&Li.Object===Object&&Li,iB=TX,$X=iB,IX=typeof self=="object"&&self&&self.Object===Object&&self,MX=$X||IX||Function("return this")(),Ni=MX,RX=Ni,LX=RX.Symbol,w0=LX,g5=w0,aB=Object.prototype,zX=aB.hasOwnProperty,UX=aB.toString,eu=g5?g5.toStringTag:void 0;function WX(e){var t=zX.call(e,eu),r=e[eu];try{e[eu]=void 0;var n=!0}catch{}var i=UX.call(e);return n&&(t?e[eu]=r:delete e[eu]),i}var HX=WX,KX=Object.prototype,VX=KX.toString;function GX(e){return VX.call(e)}var qX=GX,v5=w0,YX=HX,ZX=qX,XX="[object Null]",QX="[object Undefined]",y5=v5?v5.toStringTag:void 0;function JX(e){return e==null?e===void 0?QX:XX:y5&&y5 in Object(e)?YX(e):ZX(e)}var ma=JX;function eQ(e){return e!=null&&typeof e=="object"}var ga=eQ,tQ=ma,rQ=ga,nQ="[object Symbol]";function iQ(e){return typeof e=="symbol"||rQ(e)&&tQ(e)==nQ}var kc=iQ,aQ=Kr,sQ=kc,oQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lQ=/^\w*$/;function cQ(e,t){if(aQ(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||sQ(e)?!0:lQ.test(e)||!oQ.test(e)||t!=null&&e in Object(t)}var zE=cQ;function uQ(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var gs=uQ;const _c=qe(gs);var dQ=ma,xQ=gs,fQ="[object AsyncFunction]",hQ="[object Function]",pQ="[object GeneratorFunction]",mQ="[object Proxy]";function gQ(e){if(!xQ(e))return!1;var t=dQ(e);return t==hQ||t==pQ||t==fQ||t==mQ}var UE=gQ;const Pe=qe(UE);var vQ=Ni,yQ=vQ["__core-js_shared__"],bQ=yQ,wg=bQ,b5=function(){var e=/[^.]+$/.exec(wg&&wg.keys&&wg.keys.IE_PROTO||"");
vendor: 3,927 bytes, line 896
896return e?"Symbol(src)_1."+e:""}();function EQ(e){return!!b5&&b5 in e}var wQ=EQ,CQ=Function.prototype,AQ=CQ.toString;function jQ(e){if(e!=null){try{return AQ.call(e)}catch{}try{return e+""}catch{}}return""}var sB=jQ,kQ=UE,_Q=wQ,SQ=gs,BQ=sB,NQ=/[\\^$.*+?()[\]{}|]/g,DQ=/^\[object .+?Constructor\]$/,FQ=Function.prototype,PQ=Object.prototype,OQ=FQ.toString,TQ=PQ.hasOwnProperty,$Q=RegExp("^"+OQ.call(TQ).replace(NQ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function IQ(e){if(!SQ(e)||_Q(e))return!1;var t=kQ(e)?$Q:DQ;return t.test(BQ(e))}var MQ=IQ;function RQ(e,t){return e==null?void 0:e[t]}var LQ=RQ,zQ=MQ,UQ=LQ;function WQ(e,t){var r=UQ(e,t);return zQ(r)?r:void 0}var ko=WQ,HQ=ko,KQ=HQ(Object,"create"),_p=KQ,E5=_p;function VQ(){this.__data__=E5?E5(null):{},this.size=0}var GQ=VQ;function qQ(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var YQ=qQ,ZQ=_p,XQ="__lodash_hash_undefined__",QQ=Object.prototype,JQ=QQ.hasOwnProperty;function eJ(e){var t=this.__data__;if(ZQ){var r=t[e];return r===XQ?void 0:r}return JQ.call(t,e)?t[e]:void 0}var tJ=eJ,rJ=_p,nJ=Object.prototype,iJ=nJ.hasOwnProperty;function aJ(e){var t=this.__data__;return rJ?t[e]!==void 0:iJ.call(t,e)}var sJ=aJ,oJ=_p,lJ="__lodash_hash_undefined__";function cJ(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=oJ&&t===void 0?lJ:t,this}var uJ=cJ,dJ=GQ,xJ=YQ,fJ=tJ,hJ=sJ,pJ=uJ;function Sc(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Sc.prototype.clear=dJ;Sc.prototype.delete=xJ;Sc.prototype.get=fJ;Sc.prototype.has=hJ;Sc.prototype.set=pJ;var mJ=Sc;function gJ(){this.__data__=[],this.size=0}var vJ=gJ;function yJ(e,t){return e===t||e!==e&&t!==t}var WE=yJ,bJ=WE;function EJ(e,t){for(var r=e.length;r--;)if(bJ(e[r][0],t))return r;return-1}var Sp=EJ,wJ=Sp,CJ=Array.prototype,AJ=CJ.splice;function jJ(e){var t=this.__data__,r=wJ(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():AJ.call(t,r,1),--this.size,!0}var kJ=jJ,_J=Sp;function SJ(e){var t=this.__data__,r=_J(t,e);return r<0?void 0:t[r][1]}var BJ=SJ,NJ=Sp;function DJ(e){return NJ(this.__data__,e)>-1}var FJ=DJ,PJ=Sp;function OJ(e,t){var r=this.__data__,n=PJ(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var TJ=OJ,$J=vJ,IJ=kJ,MJ=BJ,RJ=FJ,LJ=TJ;function Bc(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Bc.prototype.clear=$J;Bc.prototype.delete=IJ;Bc.prototype.get=MJ;Bc.prototype.has=RJ;Bc.prototype.set=LJ;var Bp=Bc,zJ=ko,UJ=Ni,WJ=zJ(UJ,"Map"),HE=WJ,w5=mJ,HJ=Bp,KJ=HE;function VJ(){this.size=0,this.__data__={hash:new w5,map:new(KJ||HJ),string:new w5}}var GJ=VJ;function qJ(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var YJ=qJ,ZJ=YJ;function XJ(e,t){var r=e.__data__;return ZJ(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Np=XJ,QJ=Np;function JJ(e){var t=QJ(this,e).delete(e);return this.size-=t?1:0,t}var eee=JJ,tee=Np;function ree(e){return tee(this,e).get(e)}var nee=ree,iee=Np;function aee(e){return iee(this,e).has(e)}var see=aee,oee=Np;function lee(e,t){var r=oee(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var cee=lee,uee=GJ,dee=eee,xee=nee,fee=see,hee=cee;function Nc(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Nc.prototype.clear=uee;Nc.prototype.delete=dee;Nc.prototype.get=xee;Nc.prototype.has=fee;Nc.prototype.set=hee;var KE=Nc,oB=KE,pee="Expected a function";function VE(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(pee);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(VE.Cache||oB),r}VE.Cache=oB;var lB=VE;const mee=qe(lB);var gee=lB,vee=500;function yee(e){var t=gee(e,function(n){return r.size===vee&&r.clear(),n}
vendor: 6,750 bytes, lines 896-904
896),r=t.cache;return t}var bee=yee,Eee=bee,wee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Cee=/\\(\\)?/g,Aee=Eee(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(wee,function(r,n,i,a){t.push(i?a.replace(Cee,"$1"):n||r)}),t}),jee=Aee;function kee(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var GE=kee,C5=w0,_ee=GE,See=Kr,Bee=kc,Nee=1/0,A5=C5?C5.prototype:void 0,j5=A5?A5.toString:void 0;function cB(e){if(typeof e=="string")return e;if(See(e))return _ee(e,cB)+"";if(Bee(e))return j5?j5.call(e):"";var t=e+"";return t=="0"&&1/e==-Nee?"-0":t}var Dee=cB,Fee=Dee;function Pee(e){return e==null?"":Fee(e)}var uB=Pee,Oee=Kr,Tee=zE,$ee=jee,Iee=uB;function Mee(e,t){return Oee(e)?e:Tee(e,t)?[e]:$ee(Iee(e))}var dB=Mee,Ree=kc,Lee=1/0;function zee(e){if(typeof e=="string"||Ree(e))return e;var t=e+"";return t=="0"&&1/e==-Lee?"-0":t}var Dp=zee,Uee=dB,Wee=Dp;function Hee(e,t){t=Uee(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Wee(t[r++])];return r&&r==n?e:void 0}var qE=Hee,Kee=qE;function Vee(e,t,r){var n=e==null?void 0:Kee(e,t);return n===void 0?r:n}var xB=Vee;const Cn=qe(xB);function Gee(e){return e==null}var qee=Gee;const Ie=qe(qee);var Yee=ma,Zee=Kr,Xee=ga,Qee="[object String]";function Jee(e){return typeof e=="string"||!Zee(e)&&Xee(e)&&Yee(e)==Qee}var ete=Jee;const vo=qe(ete);var fB={exports:{}},Ze={};/** 897 * @license React 898 * react-is.production.min.js 899 * 900 * Copyright (c) Facebook, Inc. and its affiliates. 901 * 902 * This source code is licensed under the MIT license found in the 903 * LICENSE file in the root directory of this source tree. 904 */var YE=Symbol.for("react.element"),ZE=Symbol.for("react.portal"),Fp=Symbol.for("react.fragment"),Pp=Symbol.for("react.strict_mode"),Op=Symbol.for("react.profiler"),Tp=Symbol.for("react.provider"),$p=Symbol.for("react.context"),tte=Symbol.for("react.server_context"),Ip=Symbol.for("react.forward_ref"),Mp=Symbol.for("react.suspense"),Rp=Symbol.for("react.suspense_list"),Lp=Symbol.for("react.memo"),zp=Symbol.for("react.lazy"),rte=Symbol.for("react.offscreen"),hB;hB=Symbol.for("react.module.reference");function Bn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case YE:switch(e=e.type,e){case Fp:case Op:case Pp:case Mp:case Rp:return e;default:switch(e=e&&e.$$typeof,e){case tte:case $p:case Ip:case zp:case Lp:case Tp:return e;default:return t}}case ZE:return t}}}Ze.ContextConsumer=$p;Ze.ContextProvider=Tp;Ze.Element=YE;Ze.ForwardRef=Ip;Ze.Fragment=Fp;Ze.Lazy=zp;Ze.Memo=Lp;Ze.Portal=ZE;Ze.Profiler=Op;Ze.StrictMode=Pp;Ze.Suspense=Mp;Ze.SuspenseList=Rp;Ze.isAsyncMode=function(){return!1};Ze.isConcurrentMode=function(){return!1};Ze.isContextConsumer=function(e){return Bn(e)===$p};Ze.isContextProvider=function(e){return Bn(e)===Tp};Ze.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===YE};Ze.isForwardRef=function(e){return Bn(e)===Ip};Ze.isFragment=function(e){return Bn(e)===Fp};Ze.isLazy=function(e){return Bn(e)===zp};Ze.isMemo=function(e){return Bn(e)===Lp};Ze.isPortal=function(e){return Bn(e)===ZE};Ze.isProfiler=function(e){return Bn(e)===Op};Ze.isStrictMode=function(e){return Bn(e)===Pp};Ze.isSuspense=function(e){return Bn(e)===Mp};Ze.isSuspenseList=function(e){return Bn(e)===Rp};Ze.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Fp||e===Op||e===Pp||e===Mp||e===Rp||e===rte||typeof e=="object"&&e!==null&&(e.$$typeof===zp||e.$$typeof===Lp||e.$$typeof===Tp||e.$$typeof===$p||e.$$typeof===Ip||e.$$typeof===hB||e.getModuleId!==void 0)};Ze.typeOf=Bn;fB.exports=Ze;var nte=fB.exports,ite=ma,ate=ga,ste="[object Number]";function ote(e){return typeof e=="number"||ate(e)&&ite(e)==ste}var pB=ote;const lte=qe(pB);var cte=pB;function ute(e){return cte(e)&&e!=+e}var dte=ute;const Dc=qe(dte);var Yn=function(t){return t===0?0:t>0?1:-1},Ws=function(t){return vo(t)&&t.indexOf("%")===t.length-1},me=function(t){return lte(t)&&!Dc(t)},xte=function(t){return Ie(t)},Wt=function(t){return me(t)||vo(t)},fte=0,C0=function(t){var r=++fte;return"".concat(t||"").concat(r)},yo=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!me(t)&&!vo(t))return n;var a;if(Ws(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return Dc(a)&&(a=n),i&&a>r&&(a=r),a},Oa=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},hte=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i<r;i++)if(!n[t[i]])n[t[i]]=!0;else return!0;return!1},vn=function(t,r){return me(t)&&me(r)?function(n){return t+n*(r-t)}:function(){return r}};function Hf(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Cn(n,t))===r})}var pte=function(t,r){return me(t)&&me(r)?t-r:vo(t)&&vo(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function wl(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function Iy(e){"@babel/helpers - typeof";return Iy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Iy(e)}var mte=["viewBox","children"],gte=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRen
904dering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],k5=["points","pathLength"],Cg={svg:mte,polygon:k5,polyline:k5},XE=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDrag
904Capture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Kf=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(A.isValidElement(t)&&(n=t.props),!_c(n))return null;var i={};return Object.keys(n).forEach(function(a){XE.includes(a)&&(i[a]=r||function(o){return n[a](n,o)})}),i},vte=function(t,r,n){return function(i){return t(r,n,i),null}},Vf=function(t,r,n){if(!_c(t)||Iy(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];XE.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=vte(o,r,n))}),i},yte=["children"],bte=["children"];function _5(e,t){if(e==null)return{};var r=Ete(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ete(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function My(e){"@babel/helpers - typeof";return My=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},My(e)}var S5={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},qi=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},B5=null,Ag=null,QE=function e(t){if(t===B5&&Array.isArray(Ag))return Ag;var r=[];return A.Children.forEach(t,function(n){Ie(n)||(nte.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Ag=r,B5=t,r};function Jn(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return qi(i)}):n=[qi(t)],QE(e).forEach(function(i){var a=Cn(i,"type.displayName")||Cn(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function Yr(e,t){var r=Jn(e,t);return r&&r[0]}var N5=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!me(n)||n<=0||!me(i)||i<=0)},wte=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Cte=function(t){return t&&t.type&&vo(t.type)&&wte.indexOf(t.type)>=0},Ate=function(t){return t&&My(t)==="object"&&"clipDot"in t},jte=function(t,r,n,i){var a,o=(a=Cg==null?void 0:Cg[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!Pe(t)&&(i&&o.includes(r)||gte.includes(r))||n&&XE.includes(r)},Te=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(A.isValidElement(t)&&(i=t.props),!_c(i))return null;var a={};
904return Object.keys(i).forEach(function(o){var l;jte((l=i)===null||l===void 0?void 0:l[o],o,r,n)&&(a[o]=i[o])}),a},Ry=function e(t,r){if(t===r)return!0;var n=A.Children.count(t);if(n!==A.Children.count(r))return!1;if(n===0)return!0;if(n===1)return D5(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=t[i],o=r[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!D5(a,o))return!1}return!0},D5=function(t,r){if(Ie(t)&&Ie(r))return!0;if(!Ie(t)&&!Ie(r)){var n=t.props||{},i=n.children,a=_5(n,yte),o=r.props||{},l=o.children,c=_5(o,bte);return i&&l?wl(a,c)&&Ry(i,l):!i&&!l?wl(a,c):!1}return!1},F5=function(t,r){var n=[],i={};return QE(t).forEach(function(a,o){if(Cte(a))n.push(a);else if(a){var l=qi(a.type),c=r[l]||{},u=c.handler,d=c.once;if(u&&(!d||!i[l])){var x=u(a,l,o);n.push(x),i[l]=!0}}}),n},kte=function(t){var r=t&&t.type;return r&&S5[r]?S5[r]:null},_te=function(t,r){return QE(r).indexOf(t)},Ste=["children","width","height","viewBox","className","style","title","desc"];function Ly(){return Ly=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ly.apply(this,arguments)}function Bte(e,t){if(e==null)return{};var r=Nte(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Nte(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function zy(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,l=e.title,c=e.desc,u=Bte(e,Ste),d=i||{width:r,height:n,x:0,y:0},x=Me("recharts-surface",a);return q.createElement("svg",Ly({},Te(u,!0,"svg"),{className:x,width:r,height:n,style:o,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),q.createElement("title",null,l),q.createElement("desc",null,c),t)}var Dte=["children","className"];function Uy(){return Uy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Uy.apply(this,arguments)}function Fte(e,t){if(e==null)return{};var r=Pte(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Pte(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var vt=q.forwardRef(function(e,t){var r=e.children,n=e.className,i=Fte(e,Dte),a=Me("recharts-layer",n);return q.createElement("g",Uy({className:a},Te(i,!0),{ref:t}),r)}),Yi=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]};function Ote(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a}var Tte=Ote,$te=Tte;function Ite(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:$te(e,t,r)}var Mte=Ite,Rte="\\ud800-\\udfff",Lte="\\u0300-\\u036f",zte="\\ufe20-\\ufe2f",Ute="\\u20d0-\\u20ff",Wte=Lte+zte+Ute,Hte="\\ufe0e\\ufe0f",Kte="\\u200d",Vte=RegExp("["+Kte+Rte+Wte+Hte+"]");function Gte(e){return Vte.test(e)}var mB=Gte;function qte(e){return e.split("")}var Yte=qte,gB="\\ud800-\\udfff",Zte="\\u0300-\\u036f",Xte="\\ufe20-\\ufe2f",Qte="\\u20d0-\\u20ff",Jte=Zte+Xte+Qte,ere="\\ufe0e\\ufe0f",tre="["+gB+"]",Wy="["+Jte+"]",Hy="\\ud83c[\\udffb-\\udfff]",rre="(?:"+Wy+"|"+Hy+")",vB="[^"+gB+"]",yB="(?:\\ud83c[\\udde6-\\uddff]){2}",bB="[\\ud800-\\udbff][\\udc00-\\udfff]",nre="\\u200d",EB=rre+"?",wB="["+ere+"]?",ire="(?:"+nre+"(?:"+[vB,yB,bB].join("|")+")"+wB+EB+")*",are=wB+EB+ire,sre="(?:"+[vB+Wy+"?",Wy,yB,bB,tre].join("|")+")",ore=RegExp(Hy+"(?="+Hy+")|"+sre+are,"g");function lre(e){return e.match(ore)||[]}var cre=lre,ure=Yte,dre=mB,xre=cre;function fre(e){return dre(e)?xre(e):ure(e)}var hre=fre,pre=Mte,mre=mB,gre=hre,vre=uB;function yre(e){return function(t){t=vre(t);var r=mre(t)?gre(t):void 0,n=r?r[0]:t.charAt(0),i=r?pre(r,1).join(""):t.slice(1);return n[e]()+i}}var bre=yre,Ere=bre,wre=Ere("toUpperCase"),Cre=wre;const Up=qe(Cre);function nt(e){return function(){return e}}const CB=Math.cos,Gf=Math.sin,si=Math.sqrt,qf=Math.PI,Wp=2*qf,Ky=Math.PI,Vy=2*Ky,Os=1e-6,Are=Vy-Os;function AB(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function jre(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return AB;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class kre{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?AB:jre(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n}
904,${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,l=this._y1,c=n-t,u=i-r,d=o-t,x=l-r,f=d*d+x*x;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>Os)if(!(Math.abs(x*c-u*d)>Os)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,m=i-l,p=c*c+u*u,v=h*h+m*m,y=Math.sqrt(p),b=Math.sqrt(f),g=a*Math.tan((Ky-Math.acos((p+f-v)/(2*y*b)))/2),w=g/b,E=g/y;Math.abs(w-1)>Os&&this._append`L${t+w*d},${r+w*x}`,this._append`A${a},${a},0,0,${+(x*h>d*m)},${this._x1=t+E*c},${this._y1=r+E*u}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),c=n*Math.sin(i),u=t+l,d=r+c,x=1^o,f=o?i-a:a-i;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>Os||Math.abs(this._y1-d)>Os)&&this._append`L${u},${d}`,n&&(f<0&&(f=f%Vy+Vy),f>Are?this._append`A${n},${n},0,1,${x},${t-l},${r-c}A${n},${n},0,1,${x},${this._x1=u},${this._y1=d}`:f>Os&&this._append`A${n},${n},0,${+(f>=Ky)},${x},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function JE(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new kre(t)}function ew(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function jB(e){this._context=e}jB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Hp(e){return new jB(e)}function kB(e){return e[0]}function _B(e){return e[1]}function SB(e,t){var r=nt(!0),n=null,i=Hp,a=null,o=JE(l);e=typeof e=="function"?e:e===void 0?kB:nt(e),t=typeof t=="function"?t:t===void 0?_B:nt(t);function l(c){var u,d=(c=ew(c)).length,x,f=!1,h;for(n==null&&(a=i(h=o())),u=0;u<=d;++u)!(u<d&&r(x=c[u],u,c))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(x,u,c),+t(x,u,c));if(h)return a=null,h+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:nt(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:nt(+c),l):t},l.defined=function(c){return arguments.length?(r=typeof c=="function"?c:nt(!!c),l):r},l.curve=function(c){return arguments.length?(i=c,n!=null&&(a=i(n)),l):i},l.context=function(c){return arguments.length?(c==null?n=a=null:a=i(n=c),l):n},l}function fx(e,t,r){var n=null,i=nt(!0),a=null,o=Hp,l=null,c=JE(u);e=typeof e=="function"?e:e===void 0?kB:nt(+e),t=typeof t=="function"?t:nt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?_B:nt(+r);function u(x){var f,h,m,p=(x=ew(x)).length,v,y=!1,b,g=new Array(p),w=new Array(p);for(a==null&&(l=o(b=c())),f=0;f<=p;++f){if(!(f<p&&i(v=x[f],f,x))===y)if(y=!y)h=f,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),m=f-1;m>=h;--m)l.point(g[m],w[m]);l.lineEnd(),l.areaEnd()}y&&(g[f]=+e(v,f,x),w[f]=+t(v,f,x),l.point(n?+n(v,f,x):g[f],r?+r(v,f,x):w[f]))}if(b)return l=null,b+""||null}function d(){return SB().defined(i).curve(o).context(a)}return u.x=function(x){return arguments.length?(e=typeof x=="function"?x:nt(+x),n=null,u):e},u.x0=function(x){return arguments.length?(e=typeof x=="function"?x:nt(+x),u):e},u.x1=function(x){return arguments.length?(n=x==null?null:typeof x=="function"?x:nt(+x),u):n},u.y=function(x){return arguments.length?(t=typeof x=="function"?x:nt(+x),r=null,u):t},u.y0=function(x){return arguments.length?(t=typeof x=="function"?x:nt(+x),u):t},u.y1=function(x){return arguments.length?(r=x==null?null:typeof x=="function"?x:nt(+x),u):r},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(r)},u.lineX1=function(){return d().x(n).y(t)},u.defined=function(x){return arguments.length?(i=typeof x=="function"?x:nt(!!x),u):i},u.curve=function(x){return arguments.length?(o=x,a!=null&&(l=o(a)),u):o},u.context=function(x){return arguments.length?(x==null?a=l=null:l=o(a=x),u):a},u}class BB{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function _re(e){return new BB(e,!0)}function Sre(e){return new BB(e,!1)}const tw={draw(e,t){const r=si(t/qf);e.moveTo(r,0),e.arc(0,0,r,0,Wp)}},Bre={draw(e,t){const r=si(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},NB=si(1/3),Nre=NB*2,Dre={draw(e,t){const r=si(t/Nre),n=r*NB;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},Fre={draw(e,t){const r=si(t),n=-r/2;e.rect(n,n,r,r)}},Pre=.8908130915292852,DB=Gf(qf/10)/Gf(7*qf/10),Ore=Gf(Wp/10)*DB,Tre=-CB(Wp/10)*DB,$re={draw(e,t){const r=si(t*Pre),n=Ore*r,i=Tre*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=Wp*a/5,l=CB(o),c=Gf(o);e.lineTo(c*r,-l*r),e.lineTo(l*n-c*i,c*n+l*i)}e.closePath()}},jg=si(3),Ire={draw(e,t){const r=-si(t/(jg*3));e.moveTo(0,r*2),e.lineTo(-jg*r,-r),e.lineTo(jg*r,-r),e.closePath()}},cn=-.5,un=si(3)/2,Gy=1/si(12),Mre=(Gy/2+1)*3,Rre={draw(e,t){const r=si(t/Mre),n=r/2,i=r*Gy,a=n,o=r*Gy+r,l=-a,c=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(l,c),e.lineTo(cn*n-un*i,un*n+cn*i),e.lineTo(cn*a-un*o,un*a+cn*o),e.lineTo(cn*l-un*c,un*l+cn*c),e.lineTo(cn*n+u
vendor: 6,865 bytes, line 904
904n*i,cn*i-un*n),e.lineTo(cn*a+un*o,cn*o-un*a),e.lineTo(cn*l+un*c,cn*c-un*l),e.closePath()}};function Lre(e,t){let r=null,n=JE(i);e=typeof e=="function"?e:nt(e||tw),t=typeof t=="function"?t:nt(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:nt(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:nt(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Yf(){}function Zf(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function FB(e){this._context=e}FB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Zf(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Zf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zre(e){return new FB(e)}function PB(e){this._context=e}PB.prototype={areaStart:Yf,areaEnd:Yf,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Zf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ure(e){return new PB(e)}function OB(e){this._context=e}OB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Zf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Wre(e){return new OB(e)}function TB(e){this._context=e}TB.prototype={areaStart:Yf,areaEnd:Yf,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Hre(e){return new TB(e)}function P5(e){return e<0?-1:1}function O5(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),l=(a*i+o*n)/(n+i);return(P5(a)+P5(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function T5(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function kg(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-n)/3;e._context.bezierCurveTo(n+l,i+l*t,a-l,o-l*r,a,o)}function Xf(e){this._context=e}Xf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:kg(this,this._t0,T5(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,kg(this,T5(this,r=O5(this,e,t)),r);break;default:kg(this,this._t0,r=O5(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function $B(e){this._context=new IB(e)}($B.prototype=Object.create(Xf.prototype)).point=function(e,t){Xf.prototype.point.call(this,t,e)};function IB(e){this._context=e}IB.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function Kre(e){return new Xf(e)}function Vre(e){return new $B(e)}function MB(e){this._context=e}MB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=$5(e),i=$5(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function $5(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Gre(e){return new MB(e)}function Kp(e,t){this._context=e,this._t=t}Kp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;
vendor: 9,187 bytes, lines 904-907
904default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function qre(e){return new Kp(e,.5)}function Yre(e){return new Kp(e,0)}function Zre(e){return new Kp(e,1)}function ql(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,l=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<l;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function qy(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Xre(e,t){return e[t]}function Qre(e){const t=[];return t.key=e,t}function Jre(){var e=nt([]),t=qy,r=ql,n=Xre;function i(a){var o=Array.from(e.apply(this,arguments),Qre),l,c=o.length,u=-1,d;for(const x of a)for(l=0,++u;l<c;++l)(o[l][u]=[0,+n(x,o[l].key,u,a)]).data=x;for(l=0,d=ew(t(o));l<c;++l)o[d[l]].index=l;return r(o,d),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:nt(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:nt(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?qy:typeof a=="function"?a:nt(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??ql,i):r},i}function ene(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}ql(e,t)}}function tne(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,l=0;o<i;++o)l+=e[o][r][1]||0;n[r][1]+=n[r][0]=-l/2}ql(e,t)}}function rne(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var l=0,c=0,u=0;l<o;++l){for(var d=e[t[l]],x=d[n][1]||0,f=d[n-1][1]||0,h=(x-f)/2,m=0;m<l;++m){var p=e[t[m]],v=p[n][1]||0,y=p[n-1][1]||0;h+=v-y}c+=x,u+=h*x}i[n-1][1]+=i[n-1][0]=r,c&&(r-=u/c)}i[n-1][1]+=i[n-1][0]=r,ql(e,t)}}function wd(e){"@babel/helpers - typeof";return wd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wd(e)}var nne=["type","size","sizeType"];function Yy(){return Yy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yy.apply(this,arguments)}function I5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function M5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?I5(Object(r),!0).forEach(function(n){ine(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ine(e,t,r){return t=ane(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ane(e){var t=sne(e,"string");return wd(t)=="symbol"?t:t+""}function sne(e,t){if(wd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(wd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function one(e,t){if(e==null)return{};var r=lne(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function lne(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var RB={symbolCircle:tw,symbolCross:Bre,symbolDiamond:Dre,symbolSquare:Fre,symbolStar:$re,symbolTriangle:Ire,symbolWye:Rre},cne=Math.PI/180,une=function(t){var r="symbol".concat(Up(t));return RB[r]||tw},dne=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*cne;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},xne=function(t,r){RB["symbol".concat(Up(t))]=r},rw=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,l=o===void 0?"area":o,c=one(t,nne),u=M5(M5({},c),{},{type:n,size:a,sizeType:l}),d=function(){var v=une(n),y=Lre().type(v).size(dne(a,l,n));return y()},x=u.className,f=u.cx,h=u.cy,m=Te(u,!0);return f===+f&&h===+h&&a===+a?q.createElement("path",Yy({},m,{className:Me("recharts-symbols",x),transform:"translate(".concat(f,", ").concat(h,")"),d:d()})):null};rw.registerSymbol=xne;function Yl(e){"@babel/helpers - typeof";return Yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yl(e)}function Zy(){return Zy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zy.apply(this,arguments)}function R5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?R5(Object(r),!0).forEach(function(n){Cd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pne(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,zB(n.key),n)}}function mne(e,t,r){return t&&pne(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gne(e,t,r){return t=Qf(t),vne(e,LB()?Reflect.construct(t,r||[],Qf(e).constructor):t.apply(e,r))}function vne(e,t){if(t&&(Yl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yne(e)}function yne(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(LB=function(){return!!e})()}function Qf(e){return Qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qf(e)}function bne(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xy(e,t)}function Xy(e,t){return Xy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Xy(e,t)}function Cd(e,t,r){return t=zB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zB(e){var t=Ene(e,"string");return Yl(t)=="symbol"?t:t+""}function Ene(e,t){if(Yl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Yl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dn=32,nw=function(e){function t(){return hne(this,t),gne(this,t,arguments)}return bne(t,e),mne(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=dn/2,o=dn/6,l=dn/3,c=n.inactive?i:n.color;if(n.type==="plainline")return q.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:dn,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return q.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(a,"h").concat(l,` 905 A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(a,` 906 H`).concat(dn,"M").concat(2*l,",").concat(a,` 907 A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return q.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(dn/8,"h").concat(dn,"v").concat(dn*3/4,"h").concat(-dn,"z"),className:"recharts-legend-icon"});if(q.isValidElement(n.legendIcon)){var u=fne({},n);return delete u.legendIcon,q.cloneElement(n.legendIcon,u)}return q.createElement(rw,{fill:c,cx:a,cy:a,size:dn,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,o=i.iconSize,l=i.layout,c=i.formatter,u=i.inactiveColor,d={x:0,y:0,width:dn,height:dn}
907,x={display:l==="horizontal"?"inline-block":"block",marginRight:10},f={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(h,m){var p=h.formatter||c,v=Me(Cd(Cd({"recharts-legend-item":!0},"legend-item-".concat(m),!0),"inactive",h.inactive));if(h.type==="none")return null;var y=Pe(h.value)?null:h.value;Yi(!Pe(h.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var b=h.inactive?u:h.color;return q.createElement("li",Zy({className:v,style:x,key:"legend-item-".concat(m)},Vf(n.props,h,m)),q.createElement(zy,{width:o,height:o,viewBox:d,style:f},n.renderIcon(h)),q.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},p?p(y,h,m):y))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return q.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])}(A.PureComponent);Cd(nw,"displayName","Legend");Cd(nw,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var wne=Bp;function Cne(){this.__data__=new wne,this.size=0}var Ane=Cne;function jne(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var kne=jne;function _ne(e){return this.__data__.get(e)}var Sne=_ne;function Bne(e){return this.__data__.has(e)}var Nne=Bne,Dne=Bp,Fne=HE,Pne=KE,One=200;function Tne(e,t){var r=this.__data__;if(r instanceof Dne){var n=r.__data__;if(!Fne||n.length<One-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Pne(n)}return r.set(e,t),this.size=r.size,this}var $ne=Tne,Ine=Bp,Mne=Ane,Rne=kne,Lne=Sne,zne=Nne,Une=$ne;function Fc(e){var t=this.__data__=new Ine(e);this.size=t.size}Fc.prototype.clear=Mne;Fc.prototype.delete=Rne;Fc.prototype.get=Lne;Fc.prototype.has=zne;Fc.prototype.set=Une;var UB=Fc,Wne="__lodash_hash_undefined__";function Hne(e){return this.__data__.set(e,Wne),this}var Kne=Hne;function Vne(e){return this.__data__.has(e)}var Gne=Vne,qne=KE,Yne=Kne,Zne=Gne;function Jf(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new qne;++t<r;)this.add(e[t])}Jf.prototype.add=Jf.prototype.push=Yne;Jf.prototype.has=Zne;var WB=Jf;function Xne(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var HB=Xne;function Qne(e,t){return e.has(t)}var KB=Qne,Jne=WB,eie=HB,tie=KB,rie=1,nie=2;function iie(e,t,r,n,i,a){var o=r&rie,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var x=-1,f=!0,h=r&nie?new Jne:void 0;for(a.set(e,t),a.set(t,e);++x<l;){var m=e[x],p=t[x];if(n)var v=o?n(p,m,x,t,e,a):n(m,p,x,e,t,a);if(v!==void 0){if(v)continue;f=!1;break}if(h){if(!eie(t,function(y,b){if(!tie(h,b)&&(m===y||i(m,y,r,n,a)))return h.push(b)})){f=!1;break}}else if(!(m===p||i(m,p,r,n,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var VB=iie,aie=Ni,sie=aie.Uint8Array,oie=sie;function lie(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var cie=lie;function uie(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var iw=uie,L5=w0,z5=oie,die=WE,xie=VB,fie=cie,hie=iw,pie=1,mie=2,gie="[object Boolean]",vie="[object Date]",yie="[object Error]",bie="[object Map]",Eie="[object Number]",wie="[object RegExp]",Cie="[object Set]",Aie="[object String]",jie="[object Symbol]",kie="[object ArrayBuffer]",_ie="[object DataView]",U5=L5?L5.prototype:void 0,_g=U5?U5.valueOf
vendor: 4,152 bytes, line 907
907:void 0;function Sie(e,t,r,n,i,a,o){switch(r){case _ie:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case kie:return!(e.byteLength!=t.byteLength||!a(new z5(e),new z5(t)));case gie:case vie:case Eie:return die(+e,+t);case yie:return e.name==t.name&&e.message==t.message;case wie:case Aie:return e==t+"";case bie:var l=fie;case Cie:var c=n&pie;if(l||(l=hie),e.size!=t.size&&!c)return!1;var u=o.get(e);if(u)return u==t;n|=mie,o.set(e,t);var d=xie(l(e),l(t),n,i,a,o);return o.delete(e),d;case jie:if(_g)return _g.call(e)==_g.call(t)}return!1}var Bie=Sie;function Nie(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var GB=Nie,Die=GB,Fie=Kr;function Pie(e,t,r){var n=t(e);return Fie(e)?n:Die(n,r(e))}var Oie=Pie;function Tie(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var o=e[r];t(o,r,e)&&(a[i++]=o)}return a}var $ie=Tie;function Iie(){return[]}var Mie=Iie,Rie=$ie,Lie=Mie,zie=Object.prototype,Uie=zie.propertyIsEnumerable,W5=Object.getOwnPropertySymbols,Wie=W5?function(e){return e==null?[]:(e=Object(e),Rie(W5(e),function(t){return Uie.call(e,t)}))}:Lie,Hie=Wie;function Kie(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Vie=Kie,Gie=ma,qie=ga,Yie="[object Arguments]";function Zie(e){return qie(e)&&Gie(e)==Yie}var Xie=Zie,H5=Xie,Qie=ga,qB=Object.prototype,Jie=qB.hasOwnProperty,eae=qB.propertyIsEnumerable,tae=H5(function(){return arguments}())?H5:function(e){return Qie(e)&&Jie.call(e,"callee")&&!eae.call(e,"callee")},aw=tae,eh={exports:{}};function rae(){return!1}var nae=rae;eh.exports;(function(e,t){var r=Ni,n=nae,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,l=o?r.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||n;e.exports=u})(eh,eh.exports);var YB=eh.exports,iae=9007199254740991,aae=/^(?:0|[1-9]\d*)$/;function sae(e,t){var r=typeof e;return t=t??iae,!!t&&(r=="number"||r!="symbol"&&aae.test(e))&&e>-1&&e%1==0&&e<t}var sw=sae,oae=9007199254740991;function lae(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=oae}var ow=lae,cae=ma,uae=ow,dae=ga,xae="[object Arguments]",fae="[object Array]",hae="[object Boolean]",pae="[object Date]",mae="[object Error]",gae="[object Function]",vae="[object Map]",yae="[object Number]",bae="[object Object]",Eae="[object RegExp]",wae="[object Set]",Cae="[object String]",Aae="[object WeakMap]",jae="[object ArrayBuffer]",kae="[object DataView]",_ae="[object Float32Array]",Sae="[object Float64Array]",Bae="[object Int8Array]",Nae="[object Int16Array]",Dae="[object Int32Array]",Fae="[object Uint8Array]",Pae="[object Uint8ClampedArray]",Oae="[object Uint16Array]",Tae="[object Uint32Array]",ot={};ot[_ae]=ot[Sae]=ot[Bae]=ot[Nae]=ot[Dae]=ot[Fae]=ot[Pae]=ot[Oae]=ot[Tae]=!0;ot[xae]=ot[fae]=ot[jae]=ot[hae]=ot[kae]=ot[pae]=ot[mae]=ot[gae]=ot[vae]=ot[yae]=ot[bae]=ot[Eae]=ot[wae]=ot[Cae]=ot[Aae]=!1;function $ae(e){return dae(e)&&uae(e.length)&&!!ot[cae(e)]}var Iae=$ae;function Mae(e){return function(t){return e(t)}}var ZB=Mae,th={exports:{}};th.exports;(function(e,t){var r=iB,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,l=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=l})(th,th.exports);var Rae=th.exports,Lae=Iae,zae=ZB,K5=Rae,V5=K5&&K5.isTypedArray,Uae=V5?zae(V5):Lae,XB=Uae,Wae=Vie,Hae=aw,Kae=Kr,Vae=YB,Gae=sw,qae=XB,Yae=Object.prototype,Zae=Yae.hasOwnProperty;function Xae(e,t){var r=Kae(e),n=!r&&Hae(e),i=!r&&!n&&Vae(e),a=!r&&!n&&!i&&qae(e),o=r||n||i||a,l=o?Wae(e.length,String):[],c=l.length;for(var u in e)(t||Zae.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Gae(u,c)))&&l.push(u);return l}var Qae=Xae,Jae=Object.prototype;function ese(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Jae;return e===r}var tse=ese;function rse(e,t){return function(r){return e(t(r))}}var QB=rse,nse=QB,ise=nse(Object.keys,Object),ase=ise,sse=tse,ose=ase,lse=Object.prototype,cse=lse.hasOwnProperty;function use(e){if(!sse(e))return ose(e);var t=[];for(var r in Object(e))cse.call(e,r)&&r!="constructor"&&t.push(r);return t}
vendor: 6,270 bytes, line 907
907var dse=use,xse=UE,fse=ow;function hse(e){return e!=null&&fse(e.length)&&!xse(e)}var A0=hse,pse=Qae,mse=dse,gse=A0;function vse(e){return gse(e)?pse(e):mse(e)}var Vp=vse,yse=Oie,bse=Hie,Ese=Vp;function wse(e){return yse(e,Ese,bse)}var Cse=wse,G5=Cse,Ase=1,jse=Object.prototype,kse=jse.hasOwnProperty;function _se(e,t,r,n,i,a){var o=r&Ase,l=G5(e),c=l.length,u=G5(t),d=u.length;if(c!=d&&!o)return!1;for(var x=c;x--;){var f=l[x];if(!(o?f in t:kse.call(t,f)))return!1}var h=a.get(e),m=a.get(t);if(h&&m)return h==t&&m==e;var p=!0;a.set(e,t),a.set(t,e);for(var v=o;++x<c;){f=l[x];var y=e[f],b=t[f];if(n)var g=o?n(b,y,f,t,e,a):n(y,b,f,e,t,a);if(!(g===void 0?y===b||i(y,b,r,n,a):g)){p=!1;break}v||(v=f=="constructor")}if(p&&!v){var w=e.constructor,E=t.constructor;w!=E&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof E=="function"&&E instanceof E)&&(p=!1)}return a.delete(e),a.delete(t),p}var Sse=_se,Bse=ko,Nse=Ni,Dse=Bse(Nse,"DataView"),Fse=Dse,Pse=ko,Ose=Ni,Tse=Pse(Ose,"Promise"),$se=Tse,Ise=ko,Mse=Ni,Rse=Ise(Mse,"Set"),JB=Rse,Lse=ko,zse=Ni,Use=Lse(zse,"WeakMap"),Wse=Use,Qy=Fse,Jy=HE,eb=$se,tb=JB,rb=Wse,eN=ma,Pc=sB,q5="[object Map]",Hse="[object Object]",Y5="[object Promise]",Z5="[object Set]",X5="[object WeakMap]",Q5="[object DataView]",Kse=Pc(Qy),Vse=Pc(Jy),Gse=Pc(eb),qse=Pc(tb),Yse=Pc(rb),Ts=eN;(Qy&&Ts(new Qy(new ArrayBuffer(1)))!=Q5||Jy&&Ts(new Jy)!=q5||eb&&Ts(eb.resolve())!=Y5||tb&&Ts(new tb)!=Z5||rb&&Ts(new rb)!=X5)&&(Ts=function(e){var t=eN(e),r=t==Hse?e.constructor:void 0,n=r?Pc(r):"";if(n)switch(n){case Kse:return Q5;case Vse:return q5;case Gse:return Y5;case qse:return Z5;case Yse:return X5}return t});var Zse=Ts,Sg=UB,Xse=VB,Qse=Bie,Jse=Sse,J5=Zse,eC=Kr,tC=YB,eoe=XB,toe=1,rC="[object Arguments]",nC="[object Array]",hx="[object Object]",roe=Object.prototype,iC=roe.hasOwnProperty;function noe(e,t,r,n,i,a){var o=eC(e),l=eC(t),c=o?nC:J5(e),u=l?nC:J5(t);c=c==rC?hx:c,u=u==rC?hx:u;var d=c==hx,x=u==hx,f=c==u;if(f&&tC(e)){if(!tC(t))return!1;o=!0,d=!1}if(f&&!d)return a||(a=new Sg),o||eoe(e)?Xse(e,t,r,n,i,a):Qse(e,t,c,r,n,i,a);if(!(r&toe)){var h=d&&iC.call(e,"__wrapped__"),m=x&&iC.call(t,"__wrapped__");if(h||m){var p=h?e.value():e,v=m?t.value():t;return a||(a=new Sg),i(p,v,r,n,a)}}return f?(a||(a=new Sg),Jse(e,t,r,n,i,a)):!1}var ioe=noe,aoe=ioe,aC=ga;function tN(e,t,r,n,i){return e===t?!0:e==null||t==null||!aC(e)&&!aC(t)?e!==e&&t!==t:aoe(e,t,r,n,tN,i)}var lw=tN,soe=UB,ooe=lw,loe=1,coe=2;function uoe(e,t,r,n){var i=r.length,a=i,o=!n;if(e==null)return!a;for(e=Object(e);i--;){var l=r[i];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=r[i];var c=l[0],u=e[c],d=l[1];if(o&&l[2]){if(u===void 0&&!(c in e))return!1}else{var x=new soe;if(n)var f=n(u,d,c,e,t,x);if(!(f===void 0?ooe(d,u,loe|coe,n,x):f))return!1}}return!0}var doe=uoe,xoe=gs;function foe(e){return e===e&&!xoe(e)}var rN=foe,hoe=rN,poe=Vp;function moe(e){for(var t=poe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,hoe(i)]}return t}var goe=moe;function voe(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var nN=voe,yoe=doe,boe=goe,Eoe=nN;function woe(e){var t=boe(e);return t.length==1&&t[0][2]?Eoe(t[0][0],t[0][1]):function(r){return r===e||yoe(r,e,t)}}var Coe=woe;function Aoe(e,t){return e!=null&&t in Object(e)}var joe=Aoe,koe=dB,_oe=aw,Soe=Kr,Boe=sw,Noe=ow,Doe=Dp;function Foe(e,t,r){t=koe(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var o=Doe(t[n]);if(!(a=e!=null&&r(e,o)))break;e=e[o]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&Noe(i)&&Boe(o,i)&&(Soe(e)||_oe(e)))}var Poe=Foe,Ooe=joe,Toe=Poe;function $oe(e,t){return e!=null&&Toe(e,t,Ooe)}var Ioe=$oe,Moe=lw,Roe=xB,Loe=Ioe,zoe=zE,Uoe=rN,Woe=nN,Hoe=Dp,Koe=1,Voe=2;function Goe(e,t){return zoe(e)&&Uoe(t)?Woe(Hoe(e),t):function(r){var n=Roe(r,e);return n===void 0&&n===t?Loe(r,e):Moe(t,n,Koe|Voe)}}var qoe=Goe;function Yoe(e){return e}var Oc=Yoe;function Zoe(e){return function(t){return t==null?void 0:t[e]}}var Xoe=Zoe,Qoe=qE;function Joe(e){return function(t){return Qoe(t,e)}}var ele=Joe,tle=Xoe,rle=ele,nle=zE,ile=Dp;function ale(e){return nle(e)?tle(ile(e)):rle(e)}var sle=ale,ole=Coe,lle=qoe,cle=Oc,ule=Kr,dle=sle;function xle(e){return typeof e=="function"?e:e==null?cle:typeof e=="object"?ule(e)?lle(e[0],e[1]):ole(e):dle(e)}var vs=xle;function fle(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var iN=fle;function hle(e){return e!==e}var ple=hle;function mle(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var gle=mle,vle=iN,yle=ple,ble=gle;function Ele(e,t,r){return t===t?ble(e,t,r):vle(e,yle,r)}var wle=Ele,Cle=wle;function Ale(e,t){var r=e==null?0:e.length;return!!r&&Cle(e,t,0)>-1}var jle=Ale;function kle(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var _le=kle;function Sle(){}var Ble=Sle,Bg=JB,Nle=Ble,Dle=iw,Fle=1/0,Ple=Bg&&1/Dle(new Bg([,-0]))[1]==Fle?function(e){return new Bg(e)}:Nle,Ole=Ple,Tle=WB,$le=jle,Ile=_le,Mle=KB,Rle=Ole,Lle=iw,zle=200;function Ule(e,t,r){var n=-1,i=$le,a=e.length,o=!0,l=[],c=l;if(r)o=!1,i=Ile;else if(a>=zle){var u=t?null:Rle(e);if(u)return Lle(u);o=!1,i=Mle,c=new Tle}else c=t?[]:l;e:for(;++n<a;){var d=e[n],x=t?t(d):d;if(d=r||d!==0?d:0,o&&x===x){for(var f=c.length;f--;)if(c[f]===x)continue e;t&&c.push(x),l.push(d)}else i(c,x,r)||(c!==l&&c.push(x),l.push(d))}return l}var Wle=Ule,Hle=vs,Kle=Wle;function Vle(e,t){return e&&e.length?Kle(e,Hle(t)):[]}var Gle=Vle;const sC=qe(Gle);function aN(e,t,r){return t===!0?sC(e,r):Pe(t)?sC(e,t):e}function Zl(e){"@babel/helpers - typeof";return Zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zl(e)}var qle=["ref"];function oC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oC(Object(r),!0).forEach(function(n){Gp(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oC(Object(r)).forEac
vendor: 4,282 bytes, line 907
907h(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,oN(n.key),n)}}function Zle(e,t,r){return t&&lC(e.prototype,t),r&&lC(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xle(e,t,r){return t=rh(t),Qle(e,sN()?Reflect.construct(t,r||[],rh(e).constructor):t.apply(e,r))}function Qle(e,t){if(t&&(Zl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jle(e)}function Jle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sN=function(){return!!e})()}function rh(e){return rh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rh(e)}function ece(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nb(e,t)}function nb(e,t){return nb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},nb(e,t)}function Gp(e,t,r){return t=oN(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oN(e){var t=tce(e,"string");return Zl(t)=="symbol"?t:t+""}function tce(e,t){if(Zl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rce(e,t){if(e==null)return{};var r=nce(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function nce(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ice(e){return e.value}function ace(e,t){if(q.isValidElement(e))return q.cloneElement(e,t);if(typeof e=="function")return q.createElement(e,t);t.ref;var r=rce(t,qle);return q.createElement(nw,r)}var cC=1,Cl=function(e){function t(){var r;Yle(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Xle(this,t,[].concat(i)),Gp(r,"lastBoundingBox",{width:-1,height:-1}),r}return ece(t,e),Zle(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>cC||Math.abs(i.height-this.lastBoundingBox.height)>cC)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Fi({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,l=i.verticalAlign,c=i.margin,u=i.chartWidth,d=i.chartHeight,x,f;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var h=this.getBBoxSnapshot();x={left:((u||0)-h.width)/2}}else x=o==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(l==="middle"){var m=this.getBBoxSnapsh
907ot();f={top:((d||0)-m.height)/2}}else f=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Fi(Fi({},x),f)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,l=i.height,c=i.wrapperStyle,u=i.payloadUniqBy,d=i.payload,x=Fi(Fi({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return q.createElement("div",{className:"recharts-legend-wrapper",style:x,ref:function(h){n.wrapperNode=h}},ace(a,Fi(Fi({},this.props),{},{payload:aN(d,u,ice)})))}}],[{key:"getWithHeight",value:function(n,i){var a=Fi(Fi({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&me(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(A.PureComponent);Gp(Cl,"displayName","Legend");Gp(Cl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var uC=w0,sce=aw,oce=Kr,dC=uC?uC.isConcatSpreadable:void 0;function lce(e){return oce(e)||sce(e)||!!(dC&&e&&e[dC])}var cce=lce,uce=GB,dce=cce;function lN(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=dce),i||(i=[]);++a<o;){var l=e[a];t>0&&r(l)?t>1?lN(l,t-1,r,n,i):uce(i,l):n||(i[i.length]=l)}return i}var cN=lN;function xce(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),l=o.length;l--;){var c=o[e?l:++i];if(r(a[c],c,a)===!1)break}return t}}var fce=xce,hce=fce,pce=hce(),mce=pce,gce=mce,vce=Vp;function yce(e,t){return e&&gce(e,t,vce)}var uN=yce,bce=A0;function Ece(e,t){return function(r,n){if(r==null)return r;if(!bce(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++a<i)&&n(o[a],a,o)!==!1;);return r}}var wce=Ece,Cce=uN,Ace=wce,jce=Ace(Cce),cw=jce,kce=cw,_ce=A0;function Sce(e,t){var r=-1,n=_ce(e)?Array(e.length):[];return kce(e,function(i,a,o){n[++r]=t(i,a,o)}),n}var dN=Sce;function Bce(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var Nce=Bce,xC=kc;function Dce(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,a=xC(e),o=t!==void 0,l=t===null,c=t===t,u=xC(t);if(!l&&!u&&!a&&e>t||a&&o&&c&&!l&&!u||n&&o&&c||!r&&c||!i)return 1;if(!n&&!a&&!u&&e<t||u&&r&&i&&!n&&!a||l&&r&&i||!o&&i||!c)return-1}return 0}var Fce=Dce,Pce=Fce;function Oce(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,o=i.length,l=r.length;++n<o;){var c=Pce(i[n],a[n]);if(c){if(n>=l)return c;var u=r[n];return c*(u=="desc"?-1:1)}}return e.index-t.index}var Tce=Oce,Ng=GE,$ce=qE,Ice=vs,Mce=dN,Rce=Nce,Lce=ZB,zce=Tce,Uce=Oc,Wce=Kr;function Hce(e,t,r){t.length?t=Ng(t,function(a){return Wce(a)?function(o){return $ce(o,a.length===1?a[0]:a)}:a}):t=[Uce];var n=-1;t=Ng(t,Lce(Ice));var i=Mce(e,function(a,o,l){var c=Ng(t,function(u){return u(a)});return{criteria:c,index:++n,value:a}});return Rce(i,function(a,o){return zce(a,o,r)})}var Kce=Hce;function Vce(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Gce=Vce,qce=Gce,fC=Math.max;function Yce(e,t,r){return t=fC(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=fC(n.length-t,0),o=Array(a);++i<a;)o[i]=n[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=n[i];return l[t]=r(o),qce(e,this,l)}}var Zce=Yce;function Xce(e){return function(){return e}}var Qce=Xce,Jce=ko,eue=function(){try{var e=Jce(Object,"defineProperty");return e({},"",{}),e}catch{}}(),xN=eue,tue=Qce,hC=xN,rue=Oc,nue=hC?function(e,t){return hC(e,"toString",{configurable:!0,enumerable:!1,value:tue(t),writable:!0})}:rue,iue=nue,aue=800,sue=16,oue=Date.now;function lue(e){var t=0,r=0;return function(){var n=oue(),i=sue-(n-r);if(r=n,i>0){if(++t>=aue)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var cue=lue,uue=iue,due=cue,xue=due(uue),fue=xue,hue=Oc,pue=Zce,mue=fue;function gue(e,t){return mue(pue(e,t,hue),e+"")}var vue=gue,yue=WE,bue=A0,Eue=sw,wue=gs;function Cue(e,t,r){if(!wue(r))return!1;var n=typeof t;return(n=="number"?bue(r)&&Eue(t,r.length):n=="string"&&t in r)?yue(r[t],e):!1}var qp=Cue,Aue=cN,jue=Kce,kue=vue,pC=qp,_ue=kue(function(e,t){if(e==null)return[];var r=t.length;return r>1&&pC(e,t[0],t[1])?t=[]:r>2&&pC(t[0],t[1],t[2])&&(t=[t[0]]),jue(e,Aue(t,1),[])}),Sue=_ue;const uw=qe(Sue);function Ad(e){"@babel/helpers - typeof";return Ad=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ad(e)}function ib(){return ib=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 29,151 bytes, lines 907-914
907for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ib.apply(this,arguments)}function Bue(e,t){return Pue(e)||Fue(e,t)||Due(e,t)||Nue()}function Nue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 908In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Due(e,t){if(e){if(typeof e=="string")return mC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mC(e,t)}}function mC(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Fue(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function Pue(e){if(Array.isArray(e))return e}function gC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Dg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gC(Object(r),!0).forEach(function(n){Oue(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oue(e,t,r){return t=Tue(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tue(e){var t=$ue(e,"string");return Ad(t)=="symbol"?t:t+""}function $ue(e,t){if(Ad(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ad(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Iue(e){return Array.isArray(e)&&Wt(e[0])&&Wt(e[1])?e.join(" ~ "):e}var Mue=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,l=o===void 0?{}:o,c=t.labelStyle,u=c===void 0?{}:c,d=t.payload,x=t.formatter,f=t.itemSorter,h=t.wrapperClassName,m=t.labelClassName,p=t.label,v=t.labelFormatter,y=t.accessibilityLayer,b=y===void 0?!1:y,g=function(){if(d&&d.length){var B={padding:0,margin:0},T=(f?uw(d,f):d).map(function(k,$){if(k.type==="none")return null;var W=Dg({display:"block",paddingTop:4,paddingBottom:4,color:k.color||"#000"},l),z=k.formatter||x||Iue,L=k.value,F=k.name,U=L,D=F;if(z&&U!=null&&D!=null){var N=z(L,F,k,$,d);if(Array.isArray(N)){var K=Bue(N,2);U=K[0],D=K[1]}else U=N}return q.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat($),style:W},Wt(D)?q.createElement("span",{className:"recharts-tooltip-item-name"},D):null,Wt(D)?q.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,q.createElement("span",{className:"recharts-tooltip-item-value"},U),q.createElement("span",{className:"recharts-tooltip-item-unit"},k.unit||""))});return q.createElement("ul",{className:"recharts-tooltip-item-list",style:B},T)}return null},w=Dg({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),E=Dg({margin:0},u),C=!Ie(p),j=C?p:"",S=Me("recharts-default-tooltip",h),_=Me("recharts-tooltip-label",m);C&&v&&d!==void 0&&d!==null&&(j=v(p,d));var O=b?{role:"status","aria-live":"assertive"}:{};return q.createElement("div",ib({className:S,style:w},O),q.createElement("p",{className:_,style:E},q.isValidElement(j)?j:"".concat(j)),g())};function jd(e){"@babel/helpers - typeof";return jd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jd(e)}function px(e,t,r){return t=Rue(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rue(e){var t=Lue(e,"string");return jd(t)=="symbol"?t:t+""}function Lue(e,t){if(jd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(jd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tu="recharts-tooltip-wrapper",zue={visibility:"hidden"};function Uue(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return Me(tu,px(px(px(px({},"".concat(tu,"-right"),me(r)&&t&&me(t.x)&&r>=t.x),"".concat(tu,"-left"),me(r)&&t&&me(t.x)&&r<t.x),"".concat(tu,"-bottom"),me(n)&&t&&me(t.y)&&n>=t.y),"".concat(tu,"-top"),me(n)&&t&&me(t.y)&&n<t.y))}function vC(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(a&&me(a[n]))return a[n];var d=r[n]-l-i,x=r[n]+i;if(t[n])return o[n]?d:x;if(o[n]){var f=d,h=c[n];return f<h?Math.max(x,c[n]):Math.max(d,c[n])}var m=x+l,p=c[n]+u;return m>p?Math.max(d,c[n]):Math.max(x,c[n])}function Wue(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function Hue(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,u,d,x;return o.height>0&&o.width>0&&r?(d=vC({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),x=vC({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),u=Wue({translateX:d,translateY:x,useTranslate3d:l})):u=zue,{cssProperties:u,cssClasses:Uue({translateX:d,translateY:x,coordinate:r})}}function Xl(e){"@babel/helpers - typeof";return Xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xl(e)}function yC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yC(Object(r),!0).forEach(function(n){sb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vue(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,hN(n.key),n)}}function Gue(e,t,r){return t&&Vue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function que(e,t,r){return t=nh(t),Yue(e,fN()?Reflect.construct(t,r||[],nh(e).constructor):t.apply(e,r))}function Yue(e,t){if(t&&(Xl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zue(e)}function Zue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fN=function(){return!!e})()}function nh(e){return nh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},nh(e)}function Xue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ab(e,t)}function ab(e,t){return ab=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ab(e,t)}function sb(e,t,r){return t=hN(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hN(e){var t=Que(e,"string");return Xl(t)=="symbol"?t:t+""}function Que(e,t){if(Xl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Xl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var EC=1,Jue=function(e){function t(){var r;Kue(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=que(this,t,[].concat(i)),sb(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),sb(r,"handleKeyDown",function(o){if(o.key==="Escape"){var l,c,u,d;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&l!==void 0?l:0,y:(u=(d=r.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&u!==void 0?u:0}})}}),r}return Xue(t,e),Gue(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>EC||Math.abs(n.height-this.state.lastBoundingBox.height)>EC)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,c=i.animationEasing,u=i.children,d=i.coordinate,x=i.hasPayload,f=i.isAnimationActive,h=i.offset,m=i.position,p=i.reverseDirection,v=i.useTranslate3d,y=i.viewBox,b=i.wrapperStyle,g=Hue({allowEscapeViewBox:o,coordinate:d,offsetTopLeft:h,position:m,reverseDirection:p,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:y}),w=g.cssClasses,E=g.cssProperties,C=bC(bC({transition:f&&a?"transform ".concat(l,"ms ").concat(c):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&x?"visible":"hidden",position:"absolute",top:0,left:0},b);return q.createElement("div",{tabIndex:-1,className:w,style:C,ref:function(S){n.wrapperNode=S}},u)}}])}(A.PureComponent),ede=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Zi={isSsr:ede(),get:function(t){return Zi[t]},set:function(t,r){if(typeof t=="string")Zi[t]=r;else{var n=Object.keys(t);n&&n.length&&n.forEach(function(i){Zi[i]=t[i]})}}};function Ql(e){"@babel/helpers - typeof";return Ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ql(e)}function wC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function CC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wC(Object(r),!0).forEach(function(n){dw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rde(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,mN(n.key),n)}}function nde(e,t,r){return t&&rde(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ide(e,t,r){return t=ih(t),ade(e,pN()?Reflect.construct(t,r||[],ih(e).constructor):t.apply(e,r))}function ade(e,t){if(t&&(Ql(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sde(e)}function sde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pN=function(){return!!e})()}function ih(e){return ih=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ih(e)}function ode(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ob(e,t)}function ob(e,t){return ob=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ob(e,t)}function dw(e,t,r){return t=mN(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mN(e){var t=lde(e,"string");return Ql(t)=="symbol"?t:t+""}function lde(e,t){if(Ql(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ql(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cde(e){return e.dataKey}function ude(e,t){return q.isValidElement(e)?q.cloneElement(e,t):typeof e=="function"?q.createElement(e,t):q.createElement(Mue,t)}var Zr=function(e){function t(){return tde(this,t),ide(this,t,arguments)}return ode(t,e),nde(t,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,c=i.animationEasing,u=i.content,d=i.coordinate,x=i.filterNull,f=i.isAnimationActive,h=i.offset,m=i.payload,p=i.payloadUniqBy,v=i.position,y=i.reverseDirection,b=i.useTranslate3d,g=i.viewBox,w=i.wrapperStyle,E=m??[];x&&E.length&&(E=aN(m.filter(function(j){return j.value!=null&&(j.hide!==!0||n.props.includeHidden)}),p,cde));var C=E.length>0;return q.createElement(Jue,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:f,active:a,coordinate:d,hasPayload:C,offset:h,position:v,reverseDirection:y,useTranslate3d:b,viewBox:g,wrapperStyle:w},ude(u,CC(CC({},this.props),{},{payload:E})))}}])}(A.PureComponent);dw(Zr,"displayName","Tooltip");dw(Zr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Zi.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var dde=Ni,xde=function(){return dde.Date.now()},fde=xde,hde=/\s/;function pde(e){for(var t=e.length;t--&&hde.test(e.charAt(t)););return t}var mde=pde,gde=mde,vde=/^\s+/;function yde(e){return e&&e.slice(0,gde(e)+1).replace(vde,"")}var bde=yde,Ede=bde,AC=gs,wde=kc,jC=NaN,Cde=/^[-+]0x[0-9a-f]+$/i,Ade=/^0b[01]+$/i,jde=/^0o[0-7]+$/i,kde=parseInt;function _de(e){if(typeof e=="number")return e;if(wde(e))return jC;if(AC(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=AC(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ede(e);var r=Ade.test(e);return r||jde.test(e)?kde(e.slice(2),r?2:8):Cde.test(e)?jC:+e}var gN=_de,Sde=gs,Fg=fde,kC=gN,Bde="Expected a function",Nde=Math.max,Dde=Math.min;function Fde(e,t,r){var n,i,a,o,l,c,u=0,d=!1,x=!1,f=!0;if(typeof e!="function")throw new TypeError(Bde);t=kC(t)||0,Sde(r)&&(d=!!r.leading,x="maxWait"in r,a=x?Nde(kC(r.maxWait)||0,t):a,f="trailing"in r?!!r.trailing:f);function h(C){var j=n,S=i;return n=i=void 0,u=C,o=e.apply(S,j),o}function m(C){return u=C,l=setTimeout(y,t),d?h(C):o}function p(C){var j=C-c,S=C-u,_=t-j;return x?Dde(_,a-S):_}function v(C){var j=C-c,S=C-u;return c===void 0||j>=t||j<0||x&&S>=a}function y(){var C=Fg();if(v(C))return b(C);l=setTimeout(y,p(C))}function b(C){return l=void 0,f&&n?h(C):(n=i=void 0,o)}function g(){l!==void 0&&clearTimeout(l),u=0,n=c=i=l=void 0}function w(){return l===void 0?o:b(Fg())}function E(){var C=Fg(),j=v(C);if(n=arguments,i=this,c=C,j){if(l===void 0)return m(c);if(x)return clearTimeout(l),l=setTimeout(y,t),h(c)}return l===void 0&&(l=setTimeout(y,t)),o}return E.cancel=g,E.flush=w,E}var Pde=Fde,Ode=Pde,Tde=gs,$de="Expected a function";function Ide(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError($de);return Tde(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Ode(e,t,{leading:n,maxWait:t,trailing:i})}var Mde=Ide;const vN=qe(Mde);function kd(e){"@babel/helpers - typeof";return kd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kd(e)}function _C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_C(Object(r),!0).forEach(function(n){Rde(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_C(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Rde(e,t,r){return t=Lde(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lde(e){var t=zde(e,"string");return kd(t)=="symbol"?t:t+""}function zde(e,t){if(kd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(kd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ude(e,t){return Vde(e)||Kde(e,t)||Hde(e,t)||Wde()}function Wde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 909In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hde(e,t){if(e){if(typeof e=="string")return SC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return SC(e,t)}}function SC(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Kde(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function Vde(e){if(Array.isArray(e))return e}var gx=A.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=e.width,o=a===void 0?"100%":a,l=e.height,c=l===void 0?"100%":l,u=e.minWidth,d=u===void 0?0:u,x=e.minHeight,f=e.maxHeight,h=e.children,m=e.debounce,p=m===void 0?0:m,v=e.id,y=e.className,b=e.onResize,g=e.style,w=g===void 0?{}:g,E=A.useRef(null),C=A.useRef();C.current=b,A.useImperativeHandle(t,function(){return Object.defineProperty(E.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),E.current},configurable:!0})});var j=A.useState({containerWidth:i.width,containerHeight:i.height}),S=Ude(j,2),_=S[0],O=S[1],I=A.useCallback(function(T,k){O(function($){var W=Math.round(T),z=Math.round(k);return $.containerWidth===W&&$.containerHeight===z?$:{containerWidth:W,containerHeight:z}})},[]);A.useEffect(function(){var T=function(F){var U,D=F[0].contentRect,N=D.width,K=D.height;I(N,K),(U=C.current)===null||U===void 0||U.call(C,N,K)};p>0&&(T=vN(T,p,{trailing:!0,leading:!1}));var k=new ResizeObserver(T),$=E.current.getBoundingClientRect(),W=$.width,z=$.height;return I(W,z),k.observe(E.current),function(){k.disconnect()}},[I,p]);var B=A.useMemo(function(){var T=_.containerWidth,k=_.containerHeight;if(T<0||k<0)return null;Yi(Ws(o)||Ws(c),`The width(%s) and height(%s) are both fixed numbers, 910 maybe you don't need to use a ResponsiveContainer.`,o,c),Yi(!r||r>0,"The aspect(%s) must be greater than zero.",r);var $=Ws(o)?T:o,W=Ws(c)?k:c;r&&r>0&&($?W=$/r:W&&($=W*r),f&&W>f&&(W=f)),Yi($>0||W>0,`The width(%s) and height(%s) of chart should be greater than 0, 911 please check the style of container, or the props width(%s) and height(%s), 912 or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the 913 height and width.`,$,W,o,c,d,x,r);var z=!Array.isArray(h)&&qi(h.type).endsWith("Chart");return q.Children.map(h,function(L){return q.isValidElement(L)?A.cloneElement(L,mx({width:$,height:W},z?{style:mx({height:"100%",width:"100%",maxHeight:W,maxWidth:$},L.props.style)}:{})):L})},[r,h,c,f,x,d,_,o]);return q.createElement("div",{id:v?"".concat(v):void 0,className:Me("recharts-responsive-container",y),style:mx(mx({},w),{},{width:o,height:c,minWidth:d,minHeight:x,maxHeight:f}),ref:E},B)}),yN=function(t){return null};yN.displayName="Cell";function _d(e){"@babel/helpers - typeof";return _d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_d(e)}function BC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BC(Object(r),!0).forEach(function(n){Gde(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gde(e,t,r){return t=qde(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qde(e){var t=Yde(e,"string");return _d(t)=="symbol"?t:t+""}function Yde(e,t){if(_d(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(_d(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Uo={widthCache:{},cacheCount:0},Zde=2e3,Xde={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},NC="recharts_measurement_span";function Qde(e){var t=lb({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Tu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Zi.isSsr)return{width:0,height:0};var n=Qde(r),i=JSON.stringify({text:t,copyStyle:n});if(Uo.widthCache[i])return Uo.widthCache[i];try{var a=document.getElementById(NC);a||(a=document.createElement("span"),a.setAttribute("id",NC),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=lb(lb({},Xde),n);Object.assign(a.style,o),a.textContent="".concat(t);var l=a.getBoundingClientRect(),c={width:l.width,height:l.height};return Uo.widthCache[i]=c,++Uo.cacheCount>Zde&&(Uo.cacheCount=0,Uo.widthCache={}),c}catch{return{width:0,height:0}}},Jde=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Sd(e){"@babel/helpers - typeof";return Sd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sd(e)}function ah(e,t){return n0e(e)||r0e(e,t)||t0e(e,t)||e0e()}function e0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 914In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t0e(e,t){if(e){if(typeof e=="string")return DC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return DC(e,t)}}function DC(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function r0e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function n0e(e){if(Array.isArray(e))return e}function i0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s0e(n.key),n)}}function a0e(e,t,r){return t&&FC(e.prototype,t),r&&FC(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s0e(e){var t=o0e(e,"string");return Sd(t)=="symbol"?t:t+""}function o0e(e,t){if(Sd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Sd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var PC=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,OC=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,l0e=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,c0e=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,bN={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},u0e=Object.keys(bN),ll="NaN";function d0e(e,t){return e*bN[t]}var vx=function(){function e(t,r){i0e(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!l0e.test(r)&&(this.num=NaN,this.unit=""),u0e.includes(r)&&(this.num=d0e(t,r),this.unit="px")}return a0e(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,i=(n=c0e.exec(r))!==null&&n!==void 0?n:[],a=ah(i,3),o=a[1],l=a[2];return new e(parseFloat(o),l??"")}}])}();function EN(e){if(e.includes(ll))return ll;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=PC.exec(t))!==null&&r!==void 0?r:[],i=ah(n,4),a=i[1],o=i[2],l=i[3],c=vx.parse(a??""),u=vx.parse(l??""),d=o==="*"?c.multiply(u):c.divide(u);if(d.isNaN())return ll;t=t.replace(PC,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var x,f=(x=OC.exec(t))!==null&&x!==void 0?x:[],h=ah(f,4),m=h[1],p=h[2],v=h[3],y=vx.parse(m??""),b=vx.parse(v??""),g=p==="+"?y.add(b):y.subtract(b);if(g.isNaN())return ll;t=t.replace(OC,g.toString())}return t}var TC=/\(([^()]*)\)/;function x0e(e){for(var t=e;t.includes("(");){var r=TC.exec(t),n=ah(r,2),i=n[1];t=t.replace(TC,EN(i))}return t}function f0e(e){var t=e.replace(/\s+/g,"");return t=x0e(t),t=EN(t),t}function h0e(e){try{return f0e(e)}catch{return ll}}function Pg(e){var t=h0e(e.slice(5,-1));return t===ll?"":t}var p0e=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],m0e=["dx","dy","angle","className","breakAll"];function cb(){return cb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
914for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cb.apply(this,arguments)}function $C(e,t){if(e==null)return{};var r=g0e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function g0e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function IC(e,t){return E0e(e)||b0e(e,t)||y0e(e,t)||v0e()}function v0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 915In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y0e(e,t){if(e){if(typeof e=="string")return MC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return MC(e,t)}}function MC(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b0e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function E0e(e){if(Array.isArray(e))return e}var wN=/[ \f\n\r\t\v\u2028\u2029]+/,CN=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var a=[];Ie(r)||(n?a=r.toString().split(""):a=r.toString().split(wN));var o=a.map(function(c){return{word:c,width:Tu(c,i).width}}),l=n?0:Tu(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}},w0e=function(t,r,n,i,a){var o=t.maxLines,l=t.children,c=t.style,u=t.breakAll,d=me(o),x=l,f=function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return $.reduce(function(W,z){var L=z.word,F=z.width,U=W[W.length-1];if(U&&(i==null||a||U.width+F+n<Number(i)))U.words.push(L),U.width+=F+n;else{var D={words:[L],width:F};W.push(D)}return W},[])},h=f(r),m=function($){return $.reduce(function(W,z){return W.width>z.width?W:z})};if(!d)return h;for(var p="â¦",v=function($){var W=x.slice(0,$),z=CN({breakAll:u,style:c,children:W+p}).wordsWithComputedWidth,L=f(z),F=L.length>o||m(L).width>Number(i);return[F,L]},y=0,b=x.length-1,g=0,w;y<=b&&g<=x.length-1;){var E=Math.floor((y+b)/2),C=E-1,j=v(C),S=IC(j,2),_=S[0],O=S[1],I=v(E),B=IC(I,1),T=B[0];if(!_&&!T&&(y=E+1),_&&T&&(b=E-1),!_&&T){w=O;break}g++}return w||h},RC=function(t){var r=Ie(t)?[]:t.toString().split(wN);return[{words:r}]},C0e=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,l=t.maxLines;if((r||n)&&!Zi.isSsr){var c,u,d=CN({breakAll:o,children:i,style:a});if(d){var x=d.wordsWithComputedWidth,f=d.spaceWidth;c=x,u=f}else return RC(i);return w0e({breakAll:o,children:i,maxLines:l,style:a},c,u,r,n)}return RC(i)},LC="#808080",sh=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,l=o===void 0?"1em":o,c=t.capHeight,u=c===void 0?"0.71em":c,d=t.scaleToFit,x=d===void 0?!1:d,f=t.textAnchor,h=f===void 0?"start":f,m=t.verticalAnchor,p=m===void 0?"end":m,v=t.fill,y=v===void 0?LC:v,b=$C(t,p0e),g=A.useMemo(function(){return C0e({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:x,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,x,b.style,b.width]),w=b.dx,E=b.dy,C=b.angle,j=b.className,S=b.breakAll,_=$C(b,m0e);if(!Wt(n)||!Wt(a))return null;var O=n+(me(w)?w:0),I=a+(me(E)?E:0),B;switch(p){case"start":B=Pg("calc(".concat(u,")"));break;case"middle":B=Pg("calc(".concat((g.length-1)/2," * -").concat(l," + (").concat(u," / 2))"));break;default:B=Pg("calc(".concat(g.length-1," * -").concat(l,")"));break}var T=[];if(x){var k=g[0].width,$=b.width;T.push("scale(".concat((me($)?$/k:1)/k,")"))}return C&&T.push("rotate(".concat(C,", ").concat(O,", ").concat(I,")")),T.length&&(_.transform=T.join(" ")),q.createElement("text",cb({},Te(_,!0),{x:O,y:I,className:Me("recharts-text",j),textAnchor:h,fill:y.includes("url")?LC:y}),g.map(function(W,z){var L=W.words.join(S?"":" ");return q.createElement("tspan",{x:O,dy:z===0?B:l,key:"".concat(L,"-").concat(z)},L)}))};function rs(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function A0e(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function xw(e){let t,r,n;e.length!==2?(t=rs,r=(l,c)=>rs(e(l),c),n=(l,c)=>e(l)-c):(t=e===rs||e===A0e?e:j0e,r=e,n=e);function i(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const x=u+d>>>1;r(l[x],c)<0?u=x+1:d=x}while(u<d)}return u}function a(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const x=u+d>>>1;r(l[x],c)<=0?u=x+1:d=x}while(u<d)}return u}function o(l,c,u=0,d=l.length){const x=i(l,c,u,d-1);return x>u&&n(l[x-1],c)>-n(l[x],c)?x-1:x}return{left:i,center:o,right:a}}function j0e(){return 0}function AN(e){return e===null?NaN:+e}function*k0e(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const _0e=xw(rs),j0=_0e.right;xw(AN).center;class zC extends Map{constructor(t,r=N0e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(UC(this,t))}has(t){return super.has(UC(this,t))}set(t,r){return super.set(S0e(this,t),r)}delete(t){return super.delete(B0e(this,t))}}function UC({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function S0e({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function B0e({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function N0e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function D0e(e=rs){if(e===rs)return jN;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function jN(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const F0e=Math.sqrt(50),P0e=Math.sqrt(10),O0e=Math.sqrt(2);function oh(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=F0e?10:a>=P0e?5:a>=O0e?2:1;let l,c,u;return i<0?(u=Math.pow(10,-i)/o,l=Math.round(e*u),c=Math.round(t*u),l/u<e&&++l,c/u>t&&--c,u=-u):(u=Math.pow(10,i)*o,l=Math.round(e/u),c=Math.round(t/u),l*u<e&&++l,c*u>t&&--c),c<l&&.5<=r&&r<2?oh(e,t,r*2):[l,c,u]}function ub(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,o]=n?oh(t,e,r):oh(e,t,r);if(!(a>=i))return[];const l=a-i+1,c=new Array(l);if(n)if(o<0)for(let u=0;u<l;++u)c[u]=(a-u)/-o;else for(let u=0;u<l;++u)c[u]=(a-u)*o;else if(o<0)for(let u=0;u<l;++u)c[u]=(i+u)/-o;else for(let u=0;u<l;++u)c[u]=(i+u)*o;return c}function db(e,t,r){return t=+t,e=+e,r=+r,oh(e,t,r)[2]}function xb(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?db(t,e,r):db(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function WC(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function HC(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}
vendor: 14,818 bytes, line 915
915function kN(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?jN:D0e(i);n>r;){if(n-r>600){const c=n-r+1,u=t-r+1,d=Math.log(c),x=.5*Math.exp(2*d/3),f=.5*Math.sqrt(d*x*(c-x)/c)*(u-c/2<0?-1:1),h=Math.max(r,Math.floor(t-u*x/c+f)),m=Math.min(n,Math.floor(t+(c-u)*x/c+f));kN(e,t,h,m,i)}const a=e[t];let o=r,l=n;for(ru(e,r,t),i(e[n],a)>0&&ru(e,r,n);o<l;){for(ru(e,o,l),++o,--l;i(e[o],a)<0;)++o;for(;i(e[l],a)>0;)--l}i(e[r],a)===0?ru(e,r,l):(++l,ru(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function ru(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function T0e(e,t,r){if(e=Float64Array.from(k0e(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return HC(e);if(t>=1)return WC(e);var n,i=(n-1)*t,a=Math.floor(i),o=WC(kN(e,a).subarray(0,a+1)),l=HC(e.subarray(a+1));return o+(l-o)*(i-a)}}function $0e(e,t,r=AN){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),l=+r(e[a+1],a+1,e);return o+(l-o)*(i-a)}}function I0e(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function Nn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function va(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const fb=Symbol("implicit");function fw(){var e=new zC,t=[],r=[],n=fb;function i(a){let o=e.get(a);if(o===void 0){if(n!==fb)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new zC;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return fw(t,r).unknown(n)},Nn.apply(i,arguments),i}function Bd(){var e=fw().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,l=!1,c=0,u=0,d=.5;delete e.unknown;function x(){var f=t().length,h=i<n,m=h?i:n,p=h?n:i;a=(p-m)/Math.max(1,f-c+u*2),l&&(a=Math.floor(a)),m+=(p-m-a*(f-c))*d,o=a*(1-c),l&&(m=Math.round(m),o=Math.round(o));var v=I0e(f).map(function(y){return m+a*y});return r(h?v.reverse():v)}return e.domain=function(f){return arguments.length?(t(f),x()):t()},e.range=function(f){return arguments.length?([n,i]=f,n=+n,i=+i,x()):[n,i]},e.rangeRound=function(f){return[n,i]=f,n=+n,i=+i,l=!0,x()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(f){return arguments.length?(l=!!f,x()):l},e.padding=function(f){return arguments.length?(c=Math.min(1,u=+f),x()):c},e.paddingInner=function(f){return arguments.length?(c=Math.min(1,f),x()):c},e.paddingOuter=function(f){return arguments.length?(u=+f,x()):u},e.align=function(f){return arguments.length?(d=Math.max(0,Math.min(1,f)),x()):d},e.copy=function(){return Bd(t(),[n,i]).round(l).paddingInner(c).paddingOuter(u).align(d)},Nn.apply(x(),arguments)}function _N(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return _N(t())},e}function $u(){return _N(Bd.apply(null,arguments).paddingInner(1))}function hw(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function SN(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function k0(){}var Nd=.7,lh=1/Nd,Al="\\s*([+-]?\\d+)\\s*",Dd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",M0e=/^#([0-9a-f]{3,8})$/,R0e=new RegExp(`^rgb\\(${Al},${Al},${Al}\\)$`),L0e=new RegExp(`^rgb\\(${wi},${wi},${wi}\\)$`),z0e=new RegExp(`^rgba\\(${Al},${Al},${Al},${Dd}\\)$`),U0e=new RegExp(`^rgba\\(${wi},${wi},${wi},${Dd}\\)$`),W0e=new RegExp(`^hsl\\(${Dd},${wi},${wi}\\)$`),H0e=new RegExp(`^hsla\\(${Dd},${wi},${wi},${Dd}\\)$`),KC={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};hw(k0,Fd,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:VC,formatHex:VC,formatHex8:K0e,formatHsl:V0e,formatRgb:GC,toString:GC});function VC(){return this.rgb().formatHex()}function K0e(){return this.rgb().formatHex8()}function V0e(){return BN(this).formatHsl()}function GC(){return this.rgb().formatRgb()}function Fd(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=M0e.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?qC(t):r===3?new $r(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?yx(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?yx(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=R0e.exec(e))?new $r(t[1],t[2],t[3],1):(t=L0e.exec(e))?new $r(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=z0e.exec(e))?yx(t[1],t[2],t[3],t[4]):(t=U0e.exec(e))?yx(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=W0e.exec(e))?XC(t[1],t[2]/100,t[3]/100,1):(t=H0e.exec(e))?XC(t[1],t[2]/100,t[3]/100,t[4]):KC.hasOwnProperty(e)?qC(KC[e]):e==="transparent"?new $r(NaN,NaN,NaN,0):null}function qC(e){return new $r(e>>16&255,e>>8&255,e&255,1)}function yx(e,t,r,n){return n<=0&&(e=t=r=NaN),new $r(e,t,r,n)}function G0e(e){return e instanceof k0||(e=Fd(e)),e?(e=e.rgb(),new $r(e.r,e.g,e.b,e.opacity)):new $r}function hb(e,t,r,n){return arguments.length===1?G0e(e):new $r(e,t,r,n??1)}function $r(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}hw($r,hb,SN(k0,{brighter(e){return e=e==null?lh:Math.pow(lh,e),new $r(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Nd:Math.pow(Nd,e),new $r(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new $r(no(this.r),no(this.g),no(this.b),ch(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:YC,formatHex:YC,formatHex8:q0e,formatRgb:ZC,toString:ZC}));function YC(){return`#${Hs(this.r)}${Hs(this.g)}${Hs(this.b)}`}function q0e(){return`#${Hs(this.r)}${Hs(this.g)}${Hs(this.b)}${Hs((isNaN(this.opacity)?1:this.opacity)*255)}`}function ZC(){const e=ch(this.opacity);return`${e===1?"rgb(":"rgba("}${no(this.r)}, ${no(this.g)}, ${no(this.b)}${e===1?")":`, ${e})`}`}function ch(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function no(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Hs(e){return e=no(e),(e<16?"0":"")+e.toString(16)}function XC(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new qn(e,t,r,n)}function BN(e){if(e instanceof qn)return new qn(e.h,e.s,e.l,e.opacity);if(e instanceof k0||(e=Fd(e)),!e)return new qn;if(e instanceof qn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,l=a-i,c=(a+i)/2;return l?(t===a?o=(r-n)/l+(r<n)*6:r===a?o=(n-t)/l+2:o=(t-r)/l+4,l/=c<.5?a+i:2-a-i,o*=60):l=c>0&&c<1?0:o,new qn(o,l,c,e.opacity)}function Y0e(e,t,r,n){return arguments.length===1?BN(e):new qn(e,t,r,n??1)}function qn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}hw(qn,Y0e,SN(k0,{brighter(e){return e=e==null?lh:Math.pow(lh,e),new qn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Nd:Math.pow(Nd,e),new qn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new $r(Og(e>=240?e-240:e+120,i,n),Og(e,i,n),Og(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new qn(QC(this.h),bx(this.s),bx(this.l),ch(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ch(this.opacity);return`${e===1?"hsl(":"hsla("}${QC(this.h)}, ${bx(this.s)*100}%, ${bx(this.l)*100}%${e===1?")":`, ${e})`}`}}));function QC(e){return e=(e||0)%360,e<0?e+360:e}function bx(e){return Math.max(0,Math.min(1,e||0))}function Og(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const pw=e=>()=>e;function Z0e(e,t){return function(r){return e+r*t}}function X0e(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function Q0e(e){return(e=+e)==1?NN:function(t,r){return r-t?X0e(t,r,e):pw(isNaN(t)?r:t)}}function NN(e,t){var r=t-e;return r?Z0e(e,r):pw(isNaN(e)?t:e)}const JC=function e(t){var r=Q0e(t);function n(i,a){var o=r((i=hb(i)).r,(a=hb(a)).r),l=r(i.g,a.g),c=r(i.b,a.b),u=NN(i.opacity,a.opacity);return function(d){return i.r=o(d),i.g=l(d),i.b=c(d),i.opacity=u(d),i+""}}return n.gamma=e,n}(1);function J0e(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function exe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function txe(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=Tc(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(l){for(o=0;o<n;++o)a[o]=i[o](l);return a}}function rxe(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function uh(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function nxe(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=Tc(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var pb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Tg=new RegExp(pb.source,"g");function ixe(e){return function(){return e}}function axe(e){return function(t){return e(t)+""}}function sxe(e,t){var r=pb.lastIndex=Tg.lastIndex=0,n,i,a,o=-1,l=[],c=[];for(e=e+"",t=t+"";(n=pb.exec(e))&&(i=Tg.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),l[o]?l[o]+=a:l[++o]=a),(n=n[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,c.push({i:o,x:uh(n,i)})),r=Tg.lastIndex;return r<t.length&&(a=t.slice(r),l[o]?l[o]+=a:l[++o]=a),l.length<2?c[0]?axe(c[0].x):ixe(t):(t=c.length,function(u){for(var d=0,x;d<t;++d)l[(x=c[d]).i]=x.x(u);return l.join("")})}function Tc(e,t){var r=typeof t,n;return t==null||r==="boolean"?pw(t):(r==="number"?uh:r==="string"?(n=Fd(t))?(t=n,JC):sxe:t instanceof Fd?JC:t instanceof Date?rxe:exe(t)?J0e:Array.isArray(t)?txe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?nxe:uh)(e,t)}function mw(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function oxe(e,t){t===void 0&&(t=e,e=Tc);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var l=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[l](o-l)}}function lxe(e){return function(){return e}}function dh(e){return+e}var eA=[0,1];function Ar(e){return e}function mb(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:lxe(isNaN(t)?NaN:.5)}function cxe(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function uxe(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=mb(i,n),a=r(o,a)):(n=mb(n,i),a=r(a,o)),function(l){return a(n(l))}}function dxe(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=mb(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(l){var c=j0(e,l,1,n)-1;return a[c](i[c](l))}}function _0(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Yp(){var e=eA,t=eA,r=Tc,n,i,a,o=Ar,l,c,u;function d(){var f=Math.min(e.length,t.length);return o!==Ar&&(o=cxe(e[0],e[f-1])),l=f>2?dxe:uxe,c=u=null,x}function x(f){return f==null||isNaN(f=+f)?a:(c||(c=l(e.map(n),t,r)))(n(o(f)))}return x.invert=function(f){return o(i((u||(u=l(t,e.map(n),uh)))(f)))},x.domain=function(f){return arguments.length?(e=Array.from(f,dh),d()):e.slice()},x.range=function(f){return arguments.length?(t=Array.from(f),d()):t.slice()},x.rangeRound=function(f){return t=Array.from(f),r=mw,d()},x.clamp=function(f){return arguments.length?(o=f?!0:Ar,d()):o!==Ar},x.interpolate=function(f){return arguments.length?(r=f,d()):r},x.unknown=function(f){return arguments.length?(a=f,x):a},function(f,h){return n=f,i=h,d()}}function gw(){return Yp()(Ar,Ar)}
vendor: 4,248 bytes, line 915
915function xxe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function xh(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Jl(e){return e=xh(Math.abs(e)),e?e[1]:NaN}function fxe(e,t){return function(r,n){for(var i=r.length,a=[],o=0,l=e[0],c=0;i>0&&l>0&&(c+l+1>n&&(l=Math.max(1,n-c)),a.push(r.substring(i-=l,i+l)),!((c+=l+1)>n));)l=e[o=(o+1)%e.length];return a.reverse().join(t)}}function hxe(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var pxe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pd(e){if(!(t=pxe.exec(e)))throw new Error("invalid format: "+e);var t;return new vw({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Pd.prototype=vw.prototype;function vw(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}vw.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function mxe(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var DN;function gxe(e,t){var r=xh(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(DN=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+xh(e,Math.max(0,t+a-1))[0]}function tA(e,t){var r=xh(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const rA={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:xxe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>tA(e*100,t),r:tA,s:gxe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function nA(e){return e}var iA=Array.prototype.map,aA=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vxe(e){var t=e.grouping===void 0||e.thousands===void 0?nA:fxe(iA.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?nA:hxe(iA.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"â":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(x){x=Pd(x);var f=x.fill,h=x.align,m=x.sign,p=x.symbol,v=x.zero,y=x.width,b=x.comma,g=x.precision,w=x.trim,E=x.type;E==="n"?(b=!0,E="g"):rA[E]||(g===void 0&&(g=12),w=!0,E="g"),(v||f==="0"&&h==="=")&&(v=!0,f="0",h="=");var C=p==="$"?r:p==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",j=p==="$"?n:/[%p]/.test(E)?o:"",S=rA[E],_=/[defgprs%]/.test(E);g=g===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function O(I){var B=C,T=j,k,$,W;if(E==="c")T=S(I)+T,I="";else{I=+I;var z=I<0||1/I<0;if(I=isNaN(I)?c:S(Math.abs(I),g),w&&(I=mxe(I)),z&&+I==0&&m!=="+"&&(z=!1),B=(z?m==="("?m:l:m==="-"||m==="("?"":m)+B,T=(E==="s"?aA[8+DN/3]:"")+T+(z&&m==="("?")":""),_){for(k=-1,$=I.length;++k<$;)if(W=I.charCodeAt(k),48>W||W>57){T=(W===46?i+I.slice(k+1):I.slice(k))+T,I=I.slice(0,k);break}}}b&&!v&&(I=t(I,1/0));var L=B.length+I.length+T.length,F=L<y?new Array(y-L+1).join(f):"";switch(b&&v&&(I=t(F+I,F.length?y-T.length:1/0),F=""),h){case"<":I=B+I+T+F;break;case"=":I=B+F+I+T;break;case"^":I=F.slice(0,L=F.length>>1)+B+I+T+F.slice(L);break;default:I=F+B+I+T;break}return a(I)}return O.toString=function(){return x+""},O}
915function d(x,f){var h=u((x=Pd(x),x.type="f",x)),m=Math.max(-8,Math.min(8,Math.floor(Jl(f)/3)))*3,p=Math.pow(10,-m),v=aA[8+m/3];return function(y){return h(p*y)+v}}return{format:u,formatPrefix:d}}var Ex,yw,FN;yxe({thousands:",",grouping:[3],currency:["$",""]});function yxe(e){return Ex=vxe(e),yw=Ex.format,FN=Ex.formatPrefix,Ex}function bxe(e){return Math.max(0,-Jl(Math.abs(e)))}function Exe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Jl(t)/3)))*3-Jl(Math.abs(e)))}function wxe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Jl(t)-Jl(e))+1}function PN(e,t,r,n){var i=xb(e,t,r),a;switch(n=Pd(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=Exe(i,o))&&(n.precision=a),FN(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=wxe(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=bxe(i))&&(n.precision=a-(n.type==="%")*2);break}}return yw(n)}function ys(e){var t=e.domain;return e.ticks=function(r){var n=t();return ub(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return PN(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],l=n[a],c,u,d=10;for(l<o&&(u=o,o=l,l=u,u=i,i=a,a=u);d-- >0;){if(u=db(o,l,r),u===c)return n[i]=o,n[a]=l,t(n);if(u>0)o=Math.floor(o/u)*u,l=Math.ceil(l/u)*u;else if(u<0)o=Math.ceil(o*u)/u,l=Math.floor(l*u)/u;else break;c=u}return e},e}function fh(){var e=gw();return e.copy=function(){return _0(e,fh())},Nn.apply(e,arguments),ys(e)}function ON(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,dh),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return ON(e).unknown(t)},e=arguments.length?Array.from(e,dh):[0,1],ys(r)}function TN(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),e[r]=t.floor(i),e[n]=t.ceil(a),e}function sA(e){return Math.log(e)}function oA(e){return Math.exp(e)}function Cxe(e){return-Math.log(-e)}function Axe(e){return-Math.exp(-e)}function jxe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function kxe(e){return e===10?jxe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function _xe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function lA(e){return(t,r)=>-e(-t,r)}function bw(e){const t=e(sA,oA),r=t.domain;let n=10,i,a;function o(){return i=_xe(n),a=kxe(n),r()[0]<0?(i=lA(i),a=lA(a),e(Cxe,Axe)):e(sA,oA),t}return t.base=function(l){return arguments.length?(n=+l,o()):n},t.domain=function(l){return arguments.length?(r(l),o()):r()},t.ticks=l=>{const c=r();let u=c[0],d=c[c.length-1];const x=d<u;x&&([u,d]=[d,u]);let f=i(u),h=i(d),m,p;const v=l==null?10:+l;let y=[];if(!(n%1)&&h-f<v){if(f=Math.floor(f),h=Math.ceil(h),u>0){for(;f<=h;++f)for(m=1;m<n;++m)if(p=f<0?m/a(-f):m*a(f),!(p<u)){if(p>d)break;y.push(p)}}else for(;f<=h;++f)for(m=n-1;m>=1;--m)if(p=f>0?m/a(-f):m*a(f),!(p<u)){if(p>d)break;y.push(p)}y.length*2<v&&(y=ub(u,d,v))}else y=ub(f,h,Math.min(h-f,v)).map(a);return x?y.reverse():y},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Pd(c)).precision==null&&(c.trim=!0),c=yw(c)),l===1/0)return c;const u=Math.max(1,n*l/t.ticks().length);return d=>{let x=d/a(Math.round(i(d)));return x*n<n-.5&&(x*=n),x<=u?c(d):""}},t.nice=()=>r(TN(r(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function $N(){const e=bw(Yp()).domain([1,10]);return e.copy=()=>_0(e,$N()).base(e.base()),Nn.apply(e,arguments),e}function cA(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function uA(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Ew(e){var t=1,r=e(cA(t),uA(t));return r.constant=function(n){return arguments.length?e(cA(t=+n),uA(t)):t},ys(r)}function IN(){var e=Ew(Yp());return e.copy=function(){return _0(e,IN()).constant(e.constant())},Nn.apply(e,arguments)}function dA(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Sxe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Bxe(e){return e<0?-e*e:e*e}function ww(e){var t=e(Ar,Ar),r=1;function n(){return r===1?e(Ar,Ar):r===.5?e(Sxe,Bxe):e(dA(r),dA(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ys(t)}function Cw(){var e=ww(Yp());return e.copy=function(){return _0(e,Cw()).exponent(e.exponent())},Nn.apply(e,arguments),e}function Nxe(){return Cw.apply(null,arguments).exponent(.5)}function xA(e){return Math.sign(e)*e*e}function Dxe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function MN(){var e=gw(),t=[0,1],r=!1,n;function i(a){var o=Dxe(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(xA(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,dh)).map(xA)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return MN(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Nn.apply(i,arguments),ys(i)}function RN(){var e=[],t=[],r=[],n;function i(){var o=0,l=Math.max(1,t.length);for(r=new Array(l-1);++o<l;)r[o-1]=$0e(e,o/l);return a}function a(o){return o==null||isNaN(o=+o)?n:t[j0(r,o)]}return a.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?r[l-1]:e[0],l<r.length?r[l]:e[e.length-1]]}
915,a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(rs),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return RN().domain(e).range(t).unknown(n)},Nn.apply(a,arguments)}function LN(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(c){return c!=null&&c<=c?i[j0(n,c,0,r)]:a}function l(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*t-(c-r)*e)/(r+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},o.range=function(c){return arguments.length?(r=(i=Array.from(c)).length-1,l()):i.slice()},o.invertExtent=function(c){var u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(c){return arguments.length&&(a=c),o},o.thresholds=function(){return n.slice()},o.copy=function(){return LN().domain([e,t]).range(i).unknown(a)},Nn.apply(ys(o),arguments)}function zN(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[j0(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return zN().domain(e).range(t).unknown(r)},Nn.apply(i,arguments)}const $g=new Date,Ig=new Date;function Gt(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),l=i.ceil(a);return a-o<l-a?o:l},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,l)=>{const c=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a<o)||!(l>0))return c;let u;do c.push(u=new Date(+a)),t(a,l),e(a);while(u<a&&a<o);return c},i.filter=a=>Gt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!a(o););else for(;--l>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>($g.setTime(+a),Ig.setTime(+o),e($g),e(Ig),Math.floor(r($g,Ig))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const hh=Gt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);hh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Gt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):hh);hh.range;const Wi=1e3,En=Wi*60,Hi=En*60,la=Hi*24,Aw=la*7,fA=la*30,Mg=la*365,Ks=Gt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Wi)},(e,t)=>(t-e)/Wi,e=>e.getUTCSeconds());Ks.range;const jw=Gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wi)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getMinutes());jw.range;const kw=Gt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getUTCMinutes());kw.range;const _w=Gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wi-e.getMinutes()*En)},(e,t)=>{e.setTime(+e+t*Hi)},(e,t)=>(t-e)/Hi,e=>e.getHours());_w.range;const Sw=Gt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Hi)},(e,t)=>(t-e)/Hi,e=>e.getUTCHours());Sw.range;const S0=Gt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*En)/la,e=>e.getDate()-1);S0.range;const Zp=Gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/la,e=>e.getUTCDate()-1);Zp.range;const UN=Gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/la,e=>Math.floor(e/la));UN.range;function _o(e){return Gt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*En)/Aw)}const Xp=_o(0),ph=_o(1),Fxe=_o(2),Pxe=_o(3),ec=_o(4),Oxe=_o(5),Txe=_o(6);Xp.range;ph.range;Fxe.range;Pxe.range;ec.range;Oxe.range;Txe.range;function So(e){return Gt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Aw)}const Qp=So(0),mh=So(1),$xe=So(2),Ixe=So(3),tc=So(4),Mxe=So(5),Rxe=So(6);Qp.range;mh.range;$xe.range;Ixe.range;tc.range;Mxe.range;Rxe.range;const Bw=Gt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Bw.range;const Nw=Gt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Nw.range;const ca=Gt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ca.every=e=>
vendor: 10,140 bytes, line 915
915!isFinite(e=Math.floor(e))||!(e>0)?null:Gt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});ca.range;const ua=Gt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ua.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Gt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});ua.range;function WN(e,t,r,n,i,a){const o=[[Ks,1,Wi],[Ks,5,5*Wi],[Ks,15,15*Wi],[Ks,30,30*Wi],[a,1,En],[a,5,5*En],[a,15,15*En],[a,30,30*En],[i,1,Hi],[i,3,3*Hi],[i,6,6*Hi],[i,12,12*Hi],[n,1,la],[n,2,2*la],[r,1,Aw],[t,1,fA],[t,3,3*fA],[e,1,Mg]];function l(u,d,x){const f=d<u;f&&([u,d]=[d,u]);const h=x&&typeof x.range=="function"?x:c(u,d,x),m=h?h.range(u,+d+1):[];return f?m.reverse():m}function c(u,d,x){const f=Math.abs(d-u)/x,h=xw(([,,v])=>v).right(o,f);if(h===o.length)return e.every(xb(u/Mg,d/Mg,x));if(h===0)return hh.every(Math.max(xb(u,d,x),1));const[m,p]=o[f/o[h-1][2]<o[h][2]/f?h-1:h];return m.every(p)}return[l,c]}const[Lxe,zxe]=WN(ua,Nw,Qp,UN,Sw,kw),[Uxe,Wxe]=WN(ca,Bw,Xp,S0,_w,jw);function Rg(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Lg(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function nu(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Hxe(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,l=e.months,c=e.shortMonths,u=iu(i),d=au(i),x=iu(a),f=au(a),h=iu(o),m=au(o),p=iu(l),v=au(l),y=iu(c),b=au(c),g={a:z,A:L,b:F,B:U,c:null,d:yA,e:yA,f:ffe,g:Cfe,G:jfe,H:ufe,I:dfe,j:xfe,L:HN,m:hfe,M:pfe,p:D,q:N,Q:wA,s:CA,S:mfe,u:gfe,U:vfe,V:yfe,w:bfe,W:Efe,x:null,X:null,y:wfe,Y:Afe,Z:kfe,"%":EA},w={a:K,A:R,b:H,B:X,c:null,d:bA,e:bA,f:Nfe,g:Lfe,G:Ufe,H:_fe,I:Sfe,j:Bfe,L:VN,m:Dfe,M:Ffe,p:ie,q:se,Q:wA,s:CA,S:Pfe,u:Ofe,U:Tfe,V:$fe,w:Ife,W:Mfe,x:null,X:null,y:Rfe,Y:zfe,Z:Wfe,"%":EA},E={a:O,A:I,b:B,B:T,c:k,d:gA,e:gA,f:sfe,g:mA,G:pA,H:vA,I:vA,j:rfe,L:afe,m:tfe,M:nfe,p:_,q:efe,Q:lfe,s:cfe,S:ife,u:Yxe,U:Zxe,V:Xxe,w:qxe,W:Qxe,x:$,X:W,y:mA,Y:pA,Z:Jxe,"%":ofe};g.x=C(r,g),g.X=C(n,g),g.c=C(t,g),w.x=C(r,w),w.X=C(n,w),w.c=C(t,w);function C(ne,ce){return function(ae){var Q=[],he=-1,P=0,G=ne.length,Z,V,M;for(ae instanceof Date||(ae=new Date(+ae));++he<G;)ne.charCodeAt(he)===37&&(Q.push(ne.slice(P,he)),(V=hA[Z=ne.charAt(++he)])!=null?Z=ne.charAt(++he):V=Z==="e"?" ":"0",(M=ce[Z])&&(Z=M(ae,V)),Q.push(Z),P=he+1);return Q.push(ne.slice(P,he)),Q.join("")}}function j(ne,ce){return function(ae){var Q=nu(1900,void 0,1),he=S(Q,ne,ae+="",0),P,G;if(he!=ae.length)return null;if("Q"in Q)return new Date(Q.Q);if("s"in Q)return new Date(Q.s*1e3+("L"in Q?Q.L:0));if(ce&&!("Z"in Q)&&(Q.Z=0),"p"in Q&&(Q.H=Q.H%12+Q.p*12),Q.m===void 0&&(Q.m="q"in Q?Q.q:0),"V"in Q){if(Q.V<1||Q.V>53)return null;"w"in Q||(Q.w=1),"Z"in Q?(P=Lg(nu(Q.y,0,1)),G=P.getUTCDay(),P=G>4||G===0?mh.ceil(P):mh(P),P=Zp.offset(P,(Q.V-1)*7),Q.y=P.getUTCFullYear(),Q.m=P.getUTCMonth(),Q.d=P.getUTCDate()+(Q.w+6)%7):(P=Rg(nu(Q.y,0,1)),G=P.getDay(),P=G>4||G===0?ph.ceil(P):ph(P),P=S0.offset(P,(Q.V-1)*7),Q.y=P.getFullYear(),Q.m=P.getMonth(),Q.d=P.getDate()+(Q.w+6)%7)}else("W"in Q||"U"in Q)&&("w"in Q||(Q.w="u"in Q?Q.u%7:"W"in Q?1:0),G="Z"in Q?Lg(nu(Q.y,0,1)).getUTCDay():Rg(nu(Q.y,0,1)).getDay(),Q.m=0,Q.d="W"in Q?(Q.w+6)%7+Q.W*7-(G+5)%7:Q.w+Q.U*7-(G+6)%7);return"Z"in Q?(Q.H+=Q.Z/100|0,Q.M+=Q.Z%100,Lg(Q)):Rg(Q)}}function S(ne,ce,ae,Q){for(var he=0,P=ce.length,G=ae.length,Z,V;he<P;){if(Q>=G)return-1;if(Z=ce.charCodeAt(he++),Z===37){if(Z=ce.charAt(he++),V=E[Z in hA?ce.charAt(he++):Z],!V||(Q=V(ne,ae,Q))<0)return-1}else if(Z!=ae.charCodeAt(Q++))return-1}return Q}function _(ne,ce,ae){var Q=u.exec(ce.slice(ae));return Q?(ne.p=d.get(Q[0].toLowerCase()),ae+Q[0].length):-1}function O(ne,ce,ae){var Q=h.exec(ce.slice(ae));return Q?(ne.w=m.get(Q[0].toLowerCase()),ae+Q[0].length):-1}function I(ne,ce,ae){var Q=x.exec(ce.slice(ae));return Q?(ne.w=f.get(Q[0].toLowerCase()),ae+Q[0].length):-1}function B(ne,ce,ae){var Q=y.exec(ce.slice(ae));return Q?(ne.m=b.get(Q[0].toLowerCase()),ae+Q[0].length):-1}function T(ne,ce,ae){var Q=p.exec(ce.slice(ae));return Q?(ne.m=v.get(Q[0].toLowerCase()),ae+Q[0].length):-1}function k(ne,ce,ae){return S(ne,t,ce,ae)}function $(ne,ce,ae){return S(ne,r,ce,ae)}function W(ne,ce,ae){return S(ne,n,ce,ae)}function z(ne){return o[ne.getDay()]}function L(ne){return a[ne.getDay()]}function F(ne){return c[ne.getMonth()]}function U(ne){return l[ne.getMonth()]}function D(ne){return i[+(ne.getHours()>=12)]}function N(ne){return 1+~~(ne.getMonth()/3)}function K(ne){return o[ne.getUTCDay()]}function R(ne){return a[ne.getUTCDay()]}function H(ne){return c[ne.getUTCMonth()]}function X(ne){return l[ne.getUTCMonth()]}function ie(ne){return i[+(ne.getUTCHours()>=12)]}function se(ne){return 1+~~(ne.getUTCMonth()/3)}return{format:function(ne){var ce=C(ne+="",g);return ce.toString=function(){return ne},ce},parse:function(ne){var ce=j(ne+="",!1);return ce.toString=function(){return ne},ce},utcFormat:function(ne){var ce=C(ne+="",w);return ce.toString=function(){return ne},ce},utcParse:function(ne){var ce=j(ne+="",!0);return ce.toString=function(){return ne},ce}}}var hA={"-":"",_:" ",0:"0"},Qt=/^\s*\d+/,Kxe=/^%/,Vxe=/[\\^$*+?|[\]().{}]/g;function We(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function Gxe(e){return e.replace(Vxe,"\\$&")}function iu(e){return new RegExp("^(?:"+e.map(Gxe).join("|")+")","i")}function au(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function qxe(e,t,r){var n=Qt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Yxe(e,t,r){var n=Qt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Zxe(e,t,r){var n=Qt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function Xxe(e,t,r){var n=Qt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function Qxe(e,t,r){var n=Qt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function pA(e,t,r){var n=Qt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function mA(e,t,r){var n=Qt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Jxe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function efe(e,t,r){var n=Qt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function tfe(e,t,r){var n=Qt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function gA(e,t,r){var n=Qt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function rfe(e,t,r){var n=Qt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function vA(e,t,r){var n=Qt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function nfe(e,t,r){var n=Qt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function ife(e,t,r){var n=Qt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function afe(e,t,r){var n=Qt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function sfe(e,t,r){var n=Qt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function ofe(e,t,r){var n=Kxe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function lfe(e,t,r){var n=Qt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function cfe(e,t,r){var n=Qt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function yA(e,t){return We(e.getDate(),t,2)}function ufe(e,t){return We(e.getHours(),t,2)}function dfe(e,t){return We(e.getHours()%12||12,t,2)}function xfe(e,t){return We(1+S0.count(ca(e),e),t,3)}function HN(e,t){return We(e.getMilliseconds(),t,3)}function ffe(e,t){return HN(e,t)+"000"}function hfe(e,t){return We(e.getMonth()+1,t,2)}function pfe(e,t){return We(e.getMinutes(),t,2)}function mfe(e,t){return We(e.getSeconds(),t,2)}function gfe(e){var t=e.getDay();return t===0?7:t}function vfe(e,t){return We(Xp.count(ca(e)-1,e),t,2)}function KN(e){var t=e.getDay();return t>=4||t===0?ec(e):ec.ceil(e)}function yfe(e,t){return e=KN(e),We(ec.count(ca(e),e)+(ca(e).getDay()===4),t,2)}function bfe(e){return e.getDay()}function Efe(e,t){return We(ph.count(ca(e)-1,e),t,2)}function wfe(e,t){return We(e.getFullYear()%100,t,2)}function Cfe(e,t){return e=KN(e),We(e.getFullYear()%100,t,2)}function Afe(e,t){return We(e.getFullYear()%1e4,t,4)}function jfe(e,t){var r=e.getDay();return e=r>=4||r===0?ec(e):ec.ceil(e),We(e.getFullYear()%1e4,t,4)}function kfe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+We(t/60|0,"0",2)+We(t%60,"0",2)}function bA(e,t){return We(e.getUTCDate(),t,2)}function _fe(e,t){return We(e.getUTCHours(),t,2)}function Sfe(e,t){return We(e.getUTCHours()%12||12,t,2)}function Bfe(e,t){return We(1+Zp.count(ua(e),e),t,3)}function VN(e,t){return We(e.getUTCMilliseconds(),t,3)}function Nfe(e,t){return VN(e,t)+"000"}function Dfe(e,t){return We(e.getUTCMonth()+1,t,2)}function Ffe(e,t){return We(e.getUTCMinutes(),t,2)}function Pfe(e,t){return We(e.getUTCSeconds(),t,2)}function Ofe(e){var t=e.getUTCDay();return t===0?7:t}function Tfe(e,t){return We(Qp.count(ua(e)-1,e),t,2)}function GN(e){var t=e.getUTCDay();return t>=4||t===0?tc(e):tc.ceil(e)}function $fe(e,t){return e=GN(e),We(tc.count(ua(e),e)+(ua(e).getUTCDay()===4),t,2)}function Ife(e){return e.getUTCDay()}function Mfe(e,t){return We(mh.count(ua(e)-1,e),t,2)}function Rfe(e,t){return We(e.getUTCFullYear()%100,t,2)}function Lfe(e,t){return e=GN(e),We(e.getUTCFullYear()%100,t,2)}function zfe(e,t){return We(e.getUTCFullYear()%1e4,t,4)}function Ufe(e,t){var r=e.getUTCDay();return e=r>=4||r===0?tc(e):tc.ceil(e),We(e.getUTCFullYear()%1e4,t,4)}function Wfe(){return"+0000"}function EA(){return"%"}function wA(e){return+e}function CA(e){return Math.floor(+e/1e3)}var Wo,qN,YN;Hfe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
915ay","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Hfe(e){return Wo=Hxe(e),qN=Wo.format,Wo.parse,YN=Wo.utcFormat,Wo.utcParse,Wo}function Kfe(e){return new Date(e)}function Vfe(e){return e instanceof Date?+e:+new Date(+e)}function Dw(e,t,r,n,i,a,o,l,c,u){var d=gw(),x=d.invert,f=d.domain,h=u(".%L"),m=u(":%S"),p=u("%I:%M"),v=u("%I %p"),y=u("%a %d"),b=u("%b %d"),g=u("%B"),w=u("%Y");function E(C){return(c(C)<C?h:l(C)<C?m:o(C)<C?p:a(C)<C?v:n(C)<C?i(C)<C?y:b:r(C)<C?g:w)(C)}return d.invert=function(C){return new Date(x(C))},d.domain=function(C){return arguments.length?f(Array.from(C,Vfe)):f().map(Kfe)},d.ticks=function(C){var j=f();return e(j[0],j[j.length-1],C??10)},d.tickFormat=function(C,j){return j==null?E:u(j)},d.nice=function(C){var j=f();return(!C||typeof C.range!="function")&&(C=t(j[0],j[j.length-1],C??10)),C?f(TN(j,C)):d},d.copy=function(){return _0(d,Dw(e,t,r,n,i,a,o,l,c,u))},d}function Gfe(){return Nn.apply(Dw(Uxe,Wxe,ca,Bw,Xp,S0,_w,jw,Ks,qN).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function qfe(){return Nn.apply(Dw(Lxe,zxe,ua,Nw,Qp,Zp,Sw,kw,Ks,YN).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Jp(){var e=0,t=1,r,n,i,a,o=Ar,l=!1,c;function u(x){return x==null||isNaN(x=+x)?c:o(i===0?.5:(x=(a(x)-r)*i,l?Math.max(0,Math.min(1,x)):x))}u.domain=function(x){return arguments.length?([e,t]=x,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(x){return arguments.length?(l=!!x,u):l},u.interpolator=function(x){return arguments.length?(o=x,u):o};function d(x){return function(f){var h,m;return arguments.length?([h,m]=f,o=x(h,m),u):[o(0),o(1)]}}return u.range=d(Tc),u.rangeRound=d(mw),u.unknown=function(x){return arguments.length?(c=x,u):c},function(x){return a=x,r=x(e),n=x(t),i=r===n?0:1/(n-r),u}}function bs(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function ZN(){var e=ys(Jp()(Ar));return e.copy=function(){return bs(e,ZN())},va.apply(e,arguments)}function XN(){var e=bw(Jp()).domain([1,10]);return e.copy=function(){return bs(e,XN()).base(e.base())},va.apply(e,arguments)}function QN(){var e=Ew(Jp());return e.copy=function(){return bs(e,QN()).constant(e.constant())},va.apply(e,arguments)}function Fw(){var e=ww(Jp());return e.copy=function(){return bs(e,Fw()).exponent(e.exponent())},va.apply(e,arguments)}function Yfe(){return Fw.apply(null,arguments).exponent(.5)}function JN(){var e=[],t=Ar;function r(n){if(n!=null&&!isNaN(n=+n))return t((j0(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(rs),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>T0e(e,a/n))},r.copy=function(){return JN(t).domain(e)},va.apply(r,arguments)}function em(){var e=0,t=.5,r=1,n=1,i,a,o,l,c,u=Ar,d,x=!1,f;function h(p){return isNaN(p=+p)?f:(p=.5+((p=+d(p))-a)*(n*p<n*a?l:c),u(x?Math.max(0,Math.min(1,p)):p))}h.domain=function(p){return arguments.length?([e,t,r]=p,i=d(e=+e),a=d(t=+t),o=d(r=+r),l=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),n=a<i?-1:1,h):[e,t,r]},h.clamp=function(p){return arguments.length?(x=!!p,h):x},h.interpolator=function(p){return arguments.length?(u=p,h):u};function m(p){return function(v){var y,b,g;return arguments.length?([y,b,g]=v,u=oxe(p,[y,b,g]),h):[u(0),u(.5),u(1)]}}return h.range=m(Tc),h.rangeRound=m(mw),h.unknown=function(p){return arguments.length?(f=p,h):f},function(p){return d=p,i=p(e),a=p(t),o=p(r),l=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),n=a<i?-1:1,h}}function e7(){var e=ys(em()(Ar));return e.copy=function(){return bs(e,e7())},va.apply(e,arguments)}function t7(){var e=bw(em()).domain([.1,1,10]);return e.copy=function(){return bs(e,t7()).base(e.base())},va.apply(e,arguments)}function r7(){var e=Ew(em());return e.copy=function(){return bs(e,r7()).constant(e.constant())},va.apply(e,arguments)}function Pw(){var e=ww(em());return e.copy=function(){return bs(e,Pw()).exponent(e.exponent())},va.apply(e,arguments)}function Zfe(){return Pw.apply(null,arguments).exponent(.5)}const AA=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Bd,scaleDiverging:e7,scaleDivergingLog:t7,scaleDivergingPow:Pw,scaleDivergingSqrt:Zfe,scaleDivergingSymlog:r7,scaleIdentity:ON,scaleImplicit:fb,scaleLinear:fh,scaleLog:$N,scaleOrdinal:fw,scalePoint:$u,scalePow:Cw,scaleQuantile:RN,scaleQuantize:LN,scaleRadial:MN,scaleSequential:ZN,scaleSequentialLog:XN,scaleSequentialPow:Fw,scaleSequentialQuantile:JN,scaleSequentialSqrt:Yfe,scaleSequentialSymlog:QN,scaleSqrt:Nxe,scaleSymlog:IN,scaleThreshold:zN,scaleTime:Gfe,scaleUtc:qfe,tickFormat:PN},Symbol.toStringTag,{value:"Module"}));var Xfe=kc;function Qfe(e,t,r){for(var n=-1,i=e.length;++n<i;){var a=e[n],o=t(a);if(o!=null&&(l===void 0?o===o&&!Xfe(o):r(o,l)))var l=o,c=a}return c}var n7=Qfe;function Jfe(e,t){return e>t}var ehe=Jfe,the=n7,rhe=ehe,nhe=Oc;function ihe(e){return e&&e.length?the(e,nhe,rhe):void 0}var ahe=ihe;const Wa=qe(ahe);function she(e,t){return e<t}var ohe=she,lhe=n7,che=ohe,uhe=Oc;function dhe(e){return e&&e.length?lhe(e,uhe,che):void 0}var xhe=dhe;const tm=qe(xhe);var fhe=GE,hhe=vs,phe=dN,mhe=Kr;function ghe(e,t){var r=mhe(e)?fhe:phe;return r(e,hhe(t))}var vhe=ghe,yhe=cN,bhe=vhe;function Ehe(e,t){return yhe(bhe(e,t),1)}var whe=Ehe;const Che=qe(whe);var Ahe=lw;function jhe(e,t){return Ahe(e,t)}var khe=jhe;const Od=qe(khe);
vendor: 60,899 bytes, lines 915-941
915var $c=1e9,_he={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Tw,ht=!0,_n="[DecimalError] ",io=_n+"Invalid argument: ",Ow=_n+"Exponent out of range: ",Ic=Math.floor,$s=Math.pow,She=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Jr,Yt=1e7,lt=7,i7=9007199254740991,gh=Ic(i7/lt),be={};be.absoluteValue=be.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};be.comparedTo=be.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};be.decimalPlaces=be.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*lt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};be.dividedBy=be.div=function(e){return Xi(this,new this.constructor(e))};be.dividedToIntegerBy=be.idiv=function(e){var t=this,r=t.constructor;return Qe(Xi(t,new r(e),0,1),r.precision)};be.equals=be.eq=function(e){return!this.cmp(e)};be.exponent=function(){return Tt(this)};be.greaterThan=be.gt=function(e){return this.cmp(e)>0};be.greaterThanOrEqualTo=be.gte=function(e){return this.cmp(e)>=0};be.isInteger=be.isint=function(){return this.e>this.d.length-2};be.isNegative=be.isneg=function(){return this.s<0};be.isPositive=be.ispos=function(){return this.s>0};be.isZero=function(){return this.s===0};be.lessThan=be.lt=function(e){return this.cmp(e)<0};be.lessThanOrEqualTo=be.lte=function(e){return this.cmp(e)<1};be.logarithm=be.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Jr))throw Error(_n+"NaN");if(r.s<1)throw Error(_n+(r.s?"NaN":"-Infinity"));return r.eq(Jr)?new n(0):(ht=!1,t=Xi(Td(r,a),Td(e,a),a),ht=!0,Qe(t,i))};be.minus=be.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?o7(t,e):a7(t,(e.s=-e.s,e))};be.modulo=be.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(_n+"NaN");return r.s?(ht=!1,t=Xi(r,e,0,1).times(e),ht=!0,r.minus(t)):Qe(new n(r),i)};be.naturalExponential=be.exp=function(){return s7(this)};be.naturalLogarithm=be.ln=function(){return Td(this)};be.negated=be.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};be.plus=be.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?a7(t,e):o7(t,(e.s=-e.s,e))};be.precision=be.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(io+e);if(t=Tt(i)+1,n=i.d.length-1,r=n*lt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};be.squareRoot=be.sqrt=function(){var e,t,r,n,i,a,o,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(_n+"NaN")}for(e=Tt(l),ht=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=gi(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Ic((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new c(t)):n=new c(i.toString()),r=c.precision,i=o=r+3;;)if(a=n,n=a.plus(Xi(l,a,o+2)).times(.5),gi(a.d).slice(0,o)===(t=gi(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Qe(a,r+1,0),a.times(a).eq(l)){n=a;break}}else if(t!="9999")break;o+=4}return ht=!0,Qe(n,r)};be.times=be.mul=function(e){var t,r,n,i,a,o,l,c,u,d=this,x=d.constructor,f=d.d,h=(e=new x(e)).d;if(!d.s||!e.s)return new x(0);for(e.s*=d.s,r=d.e+e.e,c=f.length,u=h.length,c<u&&(a=f,f=h,h=a,o=c,c=u,u=o),a=[],o=c+u,n=o;n--;)a.push(0);for(n=u;--n>=0;){for(t=0,i=c+n;i>n;)l=a[i]+h[n]*f[i-n-1]+t,a[i--]=l%Yt|0,t=l/Yt|0;a[i]=(a[i]+t)%Yt|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,ht?Qe(e,x.precision):e};be.toDecimalPlaces=be.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Si(e,0,$c),t===void 0?t=n.rounding:Si(t,0,8),Qe(r,e+Tt(r)+1,t))};be.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=bo(n,!0):(Si(e,0,$c),t===void 0?t=i.rounding:Si(t,0,8),n=Qe(new i(n),e+1,t),r=bo(n,!0,e+1)),r};be.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?bo(i):(Si(e,0,$c),t===void 0?t=a.rounding:Si(t,0,8),n=Qe(new a(i),e+Tt(i)+1,t),r=bo(n.abs(),!1,e+Tt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};be.toInteger=be.toint=function(){var e=this,t=e.constructor;return Qe(new t(e),Tt(e)+1,t.rounding)};be.toNumber=function(){return+this};be.toPower=be.pow=function(e){var t,r,n,i,a,o,l=this,c=l.constructor,u=12,d=+(e=new c(e));if(!e.s)return new c(Jr);if(l=new c(l),!l.s){if(e.s<1)throw Error(_n+"Infinity");return l}if(l.eq(Jr))return l;if(n=c.precision,e.eq(Jr))return Qe(l,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=l.s,o){if((r=d<0?-d:d)<=i7){for(i=new c(Jr),t=Math.ceil(n/lt+4),ht=!1;r%2&&(i=i.times(l),kA(i.d,t)),r=Ic(r/2),r!==0;)l=l.times(l),kA(l.d,t);return ht=!0,e.s<0?new c(Jr).div(i):Qe(i,n)}}else if(a<0)throw Error(_n+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,ht=!1,i=e.times(Td(l,n+u)),ht=!0,i=s7(i),i.s=a,i};be.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=Tt(i),n=bo(i,r<=a.toExpNeg||r>=a.toExpPos)):(Si(e,1,$c),t===void 0?t=a.rounding:Si(t,0,8),i=Qe(new a(i),e,t),r=Tt(i),n=bo(i,e<=r||r<=a.toExpNeg,e)),n};be.toSignificantDigits=be.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Si(e,1,$c),t===void 0?t=n.rounding:Si(t,0,8)),Qe(new n(r),e,t)};be.toString=be.valueOf=be.val=be.toJSON=be[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Tt(e),r=e.constructor;return bo(e,t<=r.toExpNeg||t>=r.toExpPos)};function a7(e,t){var r,n,i,a,o,l,c,u,d=e.constructor,x=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),ht?Qe(t,x):t;if(c=e.d,u=t.d,o=e.e,i=t.e,c=c.slice(),a=o-i,a){for(a<0?(n=c,a=-a,l=u.length):(n=u,i=o,l=c.length),o=Math.ceil(x/lt),l=o>l?o+1:l+1,a>l&&(a=l,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(l=c.length,a=u.length,l-a<0&&(a=l,n=u,u=c,c=n),r=0;a;)r=(c[--a]=c[a]+u[a]+r)/Yt|0,c[a]%=Yt;for(r&&(c.unshift(r),++i),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=i,ht?Qe(t,x):t}function Si(e,t,r){if(e!==~~e||e<t||e>r)throw Error(io+e)}function gi(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)n=e[t]+"",r=lt-n.length,r&&(a+=Na(r)),a+=n;o=e[t],n=o+"",r=lt-n.length,r&&(a+=Na(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var Xi=function(){function e(n,i){var a,o=0,l=n.length;for(n=n.slice();l--;)a=n[l]*i+o,n[l]=a%Yt|0,o=a/Yt|0;return o&&n.unshift(o),n}function t(n,i,a,o){var l,c;if(a!=o)c=a>o?1:-1;else for(l=c=0;l<a;l++)if(n[l]!=i[l]){c=n[l]>i[l]?1:-1;break}return c}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*Yt+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var l,c,u,d,x,f,h,m,p,v,y,b,g,w,E,C,j,S,_=n.constructor,O=n.s==i.s?1:-1,I=n.d,B=i.d;if(!n.s)return new _(n);if(!i.s)throw Error(_n+"Division by zero");for(c=n.e-i.e,j=B.length,E=I.length,h=new _(O),m=h.d=[],u=0;B[u]==(I[u]||0);)++u;if(B[u]>(I[u]||0)&&--c,a==null?b=a=_.precision:o?b=a+(Tt(n)-Tt(i))+1:b=a,b<0)return new _(0);if(b=b/lt+2|0,u=0,j==1)for(d=0,B=B[0],b++;(u<E||d)&&b--;u++)g=d*Yt+(I[u]||0),m[u]=g/B|0,d=g%B|0;else{for(d=Yt/(B[0]+1)|0,d>1&&(B=e(B,d),I=e(I,d),j=B.length,E=I.length),w=j,p=I.slice(0,j),v=p.length;v<j;)p[v++]=0;S=B.slice(),S.unshift(0),C=B[0],B[1]>=Yt/2&&++C;do d=0,l=t(B,p,j,v),l<0?(y=p[0],j!=v&&(y=y*Yt+(p[1]||0)),d=y/C|0,d>1?(d>=Yt&&(d=Yt-1),x=e(B,d),f=x.length,v=p.length,l=t(x,p,f,v),l==1&&(d--,r(x,j<f?S:B,f))):(d==0&&(l=d=1),x=B.slice()),f=x.length,f<v&&x.unshift(0),r(p,x,v),l==-1&&(v=p.length,l=t(B,p,j,v),l<1&&(d++,r(p,j<v?S:B,v))),v=p.length):l===0&&(d++,p=[0]),m[u++]=d,l&&p[0]?p[v++]=I[w]||0:(p=[I[w]],v=1);while((w++<E||p[0]!==void 0)&&b--)}return m[0]||m.shift(),h.e=c,Qe(h,o?a+Tt(h)+1:a)}}();function s7(e,t){var r,n,i,a,o,l,c=0,u=0,d=e.constructor,x=d.precision;if(Tt(e)>16)throw Error(Ow+Tt(e));if(!e.s)return new d(Jr);for(t==null?(ht=!1,l=x):l=t,o=new d(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log($s(2,u))/Math.LN10*2+5|0,l+=n,r=i=a=new d(Jr),d.precision=l;;){if(i=Qe(i.times(e),l),r=r.times(++c),o=a.plus(Xi(i,r,l)),gi(o.d).slice(0,l)===gi(a.d).slice(0,l)){for(;u--;)a=Qe(a.times(a),l);return d.precision=x,t==null?(ht=!0,Qe(a,x)):a}a=o}}function Tt(e){for(var t=e.e*lt,r=e.d[0];r>=10;r/=10)t++;return t}function zg(e,t,r){if(t>e.LN10.sd())throw ht=!0,r&&(e.precision=r),Error(_n+"LN10 precision limit exceeded");return Qe(new e(e.LN10),t)}function Na(e){for(var t="";e--;)t+="0";return t}function Td(e,t){var r,n,i,a,o,l,c,u,d,x=1,f=10,h=e,m=h.d,p=h.constructor,v=p.precision;if(h.s<1)throw Error(_n+(h.s?"NaN":"-Infinity"));if(h.eq(Jr))return new p(0);if(t==null?(ht=!1,u=v):u=t,h.eq(10))return t==null&&(ht=!0),zg(p,u);if(u+=f,p.precision=u,r=gi(m),n=r.charAt(0),a=Tt(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=gi(h.d),n=r.charAt(0),x++;a=Tt(h),n>1?(h=new p("0."+r),a++):h=new p(n+"."+r.slice(1))}else return c=zg(p,u+2,v).times(a+""),h=Td(new p(n+"."+r.slice(1)),u-f).plus(c),p.precision=v,t==null?(ht=!0,Qe(h,v)):h;for(l=o=h=Xi(h.minus(Jr),h.plus(Jr),u),d=Qe(h.times(h),u),i=3;;){if(o=Qe(o.times(d),u),c=l.plus(Xi(o,new p(i),u)),gi(c.d).slice(0,u)===gi(l.d).slice(0,u))return l=l.times(2),a!==0&&(l=l.plus(zg(p,u+2,v).times(a+""))),l=Xi(l,new p(x),u),p.precision=v,t==null?(ht=!0,Qe(l,v)):l;l=c,i+=2}}function jA(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Ic(r/lt),e.d=[],n=(r+1)%lt,r<0&&(n+=lt),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=lt;n<i;)e.d.push(+t.slice(n,n+=lt));t=t.slice(n),n=lt-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),ht&&(e.e>gh||e.e<-gh))throw Error(Ow+r)}else e.s=0,e.e=0,e.d=[0];return e}function Qe(e,t,r){var n,i,a,o,l,c,u,d,x=e.d;for(o=1,a=x[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=lt,i=t,u=x[d=0];else{if(d=Math.ceil((n+1)/lt),a=x.length,d>=a)return e;for(u=a=x[d],o=1;a>=10;a/=10)o++;n%=lt,i=n-lt+o}if(r!==void 0&&(a=$s(10,o-i-1),l=u/a%10|0,c=t<0||x[d+1]!==void 0||u%a,c=r<4?(l||c)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||c||r==6&&(n>0?i>0?u/$s(10,o-i):0:x[d-1])%10&1||r==(e.s<0?8:7))),t<1||!x[0])return c?(a=Tt(e),x.length=1,t=t-a-1,x[0]=$s(10,(lt-t%lt)%lt),e.e=Ic(-t/lt)||0):(x.length=1,x[0]=e.e=e.s=0),e;if(n==0?(x.length=d,a=1,d--):(x.length=d+1,a=$s(10,lt-n),x[d]=i>0?(u/$s(10,o-i)%$s(10,i)|0)*a:0),c)for(;;)if(d==0){(x[0]+=a)==Yt&&(x[0]=1,++e.e);break}else{if(x[d]+=a,x[d]!=Yt)break;x[d--]=0,a=1}for(n=x.length;x[--n]===0;)x.pop();if(ht&&(e.e>gh||e.e<-gh))throw Error(Ow+Tt(e));return e}function o7(e,t){var r,n,i,a,o,l,c,u,d,x,f=e.constructor,h=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),ht?Qe(t,h):t;if(c=e.d,x=t.d,n=t.e,u=e.e,c=c.slice(),o=u-n,o){for(d=o<0,d?(r=c,o=-o,l=x.length):(r=x,n=u,l=c.length),i=Math.max(Math.ceil(h/lt),l)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=c.length,l=x.length,d=i<l,d&&(l=i),i=0;i<l;i++)if(c[i]!=x[i]){d=c[i]<x[i];break}o=0}for(d&&(r=c,c=x,x=r,t.s=-t.s),l=c.length,i=x.length-l;i>0;--i)c[l++]=0;for(i=x.length;i>o;){if(c[--i]<x[i]){for(a=i;a&&c[--a]===0;)c[a]=Yt-1;--c[a],c[i]+=Yt}c[i]-=x[i]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,ht?Qe(t,h):t):new f(0)}function bo(e,t,r){var n,i=Tt(e),a=gi(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+Na(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Na(-i-1)+a,r&&(n=r-o)>0&&(a+=Na(n))):i>=o?(a+=Na(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+Na(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=Na(n))),e.s<0?"-"+a:a}function kA(e,t){if(e.length>t)return e.length=t,!0}function l7(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(io+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return jA(o,a.toString())}else if(typeof a!="string")throw Error(io+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,She.test(a))jA(o,a);else throw Error(io+a)}if(i.prototype=be,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=l7,i.config=i.set=Bhe,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function Bhe(e){if(!e||typeof e!="object")throw Error(_n+"Object expected");var t,r,n,i=["precision",1,$c,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Ic(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(io+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(io+r+": "+n);return this}var Tw=l7(_he);Jr=new Tw(1);const Xe=Tw;function Nhe(e){return Ohe(e)||Phe(e)||Fhe(e)||Dhe()}function Dhe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 916In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fhe(e,t){if(e){if(typeof e=="string")return gb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gb(e,t)}}function Phe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Ohe(e){if(Array.isArray(e))return gb(e)}function gb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var The=function(t){return t},c7={"@@functional/placeholder":!0},u7=function(t){return t===c7},_A=function(t){return function r(){return arguments.length===0||arguments.length===1&&u7(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},$he=function e(t,r){return t===1?r:_A(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i.filter(function(l){return l!==c7}).length;return o>=t?r.apply(void 0,i):e(t-o,_A(function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=i.map(function(x){return u7(x)?c.shift():x});return r.apply(void 0,Nhe(d).concat(c))}))})},rm=function(t){return $he(t.length,t)},vb=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},Ihe=rm(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),Mhe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return The;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(l,c){return c(l)},a.apply(void 0,arguments))}},yb=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},d7=function(t){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r&&a.every(function(l,c){return l===r[c]})||(r=a,n=t.apply(void 0,a)),n}};function Rhe(e){var t;return e===0?t=1:t=Math.floor(new Xe(e).abs().log(10).toNumber())+1,t}function Lhe(e,t,r){for(var n=new Xe(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var zhe=rm(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),Uhe=rm(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),Whe=rm(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const nm={rangeStep:Lhe,getDigitCount:Rhe,interpolateNumber:zhe,uninterpolateNumber:Uhe,uninterpolateTruncation:Whe};function bb(e){return Vhe(e)||Khe(e)||x7(e)||Hhe()}function Hhe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 917In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Khe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Vhe(e){if(Array.isArray(e))return Eb(e)}function $d(e,t){return Yhe(e)||qhe(e,t)||x7(e,t)||Ghe()}function Ghe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 918In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x7(e,t){if(e){if(typeof e=="string")return Eb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Eb(e,t)}}function Eb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function qhe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(n=(l=o.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(c){i=!0,a=c}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function Yhe(e){if(Array.isArray(e))return e}function f7(e){var t=$d(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function h7(e,t,r){if(e.lte(0))return new Xe(0);var n=nm.getDigitCount(e.toNumber()),i=new Xe(10).pow(n),a=e.div(i),o=n!==1?.05:.1,l=new Xe(Math.ceil(a.div(o).toNumber())).add(r).mul(o),c=l.mul(i);return t?c:new Xe(Math.ceil(c))}function Zhe(e,t,r){var n=1,i=new Xe(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new Xe(10).pow(nm.getDigitCount(e)-1),i=new Xe(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Xe(Math.floor(e)))}else e===0?i=new Xe(Math.floor((t-1)/2)):r||(i=new Xe(Math.floor(e)));var o=Math.floor((t-1)/2),l=Mhe(Ihe(function(c){return i.add(new Xe(c-o).mul(n)).toNumber()}),vb);return l(0,t)}function p7(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Xe(0),tickMin:new Xe(0),tickMax:new Xe(0)};var a=h7(new Xe(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new Xe(0):(o=new Xe(e).add(t).div(2),o=o.sub(new Xe(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),c=Math.ceil(new Xe(t).sub(o).div(a).toNumber()),u=l+c+1;return u>r?p7(e,t,r,n,i+1):(u<r&&(c=t>0?c+(r-u):c,l=t>0?l:l+(r-u)),{step:a,tickMin:o.sub(new Xe(l).mul(a)),tickMax:o.add(new Xe(c).mul(a))})}function Xhe(e){var t=$d(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),l=f7([r,n]),c=$d(l,2),u=c[0],d=c[1];if(u===-1/0||d===1/0){var x=d===1/0?[u].concat(bb(vb(0,i-1).map(function(){return 1/0}))):[].concat(bb(vb(0,i-1).map(function(){return-1/0})),[d]);return r>n?yb(x):x}if(u===d)return Zhe(u,i,a);var f=p7(u,d,o,a),h=f.step,m=f.tickMin,p=f.tickMax,v=nm.rangeStep(m,p.add(new Xe(.1).mul(h)),h);return r>n?yb(v):v}function Qhe(e,t){var r=$d(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=f7([n,i]),l=$d(o,2),c=l[0],u=l[1];if(c===-1/0||u===1/0)return[n,i];if(c===u)return[c];var d=Math.max(t,2),x=h7(new Xe(u).sub(c).div(d-1),a,0),f=[].concat(bb(nm.rangeStep(new Xe(c),new Xe(u).sub(new Xe(.99).mul(x)),x)),[u]);return n>i?yb(f):f}var Jhe=d7(Xhe),epe=d7(Qhe),tpe="Invariant failed";function Eo(e,t){throw new Error(tpe)}var rpe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function rc(e){"@babel/helpers - typeof";return rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rc(e)}function vh(){return vh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vh.apply(this,arguments)}function npe(e,t){return ope(e)||spe(e,t)||ape(e,t)||ipe()}function ipe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 919In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ape(e,t){if(e){if(typeof e=="string")return SA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return SA(e,t)}}function SA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function spe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function ope(e){if(Array.isArray(e))return e}function lpe(e,t){if(e==null)return{};var r=cpe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cpe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function upe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dpe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v7(n.key),n)}}function xpe(e,t,r){return t&&dpe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function fpe(e,t,r){return t=yh(t),hpe(e,m7()?Reflect.construct(t,r||[],yh(e).constructor):t.apply(e,r))}function hpe(e,t){if(t&&(rc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ppe(e)}function ppe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(m7=function(){return!!e})()}function yh(e){return yh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yh(e)}function mpe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wb(e,t)}function wb(e,t){return wb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},wb(e,t)}function g7(e,t,r){return t=v7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v7(e){var t=gpe(e,"string");return rc(t)=="symbol"?t:t+""}function gpe(e,t){if(rc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(rc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var im=function(e){function t(){return upe(this,t),fpe(this,t,arguments)}return mpe(t,e),xpe(t,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,o=n.width,l=n.dataKey,c=n.data,u=n.dataPointFormatter,d=n.xAxis,x=n.yAxis,f=lpe(n,rpe),h=Te(f,!1);this.props.direction==="x"&&d.type!=="number"&&Eo();var m=c.map(function(p){var v=u(p,l),y=v.x,b=v.y,g=v.value,w=v.errorVal;if(!w)return null;var E=[],C,j;if(Array.isArray(w)){var S=npe(w,2);C=S[0],j=S[1]}else C=j=w;if(a==="vertical"){var _=d.scale,O=b+i,I=O+o,B=O-o,T=_(g-C),k=_(g+j);E.push({x1:k,y1:I,x2:k,y2:B}),E.push({x1:T,y1:O,x2:k,y2:O}),E.push({x1:T,y1:I,x2:T,y2:B})}else if(a==="horizontal"){var $=x.scale,W=y+i,z=W-o,L=W+o,F=$(g-C),U=$(g+j);E.push({x1:z,y1:U,x2:L,y2:U}),E.push({x1:W,y1:F,x2:W,y2:U}),E.push({x1:z,y1:F,x2:L,y2:F})}return q.createElement(vt,vh({className:"recharts-errorBar",key:"bar-".concat(E.map(function(D){return"".concat(D.x1,"-").concat(D.x2,"-").concat(D.y1,"-").concat(D.y2)}))},h),E.map(function(D){return q.createElement("line",vh({},D,{key:"line-".concat(D.x1,"-").concat(D.x2,"-").concat(D.y1,"-").concat(D.y2)}))}))});return q.createElement(vt,{className:"recharts-errorBars"},m)}}])}(q.Component);g7(im,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});g7(im,"displayName","ErrorBar");function Id(e){"@babel/helpers - typeof";return Id=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Id(e)}function BA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ss(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BA(Object(r),!0).forEach(function(n){vpe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vpe(e,t,r){return t=ype(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ype(e){var t=bpe(e,"string");return Id(t)=="symbol"?t:t+""}function bpe(e,t){if(Id(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Id(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var y7=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=Yr(r,Cl);if(!o)return null;var l=Cl.defaultProps,c=l!==void 0?Ss(Ss({},l),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:a==="children"?u=(n||[]).reduce(function(d,x){var f=x.item,h=x.props,m=h.sectors||h.data||[];return d.concat(m.map(function(p){return{type:o.props.iconType||f.props.legendType,value:p.name,color:p.fill,payload:p}}))},[]):u=(n||[]).map(function(d){var x=d.item,f=x.type.defaultProps,h=f!==void 0?Ss(Ss({},f),x.props):{},m=h.dataKey,p=h.name,v=h.legendType,y=h.hide;return{inactive:y,dataKey:m,type:c.iconType||v||"square",color:$w(x),value:p||m,payload:h}}),Ss(Ss(Ss({},c),Cl.getWithHeight(o,i)),{},{payload:u,item:o})};function Md(e){"@babel/helpers - typeof";return Md=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Md(e)}function NA(e){return Ape(e)||Cpe(e)||wpe(e)||Epe()}function Epe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 920In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wpe(e,t){if(e){if(typeof e=="string")return Cb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Cb(e,t)}}function Cpe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ape(e){if(Array.isArray(e))return Cb(e)}function Cb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function DA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DA(Object(r),!0).forEach(function(n){jl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jl(e,t,r){return t=jpe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jpe(e){var t=kpe(e,"string");return Md(t)=="symbol"?t:t+""}function kpe(e,t){if(Md(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Md(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function an(e,t,r){return Ie(e)||Ie(t)?r:Wt(t)?Cn(e,t,r):Pe(t)?t(e):r}function Iu(e,t,r,n){var i=Che(e,function(l){return an(l,t)});if(r==="number"){var a=i.filter(function(l){return me(l)||parseFloat(l)});return a.length?[tm(a),Wa(a)]:[1/0,-1/0]}var o=n?i.filter(function(l){return!Ie(l)}):i;return o.map(function(l){return Wt(l)||l instanceof Date?l:""})}var _pe=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,u=0;u<l;u++){var d=u>0?i[u-1].coordinate:i[l-1].coordinate,x=i[u].coordinate,f=u>=l-1?i[0].coordinate:i[u+1].coordinate,h=void 0;if(Yn(x-d)!==Yn(f-x)){var m=[];if(Yn(f-x)===Yn(c[1]-c[0])){h=f;var p=x+c[1]-c[0];m[0]=Math.min(p,(p+d)/2),m[1]=Math.max(p,(p+d)/2)}else{h=d;var v=f+c[1]-c[0];m[0]=Math.min(x,(v+x)/2),m[1]=Math.max(x,(v+x)/2)}var y=[Math.min(x,(h+x)/2),Math.max(x,(h+x)/2)];if(t>y[0]&&t<=y[1]||t>=m[0]&&t<=m[1]){o=i[u].index;break}}else{var b=Math.min(d,f),g=Math.max(d,f);if(t>(b+x)/2&&t<=(g+x)/2){o=i[u].index;break}}}else for(var w=0;w<l;w++)if(w===0&&t<=(n[w].coordinate+n[w+1].coordinate)/2||w>0&&w<l-1&&t>(n[w].coordinate+n[w-1].coordinate)/2&&t<=(n[w].coordinate+n[w+1].coordinate)/2||w===l-1&&t>(n[w].coordinate+n[w-1].coordinate)/2){o=n[w].index;break}return o},$w=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?kt(kt({},t.type.defaultProps),t.props):t.props,o=a.stroke,l=a.fill,c;switch(i){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:l;break;default:c=l;break}return c},Spe=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},l=Object.keys(a),c=0,u=l.length;c<u;c++)for(var d=a[l[c]].stackGroups,x=Object.keys(d),f=0,h=x.length;f<h;f++){var m=d[x[f]],p=m.items,v=m.cateAxisId,y=p.filter(function(j){return qi(j.type).indexOf("Bar")>=0});if(y&&y.length){var b=y[0].type.defaultProps,g=b!==void 0?kt(kt({},b),y[0].props):y[0].props,w=g.barSize,E=g[v];o[E]||(o[E]=[]);var C=Ie(w)?r:w;o[E].push({item:y[0],stackList:y.slice(1),barSize:Ie(C)?void 0:yo(C,n,0)})}}return o},Bpe=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,l=t.maxBarSize,c=o.length;if(c<1)return null;var u=yo(r,i,0,!0),d,x=[];if(o[0].barSize===+o[0].barSize){var f=!1,h=i/c,m=o.reduce(function(w,E){return w+E.barSize||0},0);m+=(c-1)*u,m>=i&&(m-=(c-1)*u,u=0),m>=i&&h>0&&(f=!0,h*=.9,m=c*h);var p=(i-m)/2>>0,v={offset:p-u,size:0};d=o.reduce(function(w,E){var C={item:E.item,position:{offset:v.offset+v.size+u,size:f?h:E.barSize}},j=[].concat(NA(w),[C]);return v=j[j.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(S){j.push({item:S,position:v})}),j},x)}else{var y=yo(n,i,0,!0);i-2*y-(c-1)*u<=0&&(u=0);var b=(i-2*y-(c-1)*u)/c;b>1&&(b>>=0);var g=l===+l?Math.min(b,l):b;d=o.reduce(function(w,E,C){var j=[].concat(NA(w),[{item:E.item,position:{offset:y+(b+u)*C+(b-g)/2,size:g}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(S){j.push({item:S,position:j[j.length-1].position})}),j},x)}return d},Npe=function(t,r,n,i){var a=n.children,o=n.width,l=n.margin,c=o-(l.left||0)-(l.right||0),u=y7({children:a,legendWidth:c});if(u){var d=i||{},x=d.width,f=d.height,h=u.align,m=u.verticalAlign,p=u.layout;if((p==="vertical"||p==="horizontal"&&m==="middle")&&h!=="center"&&me(t[h]))return kt(kt({},t),{},jl({},h,t[h]+(x||0)));if((p==="horizontal"||p==="vertical"&&h==="center")&&m!=="middle"&&me(t[m]))return kt(kt({},t),{},jl({},m,t[m]+(f||0)))}return t},Dpe=function(t,r,n){return Ie(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},b7=function(t,r,n,i,a){var o=r.props.children,l=Jn(o,im).filter(function(u){return Dpe(i,a,u.props.direction)});if(l&&l.length){var c=l.map(function(u){return u.props.dataKey});return t.reduce(function(u,d){var x=an(d,n);if(Ie(x))return u;var f=Array.isArray(x)?[tm(x),Wa(x)]:[x,x],h=c.reduce(function(m,p){var v=an(d,p,0),y=f[0]-Math.abs(Array.isArray(v)?v[0]:v),b=f[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(y,m[0]),Math.max(b,m[1])]},[1/0,-1/0]);return[Math.min(h[0],u[0]),Math.max(h[1],u[1])]},[1/0,-1/0])}return null},Fpe=function(t,r,n,i,a){var o=r.map(function(l){return b7(t,l,n,a,i)}).filter(function(l){return!Ie(l)});return o&&o.length?o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},E7=function(t,r,n,i,a){var o=r.map(function(c){var u=c.props.dataKey;return n==="number"&&u&&b7(t,c,u,i)||Iu(t,u,n,a)});if(n==="number")return o.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var l={};return o.reduce(function(c,u){for(var d=0,x=u.length;d<x;d++)l[u[d]]||(l[u[d]]=!0,c.push(u[d]));return c},[])},w7=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},C7=function(t,r,n,i){if(i)return t.map(function(c){return c.coordinate});var a,o,l=t.map(function(c){return c.coordinate===r&&(a=!0),c.coordinate===n&&(o=!0),c.coordinate});return a||l.push(r),o||l.push(n),l},Ki=function(t,r,n){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,l=t.range,c=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(r||n)&&o==="category"&&i.bandwidth?i.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?Yn(l[0]-l[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(x){var f=a?a.indexOf(x):x;return{coordinate:i(f)+u,value:x,offset:u}});return d.filter(function(x){return!Dc(x.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(x,f){return{coordinate:i(x)+u,value:x,index:f,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(x){return{coordinate:i(x)+u,value:x,offset:u}}):i.domain().map(function(x,f){return{coordinate:i(x)+u,value:a?a[x]:x,index:f,offset:u}})},Ug=new WeakMap,wx=function(t,r){if(typeof r!="function")return t;Ug.has(t)||Ug.set(t,new WeakMap);var n=Ug.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},Ppe=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,l=t.axisType;if(i==="auto")return o==="radial"&&l==="radiusAxis"?{scale:Bd(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:fh(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:$u(),realScaleType:"point"}:a==="category"?{scale:Bd(),realScaleType:"band"}:{scale:fh(),realScaleType:"linear"};if(vo(i)){var c="scale".concat(Up(i));return{scale:(AA[c]||$u)(),realScaleType:AA[c]?c:"point"}}return Pe(i)?{scale:i}:{scale:$u(),realScaleType:"point"}},FA=1e-4,Ope=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-FA,o=Math.max(i[0],i[1])+FA,l=t(r[0]),c=t(r[n-1]);(l<a||l>o||c<a||c>o)&&t.domain([r[0],r[n-1]])}},Tpe=function(t,r){if(!t)return null;for(var n=0,i=t.length;n<i;n++)if(t[n].item===r)return t[n].position;return null},$pe=function(t,r){if(!r||r.length!==2||!me(r[0])||!me(r[1]))return t;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[t[0],t[1]];return(!me(t[0])||t[0]<n)&&(a[0]=n),(!me(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},Ipe=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0,l=0;l<r;++l){var c=Dc(t[l][n][1])?t[l][n][0]:t[l][n][1];c>=0?(t[l][n][0]=a,t[l][n][1]=a+c,a=t[l][n][1]):(t[l][n][0]=o,t[l][n][1]=o+c,o=t[l][n][1])}},Mpe=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0;o<r;++o){var l=Dc(t[o][n][1])?t[o][n][0]:t[o][n][1];l>=0?(t[o][n][0]=a,t[o][n][1]=a+l,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},Rpe={sign:Ipe,expand:ene,none:ql,silhouette:tne,wiggle:rne,positive:Mpe},Lpe=function(t,r,n){var i=r.map(function(l){return l.props.dataKey}),a=Rpe[n],o=Jre().keys(i).value(function(l,c){return+an(l,c,0)}).order(qy).offset(a);return o(t)},zpe=function(t,r,n,i,a,o){if(!t)return null;var l=o?r.reverse():r,c={},u=l.reduce(function(x,f){var h,m=(h=f.type)!==null&&h!==void 0&&h.defaultProps?kt(kt({},f.type.defaultProps),f.props):f.props,p=m.stackId,v=m.hide;if(v)return x;var y=m[n],b=x[y]||{hasStack:!1,stackGroups:{}};if(Wt(p)){var g=b.stackGroups[p]||{numericAxisId:n,cateAxisId:i,items:[]};g.items.push(f),b.hasStack=!0,b.stackGroups[p]=g}else b.stackGroups[C0("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[f]};return kt(kt({},x),{},jl({},y,b))},c),d={};return Object.keys(u).reduce(function(x,f){var h=u[f];if(h.hasStack){var m={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(p,v){var y=h.stackGroups[v];return kt(kt({},p),{},jl({},v,{numericAxisId:n,cateAxisId:i,items:y.items,stackedData:Lpe(t,y.items,a)}))},m)}return kt(kt({},x),{},jl({},f,h))},d)},Upe=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,l=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var d=Jhe(u,a,l);return t.domain([tm(d),Wa(d)]),{niceTicks:d}}if(a&&i==="number"){var x=t.domain(),f=epe(x,a,l);return{niceTicks:f}}return null};function PA(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ie(i[t.dataKey])){var l=Hf(r,"value",i[t.dataKey]);if(l)return l.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var c=an(i,Ie(o)?t.dataKey:o);return Ie(c)?null:t.scale(c)}var OA=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,l=t.index;if(r.type==="category")return n[l]?n[l].coordinate+i:null;var c=an(o,r.dataKey,r.domain[l]);return Ie(c)?null:r.scale(c)-a/2+i},Wpe=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},Hpe=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?kt(kt({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Wt(a)){var o=r[a];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},Kpe=function(t){return t.reduce(function(r,n){return[tm(n.concat([r[0]]).filter(me)),Wa(n.concat([r[1]]).filter(me))]},[1/0,-1/0])},A7=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],l=o.stackedData,c=l.reduce(function(u,d){var x=Kpe(d.slice(r,n+1));return[Math.min(u[0],x[0]),Math.max(u[1],x[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},TA=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,$A=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ab=function(t,r,n){if(Pe(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(me(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(TA.test(t[0])){var a=+TA.exec(t[0])[1];i[0]=r[0]-a}else Pe(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(me(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if($A.test(t[1])){var o=+$A.exec(t[1])[1];i[1]=r[1]+o}else Pe(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},bh=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=uw(r,function(x){return x.coordinate}),o=1/0,l=1,c=a.length;l<c;l++){var u=a[l],d=a[l-1];o=Math.min((u.coordinate||0)-(d.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},IA=function(t,r,n){return!t||!t.length||Od(t,Cn(n,"type.defaultProps.domain"))?r:t},j7=function(t,r){var n=t.type.defaultProps?kt(kt({},t.type.defaultProps),t.props):t.props,i=n.dataKey,a=n.name,o=n.unit,l=n.formatter,c=n.tooltipType,u=n.chartType,d=n.hide;return kt(kt({},Te(t,!1)),{},{dataKey:i,unit:o,formatter:l,name:a||i,color:$w(t),value:an(r,i),type:c,payload:r,chartType:u,hide:d})};function Rd(e){"@babel/helpers - typeof";return Rd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rd(e)}function MA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function RA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MA(Object(r),!0).forEach(function(n){Vpe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vpe(e,t,r){return t=Gpe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gpe(e){var t=qpe(e,"string");return Rd(t)=="symbol"?t:t+""}function qpe(e,t){if(Rd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Rd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Eh=Math.PI/180,Ype=function(t){return t*180/Math.PI},nr=function(t,r,n,i){return{x:t+Math.cos(-Eh*i)*n,y:r+Math.sin(-Eh*i)*n}},Zpe=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},Xpe=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,l=Zpe({x:n,y:i},{x:a,y:o});if(l<=0)return{radius:l};var c=(n-a)/l,u=Math.acos(c);return i>o&&(u=2*Math.PI-u),{radius:l,angle:Ype(u),angleInRadian:u}},Qpe=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},Jpe=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),l=Math.min(a,o);return t+l*360},LA=function(t,r){var n=t.x,i=t.y,a=Xpe({x:n,y:i},r),o=a.radius,l=a.angle,c=r.innerRadius,u=r.outerRadius;if(o<c||o>u)return!1;if(o===0)return!0;var d=Qpe(r),x=d.startAngle,f=d.endAngle,h=l,m;if(x<=f){for(;h>f;)h-=360;for(;h<x;)h+=360;m=h>=x&&h<=f}else{for(;h>x;)h-=360;for(;h<f;)h+=360;m=h>=f&&h<=x}return m?RA(RA({},r),{},{radius:o,angle:Jpe(h,r)}):null};function Ld(e){"@babel/helpers - typeof";return Ld=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ld(e)}var eme=["offset"];function tme(e){return ame(e)||ime(e)||nme(e)||rme()}function rme(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 921In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nme(e,t){if(e){if(typeof e=="string")return jb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jb(e,t)}}function ime(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ame(e){if(Array.isArray(e))return jb(e)}function jb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function sme(e,t){if(e==null)return{};var r=ome(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ome(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function zA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zA(Object(r),!0).forEach(function(n){lme(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lme(e,t,r){return t=cme(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cme(e){var t=ume(e,"string");return Ld(t)=="symbol"?t:t+""}function ume(e,t){if(Ld(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ld(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zd(){return zd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zd.apply(this,arguments)}var dme=function(t){var r=t.value,n=t.formatter,i=Ie(t.children)?r:t.children;return Pe(n)?n(i):i},xme=function(t,r){var n=Yn(r-t),i=Math.min(Math.abs(r-t),360);return n*i},fme=function(t,r,n){var i=t.position,a=t.viewBox,o=t.offset,l=t.className,c=a,u=c.cx,d=c.cy,x=c.innerRadius,f=c.outerRadius,h=c.startAngle,m=c.endAngle,p=c.clockWise,v=(x+f)/2,y=xme(h,m),b=y>=0?1:-1,g,w;i==="insideStart"?(g=h+b*o,w=p):i==="insideEnd"?(g=m-b*o,w=!p):i==="end"&&(g=m+b*o,w=p),w=y<=0?w:!w;var E=nr(u,d,v,g),C=nr(u,d,v,g+(w?1:-1)*359),j="M".concat(E.x,",").concat(E.y,` 922 A`).concat(v,",").concat(v,",0,1,").concat(w?0:1,`, 923 `).concat(C.x,",").concat(C.y),S=Ie(t.id)?C0("recharts-radial-line-"):t.id;return q.createElement("text",zd({},n,{dominantBaseline:"central",className:Me("recharts-radial-bar-label",l)}),q.createElement("defs",null,q.createElement("path",{id:S,d:j})),q.createElement("textPath",{xlinkHref:"#".concat(S)},r))},hme=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,l=a.cy,c=a.innerRadius,u=a.outerRadius,d=a.startAngle,x=a.endAngle,f=(d+x)/2;if(i==="outside"){var h=nr(o,l,u+n,f),m=h.x,p=h.y;return{x:m,y:p,textAnchor:m>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var v=(c+u)/2,y=nr(o,l,v,f),b=y.x,g=y.y;return{x:b,y:g,textAnchor:"middle",verticalAnchor:"middle"}},pme=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,l=o.x,c=o.y,u=o.width,d=o.height,x=d>=0?1:-1,f=x*i,h=x>0?"end":"start",m=x>0?"start":"end",p=u>=0?1:-1,v=p*i,y=p>0?"end":"start",b=p>0?"start":"end";if(a==="top"){var g={x:l+u/2,y:c-x*i,textAnchor:"middle",verticalAnchor:h};return Rt(Rt({},g),n?{height:Math.max(c-n.y,0),width:u}:{})}if(a==="bottom"){var w={x:l+u/2,y:c+d+f,textAnchor:"middle",verticalAnchor:m};return Rt(Rt({},w),n?{height:Math.max(n.y+n.height-(c+d),0),width:u}:{})}if(a==="left"){var E={x:l-v,y:c+d/2,textAnchor:y,verticalAnchor:"middle"};return Rt(Rt({},E),n?{width:Math.max(E.x-n.x,0),height:d}:{})}if(a==="right"){var C={x:l+u+v,y:c+d/2,textAnchor:b,verticalAnchor:"middle"};return Rt(Rt({},C),n?{width:Math.max(n.x+n.width-C.x,0),height:d}:{})}var j=n?{width:u,height:d}:{};return a==="insideLeft"?Rt({x:l+v,y:c+d/2,textAnchor:b,verticalAnchor:"middle"},j):a==="insideRight"?Rt({x:l+u-v,y:c+d/2,textAnchor:y,verticalAnchor:"middle"},j):a==="insideTop"?Rt({x:l+u/2,y:c+f,textAnchor:"middle",verticalAnchor:m},j):a==="insideBottom"?Rt({x:l+u/2,y:c+d-f,textAnchor:"middle",verticalAnchor:h},j):a==="insideTopLeft"?Rt({x:l+v,y:c+f,textAnchor:b,verticalAnchor:m},j):a==="insideTopRight"?Rt({x:l+u-v,y:c+f,textAnchor:y,verticalAnchor:m},j):a==="insideBottomLeft"?Rt({x:l+v,y:c+d-f,textAnchor:b,verticalAnchor:h},j):a==="insideBottomRight"?Rt({x:l+u-v,y:c+d-f,textAnchor:y,verticalAnchor:h},j):_c(a)&&(me(a.x)||Ws(a.x))&&(me(a.y)||Ws(a.y))?Rt({x:l+yo(a.x,u),y:c+yo(a.y,d),textAnchor:"end",verticalAnchor:"end"},j):Rt({x:l+u/2,y:c+d/2,textAnchor:"middle",verticalAnchor:"middle"},j)},mme=function(t){return"cx"in t&&me(t.cx)};function hr(e){var t=e.offset,r=t===void 0?5:t,n=sme(e,eme),i=Rt({offset:r},n),a=i.viewBox,o=i.position,l=i.value,c=i.children,u=i.content,d=i.className,x=d===void 0?"":d,f=i.textBreakAll;if(!a||Ie(l)&&Ie(c)&&!A.isValidElement(u)&&!Pe(u))return null;if(A.isValidElement(u))return A.cloneElement(u,i);var h;if(Pe(u)){if(h=A.createElement(u,i),A.isValidElement(h))return h}else h=dme(i);var m=mme(a),p=Te(i,!0);if(m&&(o==="insideStart"||o==="insideEnd"||o==="end"))return fme(i,h,p);var v=m?hme(i):pme(i);return q.createElement(sh,zd({className:Me("recharts-label",x)},p,v,{breakAll:f}),h)}hr.displayName="Label";var k7=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,l=t.r,c=t.radius,u=t.innerRadius,d=t.outerRadius,x=t.x,f=t.y,h=t.top,m=t.left,p=t.width,v=t.height,y=t.clockWise,b=t.labelViewBox;if(b)return b;if(me(p)&&me(v)){if(me(x)&&me(f))return{x,y:f,width:p,height:v};if(me(h)&&me(m))return{x:h,y:m,width:p,height:v}}return me(x)&&me(f)?{x,y:f,width:0,height:0}:me(r)&&me(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:d||c||l||0,clockWise:y}:t.viewBox?t.viewBox:{}},gme=function(t,r){return t?t===!0?q.createElement(hr,{key:"label-implicit",viewBox:r}):Wt(t)?q.createElement(hr,{key:"label-implicit",viewBox:r,value:t}):A.isValidElement(t)?t.type===hr?A.cloneElement(t,{key:"label-implicit",viewBox:r}):q.createElement(hr,{key:"label-implicit",content:t,viewBox:r}):Pe(t)?q.createElement(hr,{key:"label-implicit",content:t,viewBox:r}):_c(t)?q.createElement(hr,zd({viewBox:r},t,{key:"label-implicit"})):null:null},vme=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=k7(t),o=Jn(i,hr).map(function(c,u){return A.cloneElement(c,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var l=gme(t.label,r||a);return[l].concat(tme(o))};hr.parseViewBox=k7;hr.renderCallByParent=vme;function yme(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var bme=yme;const Eme=qe(bme);function Ud(e){"@babel/helpers - typeof";return Ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ud(e)}var wme=["valueAccessor"],Cme=["data","dataKey","clockWise","id","textBreakAll"];function Ame(e){return Sme(e)||_me(e)||kme(e)||jme()}function jme(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 924In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kme(e,t){if(e){if(typeof e=="string")return kb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kb(e,t)}}function _me(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Sme(e){if(Array.isArray(e))return kb(e)}function kb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function wh(){return wh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wh.apply(this,arguments)}function UA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function WA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UA(Object(r),!0).forEach(function(n){Bme(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bme(e,t,r){return t=Nme(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nme(e){var t=Dme(e,"string");return Ud(t)=="symbol"?t:t+""}function Dme(e,t){if(Ud(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ud(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HA(e,t){if(e==null)return{};var r=Fme(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Fme(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Pme=function(t){return Array.isArray(t.value)?Eme(t.value):t.value};function ns(e){var t=e.valueAccessor,r=t===void 0?Pme:t,n=HA(e,wme),i=n.data,a=n.dataKey,o=n.clockWise,l=n.id,c=n.textBreakAll,u=HA(n,Cme);return!i||!i.length?null:q.createElement(vt,{className:"recharts-label-list"},i.map(function(d,x){var f=Ie(a)?r(d,x):an(d&&d.payload,a),h=Ie(l)?{}:{id:"".concat(l,"-").concat(x)};return q.createElement(hr,wh({},Te(d,!0),u,h,{parentViewBox:d.parentViewBox,value:f,textBreakAll:c,viewBox:hr.parseViewBox(Ie(o)?d:WA(WA({},d),{},{clockWise:o})),key:"label-".concat(x),index:x}))}))}ns.displayName="LabelList";function Ome(e,t){return e?e===!0?q.createElement(ns,{key:"labelList-implicit",data:t}):q.isValidElement(e)||Pe(e)?q.createElement(ns,{key:"labelList-implicit",data:t,content:e}):_c(e)?q.createElement(ns,wh({data:t},e,{key:"labelList-implicit"})):null:null}function Tme(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=Jn(n,ns).map(function(o,l){return A.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!r)return i;var a=Ome(e.label,t);return[a].concat(Ame(i))}ns.renderCallByParent=Tme;function Wd(e){"@babel/helpers - typeof";return Wd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wd(e)}function _b(){return _b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_b.apply(this,arguments)}function KA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function VA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KA(Object(r),!0).forEach(function(n){$me(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $me(e,t,r){return t=Ime(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ime(e){var t=Mme(e,"string");return Wd(t)=="symbol"?t:t+""}function Mme(e,t){if(Wd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Wd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rme=function(t,r){var n=Yn(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},Cx=function(t){var r=t.cx,n=t.cy,i=t.radius,a=t.angle,o=t.sign,l=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,d=c*(l?1:-1)+i,x=Math.asin(c/d)/Eh,f=u?a:a+o*x,h=nr(r,n,d,f),m=nr(r,n,i,f),p=u?a-o*x:a,v=nr(r,n,d*Math.cos(x*Eh),p);return{center:h,circleTangency:m,lineTangency:v,theta:x}},_7=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,l=t.endAngle,c=Rme(o,l),u=o+c,d=nr(r,n,a,o),x=nr(r,n,a,u),f="M ".concat(d.x,",").concat(d.y,` 925 A `).concat(a,",").concat(a,`,0, 926 `).concat(+(Math.abs(c)>180),",").concat(+(o>u),`, 927 `).concat(x.x,",").concat(x.y,` 928 `);if(i>0){var h=nr(r,n,i,o),m=nr(r,n,i,u);f+="L ".concat(m.x,",").concat(m.y,` 929 A `).concat(i,",").concat(i,`,0, 930 `).concat(+(Math.abs(c)>180),",").concat(+(o<=u),`, 931 `).concat(h.x,",").concat(h.y," Z")}else f+="L ".concat(r,",").concat(n," Z");return f},Lme=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,x=Yn(d-u),f=Cx({cx:r,cy:n,radius:a,angle:u,sign:x,cornerRadius:o,cornerIsExternal:c}),h=f.circleTangency,m=f.lineTangency,p=f.theta,v=Cx({cx:r,cy:n,radius:a,angle:d,sign:-x,cornerRadius:o,cornerIsExternal:c}),y=v.circleTangency,b=v.lineTangency,g=v.theta,w=c?Math.abs(u-d):Math.abs(u-d)-p-g;if(w<0)return l?"M ".concat(m.x,",").concat(m.y,` 932 a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 933 a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 934 `):_7({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:d});var E="M ".concat(m.x,",").concat(m.y,` 935 A`).concat(o,",").concat(o,",0,0,").concat(+(x<0),",").concat(h.x,",").concat(h.y,` 936 A`).concat(a,",").concat(a,",0,").concat(+(w>180),",").concat(+(x<0),",").concat(y.x,",").concat(y.y,` 937 A`).concat(o,",").concat(o,",0,0,").concat(+(x<0),",").concat(b.x,",").concat(b.y,` 938 `);if(i>0){var C=Cx({cx:r,cy:n,radius:i,angle:u,sign:x,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),j=C.circleTangency,S=C.lineTangency,_=C.theta,O=Cx({cx:r,cy:n,radius:i,angle:d,sign:-x,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),I=O.circleTangency,B=O.lineTangency,T=O.theta,k=c?Math.abs(u-d):Math.abs(u-d)-_-T;if(k<0&&o===0)return"".concat(E,"L").concat(r,",").concat(n,"Z");E+="L".concat(B.x,",").concat(B.y,` 939 A`).concat(o,",").concat(o,",0,0,").concat(+(x<0),",").concat(I.x,",").concat(I.y,` 940 A`).concat(i,",").concat(i,",0,").concat(+(k>180),",").concat(+(x>0),",").concat(j.x,",").concat(j.y,` 941 A`).concat(o,",").concat(o,",0,0,").concat(+(x<0),",").concat(S.x,",").concat(S.y,"Z")}else E+="L".concat(r,",").concat(n,"Z");return E},zme={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},S7=function(t){var r=VA(VA({},zme),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,l=r.cornerRadius,c=r.forceCornerRadius,u=r.cornerIsExternal,d=r.startAngle,x=r.endAngle,f=r.className;if(o<a||d===x)return null;var h=Me("recharts-sector",f),m=o-a,p=yo(l,m,0,!0),v;return p>0&&Math.abs(d-x)<360?v=Lme({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(p,m/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:d,endAngle:x}):v=_7({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:d,endAngle:x}),q.createElement("path",_b({},Te(r,!0),{className:h,d:v,role:"img"}))};function Hd(e){"@babel/helpers - typeof";return Hd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hd(e)}function Sb(){return Sb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sb.apply(this,arguments)}function GA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GA(Object(r),!0).forEach(function(n){Ume(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GA(Object(r)).forEac
941h(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ume(e,t,r){return t=Wme(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wme(e){var t=Hme(e,"string");return Hd(t)=="symbol"?t:t+""}function Hme(e,t){if(Hd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Hd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var YA={curveBasisClosed:Ure,curveBasisOpen:Wre,curveBasis:zre,curveBumpX:_re,curveBumpY:Sre,curveLinearClosed:Hre,curveLinear:Hp,curveMonotoneX:Kre,curveMonotoneY:Vre,curveNatural:Gre,curveStep:qre,curveStepAfter:Zre,curveStepBefore:Yre},Ax=function(t){return t.x===+t.x&&t.y===+t.y},su=function(t){return t.x},ou=function(t){return t.y},Kme=function(t,r){if(Pe(t))return t;var n="curve".concat(Up(t));return(n==="curveMonotone"||n==="curveBump")&&r?YA["".concat(n).concat(r==="vertical"?"Y":"X")]:YA[n]||Hp},Vme=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,a=i===void 0?[]:i,o=t.baseLine,l=t.layout,c=t.connectNulls,u=c===void 0?!1:c,d=Kme(n,l),x=u?a.filter(function(p){return Ax(p)}):a,f;if(Array.isArray(o)){var h=u?o.filter(function(p){return Ax(p)}):o,m=x.map(function(p,v){return qA(qA({},p),{},{base:h[v]})});return l==="vertical"?f=fx().y(ou).x1(su).x0(function(p){return p.base.x}):f=fx().x(su).y1(ou).y0(function(p){return p.base.y}),f.defined(Ax).curve(d),f(m)}return l==="vertical"&&me(o)?f=fx().y(ou).x1(su).x0(o):me(o)?f=fx().x(su).y1(ou).y0(o):f=SB().x(su).y(ou),f.defined(Ax).curve(d),f(x)},Mu=function(t){var r=t.className,n=t.points,i=t.path,a=t.pathRef;if((!n||!n.length)&&!i)return null;var o=n&&n.length?Vme(t):i;return A.createElement("path",Sb({},Te(t,!1),Kf(t),{className:Me("recharts-curve",r),d:o,ref:a}))},B7={exports:{}},Gme="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",qme=Gme,Yme=qme;function N7(){}function D7(){}D7.resetWarningCache=N7;var Zme=function(){function e(n,i,a,o,l,c){if(c!==Yme){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:D7,resetWarningCache:N7};return r.PropTypes=r,r};B7.exports=Zme();var Xme=B7.exports;const Ve=qe(Xme);var Qme=Object.getOwnPropertyNames,Jme=Object.getOwnPropertySymbols,ege=Object.prototype.hasOwnProperty;function ZA(e,t){return function(n,i,a){return e(n,i,a)&&t(n,i,a)}}function jx(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var a=i.cache,o=a.get(r),l=a.get(n);if(o&&l)return o===n&&l===r;a.set(r,n),a.set(n,r);var c=e(r,n,i);return a.delete(r),a.delete(n),c}}function XA(e){return Qme(e).concat(Jme(e))}var tge=Object.hasOwn||function(e,t){return ege.call(e,t)};function Bo(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var rge="__v",nge="__o",ige="_owner",QA=Object.getOwnPropertyDescriptor,JA=Object.keys;function age(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function sge(e,t){return Bo(e.getTime(),t.getTime())}function oge(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function lge(e,t){return e===t}function e6(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.entries(),o,l,c=0;(o=a.next())&&!o.done;){for(var u=t.entries(),d=!1,x=0;(l=u.next())&&!l.done;){if(i[x]){x++;continue}var f=o.value,h=l.value;if(r.equals(f[0],h[0],c,x,e,t,r)&&r.equals(f[1],h[1],f[0],h[0],e,t,r)){d=i[x]=!0;break}x++}if(!d)return!1;c++}return!0}var cge=Bo;function uge(e,t,r){var n=JA(e),i=n.length;if(JA(t).length!==i)return!1;for(;i-- >0;)if(!F7(e,t,r,n[i]))return!1;return!0}function lu(e,t,r){var n=XA(e),i=n.length;if(XA(t).length!==i)return!1;for(var a,o,l;i-- >0;)if(a=n[i],!F7(e,t,r,a)||(o=QA(e,a),l=QA(t,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function dge(e,t){return Bo(e.valueOf(),t.valueOf())}function xge(e,t){return e.source===t.source&&e.flags===t.flags}function t6(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.values(),o,l;(o=a.next())&&!o.done;){for(var c=t.values(),u=!1,d=0;(l=c.next())&&!l.done;){if(!i[d]&&r.equals(o.value,l.value,o.value,l.value,e,t,r)){u=i[d]=!0;break}d++}if(!u)return!1}return!0}
941function fge(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function hge(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function F7(e,t,r,n){return(n===ige||n===nge||n===rge)&&(e.$$typeof||t.$$typeof)?!0:tge(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var pge="[object Arguments]",mge="[object Boolean]",gge="[object Date]",vge="[object Error]",yge="[object Map]",bge="[object Number]",Ege="[object Object]",wge="[object RegExp]",Cge="[object Set]",Age="[object String]",jge="[object URL]",kge=Array.isArray,r6=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,n6=Object.assign,_ge=Object.prototype.toString.call.bind(Object.prototype.toString);function Sge(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,o=e.areNumbersEqual,l=e.areObjectsEqual,c=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,d=e.areSetsEqual,x=e.areTypedArraysEqual,f=e.areUrlsEqual;return function(m,p,v){if(m===p)return!0;if(m==null||p==null)return!1;var y=typeof m;if(y!==typeof p)return!1;if(y!=="object")return y==="number"?o(m,p,v):y==="function"?i(m,p,v):!1;var b=m.constructor;if(b!==p.constructor)return!1;if(b===Object)return l(m,p,v);if(kge(m))return t(m,p,v);if(r6!=null&&r6(m))return x(m,p,v);if(b===Date)return r(m,p,v);if(b===RegExp)return u(m,p,v);if(b===Map)return a(m,p,v);if(b===Set)return d(m,p,v);var g=_ge(m);return g===gge?r(m,p,v):g===wge?u(m,p,v):g===yge?a(m,p,v):g===Cge?d(m,p,v):g===Ege?typeof m.then!="function"&&typeof p.then!="function"&&l(m,p,v):g===jge?f(m,p,v):g===vge?n(m,p,v):g===pge?l(m,p,v):g===mge||g===bge||g===Age?c(m,p,v):!1}}function Bge(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?lu:age,areDatesEqual:sge,areErrorsEqual:oge,areFunctionsEqual:lge,areMapsEqual:n?ZA(e6,lu):e6,areNumbersEqual:cge,areObjectsEqual:n?lu:uge,arePrimitiveWrappersEqual:dge,areRegExpsEqual:xge,areSetsEqual:n?ZA(t6,lu):t6,areTypedArraysEqual:n?lu:fge,areUrlsEqual:hge};if(r&&(i=n6({},i,r(i))),t){var a=jx(i.areArraysEqual),o=jx(i.areMapsEqual),l=jx(i.areObjectsEqual),c=jx(i.areSetsEqual);i=n6({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:c})}return i}function Nge(e){return function(t,r,n,i,a,o,l){return e(t,r,l)}}function Dge(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,a=e.strict;if(n)return function(c,u){var d=n(),x=d.cache,f=x===void 0?t?new WeakMap:void 0:x,h=d.meta;return r(c,u,{cache:f,equals:i,meta:h,strict:a})};if(t)return function(c,u){return r(c,u,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(c,u){return r(c,u,o)}}var Fge=Es();Es({strict:!0});Es({circular:!0});Es({circular:!0,strict:!0});Es({createInternalComparator:function(){return Bo}});Es({strict:!0,createInternalComparator:function(){return Bo}});Es({circular:!0,createInternalComparator:function(){return Bo}});Es({circular:!0,createInternalComparator:function(){return Bo},strict:!0});function Es(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,l=Bge(e),c=Sge(l),u=n?n(c):Nge(c);return Dge({circular:r,comparator:c,createState:i,equals:u,strict:o})}function Pge(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function i6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):Pge(i)};requestAnimationFrame(n)}function Bb(e){"@babel/helpers - typeof";return Bb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bb(e)}function Oge(e){return Mge(e)||Ige(e)||$ge(e)||Tge()}function Tge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 942In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $ge(e,t){if(e){if(typeof e=="string")return a6(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a6(e,t)}}function a6(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ige(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Mge(e){if(Array.isArray(e))return e}function Rge(){var e={},t=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var o=a,l=Oge(o),c=l[0],u=l.slice(1);if(typeof c=="number"){i6(i.bind(null,u),c);return}i(c),i6(i.bind(null,u));return}Bb(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function Kd(e){"@babel/helpers - typeof";return Kd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kd(e)}function s6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function o6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
vendor: 158,831 bytes, lines 942-963
942t%2?s6(Object(r),!0).forEach(function(n){P7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function P7(e,t,r){return t=Lge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lge(e){var t=zge(e,"string");return Kd(t)==="symbol"?t:String(t)}function zge(e,t){if(Kd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Kd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Uge=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},Wge=function(t){return t},Hge=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Ru=function(t,r){return Object.keys(r).reduce(function(n,i){return o6(o6({},n),{},P7({},i,t(i,r[i])))},{})},l6=function(t,r,n){return t.map(function(i){return"".concat(Hge(i)," ").concat(r,"ms ").concat(n)}).join(",")};function Kge(e,t){return qge(e)||Gge(e,t)||O7(e,t)||Vge()}function Vge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 943In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gge(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function qge(e){if(Array.isArray(e))return e}function Yge(e){return Qge(e)||Xge(e)||O7(e)||Zge()}function Zge(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 944In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O7(e,t){if(e){if(typeof e=="string")return Nb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Nb(e,t)}}function Xge(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qge(e){if(Array.isArray(e))return Nb(e)}function Nb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ch=1e-4,T7=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},$7=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},c6=function(t,r){return function(n){var i=T7(t,r);return $7(i,n)}},Jge=function(t,r){return function(n){var i=T7(t,r),a=[].concat(Yge(i.map(function(o,l){return o*l}).slice(1)),[0]);return $7(a,n)}},u6=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0],a=r[1],o=r[2],l=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,o=1,l=1;break;case"ease":i=.25,a=.1,o=.25,l=1;break;case"ease-in":i=.42,a=0,o=1,l=1;break;case"ease-out":i=.42,a=0,o=.58,l=1;break;case"ease-in-out":i=0,a=0,o=.58,l=1;break;default:{var c=r[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),d=Kge(u,4);i=d[0],a=d[1],o=d[2],l=d[3]}}}var x=c6(i,o),f=c6(a,l),h=Jge(i,o),m=function(y){return y>1?1:y<0?0:y},p=function(y){for(var b=y>1?1:y,g=b,w=0;w<8;++w){var E=x(g)-b,C=h(g);if(Math.abs(E-b)<Ch||C<Ch)return f(g);g=m(g-E/C)}return f(g)};return p.isStepper=!1,p},eve=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,l=o===void 0?17:o,c=function(d,x,f){var h=-(d-x)*n,m=f*a,p=f+(h-m)*l/1e3,v=f*l/1e3+d;return Math.abs(v-x)<Ch&&Math.abs(p)<Ch?[x,0]:[v,p]};return c.isStepper=!0,c.dt=l,c},tve=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return u6(i);case"spring":return eve();default:if(i.split("(")[0]==="cubic-bezier")return u6(i)}return typeof i=="function"?i:null};function Vd(e){"@babel/helpers - typeof";return Vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vd(e)}function d6(e){return ive(e)||nve(e)||I7(e)||rve()}function rve(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 945In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ive(e){if(Array.isArray(e))return Fb(e)}function x6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x6(Object(r),!0).forEach(function(n){Db(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Db(e,t,r){return t=ave(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ave(e){var t=sve(e,"string");return Vd(t)==="symbol"?t:String(t)}function sve(e,t){if(Vd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Vd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ove(e,t){return uve(e)||cve(e,t)||I7(e,t)||lve()}function lve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 946In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I7(e,t){if(e){if(typeof e=="string")return Fb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fb(e,t)}}function Fb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function cve(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function uve(e){if(Array.isArray(e))return e}var Ah=function(t,r,n){return t+(r-t)*n},Pb=function(t){var r=t.from,n=t.to;return r!==n},dve=function e(t,r,n){var i=Ru(function(a,o){if(Pb(o)){var l=t(o.from,o.to,o.velocity),c=ove(l,2),u=c[0],d=c[1];return tr(tr({},o),{},{from:u,velocity:d})}return o},r);return n<1?Ru(function(a,o){return Pb(o)?tr(tr({},o),{},{velocity:Ah(o.velocity,i[a].velocity,n),from:Ah(o.from,i[a].from,n)}):o},r):e(t,i,n-1)};const xve=function(e,t,r,n,i){var a=Uge(e,t),o=a.reduce(function(v,y){return tr(tr({},v),{},Db({},y,[e[y],t[y]]))},{}),l=a.reduce(function(v,y){return tr(tr({},v),{},Db({},y,{from:e[y],velocity:0,to:t[y]}))},{}),c=-1,u,d,x=function(){return null},f=function(){return Ru(function(y,b){return b.from},l)},h=function(){return!Object.values(l).filter(Pb).length},m=function(y){u||(u=y);var b=y-u,g=b/r.dt;l=dve(r,l,g),i(tr(tr(tr({},e),t),f())),u=y,h()||(c=requestAnimationFrame(x))},p=function(y){d||(d=y);var b=(y-d)/n,g=Ru(function(E,C){return Ah.apply(void 0,d6(C).concat([r(b)]))},o);if(i(tr(tr(tr({},e),t),g)),b<1)c=requestAnimationFrame(x);else{var w=Ru(function(E,C){return Ah.apply(void 0,d6(C).concat([r(1)]))},o);i(tr(tr(tr({},e),t),w))}};return x=r.isStepper?m:p,function(){return requestAnimationFrame(x),function(){cancelAnimationFrame(c)}}};function nc(e){"@babel/helpers - typeof";return nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nc(e)}var fve=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function hve(e,t){if(e==null)return{};var r=pve(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pve(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Wg(e){return yve(e)||vve(e)||gve(e)||mve()}function mve(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 947In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gve(e,t){if(e){if(typeof e=="string")return Ob(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ob(e,t)}}function vve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yve(e){if(Array.isArray(e))return Ob(e)}function Ob(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function In(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?f6(Object(r),!0).forEach(function(n){vu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vu(e,t,r){return t=M7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eve(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,M7(n.key),n)}}function wve(e,t,r){return t&&Eve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function M7(e){var t=Cve(e,"string");return nc(t)==="symbol"?t:String(t)}function Cve(e,t){if(nc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(nc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ave(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tb(e,t)}function Tb(e,t){return Tb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Tb(e,t)}function jve(e){var t=kve();return function(){var n=jh(e),i;if(t){var a=jh(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return $b(this,i)}}function $b(e,t){if(t&&(nc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ib(e)}function Ib(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kve(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jh(e){return jh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},jh(e)}var da=function(e){Ave(r,e);var t=jve(r);function r(n,i){var a;bve(this,r),a=t.call(this,n,i);var o=a.props,l=o.isActive,c=o.attributeName,u=o.from,d=o.to,x=o.steps,f=o.children,h=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(Ib(a)),a.changeStyle=a.changeStyle.bind(Ib(a)),!l||h<=0)return a.state={style:{}},typeof f=="function"&&(a.state={style:d}),$b(a);if(x&&x.length)a.state={style:x[0].style};else if(u){if(typeof f=="function")return a.state={style:u},$b(a);a.state={style:c?vu({},c,u):u}}else a.state={style:{}};return a}return wve(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,l=a.canBegin,c=a.attributeName,u=a.shouldReAnimate,d=a.to,x=a.from,f=this.state.style;if(l){if(!o){var h={style:c?vu({},c,d):d};this.state&&f&&(c&&f[c]!==d||!c&&f!==d)&&this.setState(h);return}if(!(Fge(i.to,d)&&i.canBegin&&i.isActive)){var m=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var p=m||u?x:i.to;if(this.state&&f){var v={style:c?vu({},c,p):p};(c&&f[c]!==p||!c&&f!==p)&&this.setState(v)}this.runAnimation(In(In({},this.props),{},{from:p,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,l=i.to,c=i.duration,u=i.easing,d=i.begin,x=i.onAnimationEnd,f=i.onAnimationStart,h=xve(o,l,tve(u),c,this.changeStyle),m=function(){a.stopJSAnimation=h()};this.manager.start([f,d,m,c,x])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,l=i.begin,c=i.onAnimationStart,u=o[0],d=u.style,x=u.duration,f=x===void 0?0:x,h=function(p,v,y){if(y===0)return p;var b=v.duration,g=v.easing,w=g===void 0?"ease":g,E=v.style,C=v.properties,j=v.onAnimationEnd,S=y>0?o[y-1]:v,_=C||Object.keys(E);if(typeof w=="function"||w==="spring")return[].concat(Wg(p),[a.runJSAnimation.bind(a,{from:S.style,to:E,duration:b,easing:w}),b]);var O=l6(_,b,w),I=In(In(In({},S.style),E),{},{transition:O});return[].concat(Wg(p),[I,b,j]).filter(Wge)};return this.manager.start([c].concat(Wg(o.reduce(h,[d,Math.max(f,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Rge());var a=i.begin,o=i.duration,l=i.attributeName,c=i.to,u=i.easing,d=i.onAnimationStart,x=i.onAnimationEnd,f=i.steps,h=i.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof u=="function"||typeof h=="function"||u==="spring"){this.runJSAnimation(i);return}if(f.length>1){this.runStepAnimation(i);return}var p=l?vu({},l,c):c,v=l6(Object.keys(p),o,u);m.start([d,a,In(In({},p),{},{transition:v}),o,x])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=hve(i,fve),u=A.Children.count(a),d=this.state.style;if(typeof a=="function")return a(d);if(!l||u===0||o<=0)return a;var x=function(h){var m=h.props,p=m.style,v=p===void 0?{}:p,y=m.className,b=A.cloneElement(h,In(In({},c),{},{style:In(In({},v),d),className:y}));return b};return u===1?x(A.Children.only(a)):q.createElement("div",null,A.Children.map(a,function(f){return x(f)}))}}]),r}(A.PureComponent);da.displayName="Animate";da.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};da.propTypes={from:Ve.oneOfType([Ve.object,Ve.string]),to:Ve.oneOfType([Ve.object,Ve.string]),attributeName:Ve.string,duration:Ve.number,begin:Ve.number,easing:Ve.oneOfType([Ve.string,Ve.func]),steps:Ve.arrayOf(Ve.shape({duration:Ve.number.isRequired,style:Ve.object.isRequired,easing:Ve.oneOfType([Ve.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ve.func]),properties:Ve.arrayOf("string"),onAnimationEnd:Ve.func})),children:Ve.oneOfType([Ve.node,Ve.func]),isActive:Ve.bool,canBegin:Ve.bool,onAnimationEnd:Ve.func,shouldReAnimate:Ve.bool,onAnimationStart:Ve.func,onAnimationReStart:Ve.func};function Gd(e){"@babel/helpers - typeof";return Gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gd(e)}function kh(){return kh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},kh.apply(this,arguments)}function _ve(e,t){return Dve(e)||Nve(e,t)||Bve(e,t)||Sve()}function Sve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 948In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bve(e,t){if(e){if(typeof e=="string")return h6(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h6(e,t)}}function h6(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Nve(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function Dve(e){if(Array.isArray(e))return e}function p6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function m6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?p6(Object(r),!0).forEach(function(n){Fve(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fve(e,t,r){return t=Pve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pve(e){var t=Ove(e,"string");return Gd(t)=="symbol"?t:t+""}function Ove(e,t){if(Gd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Gd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var g6=function(t,r,n,i,a){var o=Math.min(Math.abs(n)/2,Math.abs(i)/2),l=i>=0?1:-1,c=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,d;if(o>0&&a instanceof Array){for(var x=[0,0,0,0],f=0,h=4;f<h;f++)x[f]=a[f]>o?o:a[f];d="M".concat(t,",").concat(r+l*x[0]),x[0]>0&&(d+="A ".concat(x[0],",").concat(x[0],",0,0,").concat(u,",").concat(t+c*x[0],",").concat(r)),d+="L ".concat(t+n-c*x[1],",").concat(r),x[1]>0&&(d+="A ".concat(x[1],",").concat(x[1],",0,0,").concat(u,`, 949 `).concat(t+n,",").concat(r+l*x[1])),d+="L ".concat(t+n,",").concat(r+i-l*x[2]),x[2]>0&&(d+="A ".concat(x[2],",").concat(x[2],",0,0,").concat(u,`, 950 `).concat(t+n-c*x[2],",").concat(r+i)),d+="L ".concat(t+c*x[3],",").concat(r+i),x[3]>0&&(d+="A ".concat(x[3],",").concat(x[3],",0,0,").concat(u,`, 951 `).concat(t,",").concat(r+i-l*x[3])),d+="Z"}else if(o>0&&a===+a&&a>0){var m=Math.min(o,a);d="M ".concat(t,",").concat(r+l*m,` 952 A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+c*m,",").concat(r,` 953 L `).concat(t+n-c*m,",").concat(r,` 954 A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n,",").concat(r+l*m,` 955 L `).concat(t+n,",").concat(r+i-l*m,` 956 A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n-c*m,",").concat(r+i,` 957 L `).concat(t+c*m,",").concat(r+i,` 958 A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t,",").concat(r+i-l*m," Z")}else d="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return d},Tve=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,l=r.width,c=r.height;if(Math.abs(l)>0&&Math.abs(c)>0){var u=Math.min(a,a+l),d=Math.max(a,a+l),x=Math.min(o,o+c),f=Math.max(o,o+c);return n>=u&&n<=d&&i>=x&&i<=f}return!1},$ve={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Iw=function(t){var r=m6(m6({},$ve),t),n=A.useRef(),i=A.useState(-1),a=_ve(i,2),o=a[0],l=a[1];A.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&l(w)}catch{}},[]);var c=r.x,u=r.y,d=r.width,x=r.height,f=r.radius,h=r.className,m=r.animationEasing,p=r.animationDuration,v=r.animationBegin,y=r.isAnimationActive,b=r.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||x!==+x||d===0||x===0)return null;var g=Me("recharts-rectangle",h);return b?q.createElement(da,{canBegin:o>0,from:{width:d,height:x,x:c,y:u},to:{width:d,height:x,x:c,y:u},duration:p,animationEasing:m,isActive:b},function(w){var E=w.width,C=w.height,j=w.x,S=w.y;return q.createElement(da,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:p,isActive:y,easing:m},q.createElement("path",kh({},Te(r,!0),{className:g,d:g6(j,S,E,C,f),ref:n})))}):q.createElement("path",kh({},Te(r,!0),{className:g,d:g6(c,u,d,x,f)}))};function Mb(){return Mb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mb.apply(this,arguments)}var Mw=function(t){var r=t.cx,n=t.cy,i=t.r,a=t.className,o=Me("recharts-dot",a);return r===+r&&n===+n&&i===+i?A.createElement("circle",Mb({},Te(t,!1),Kf(t),{className:o,cx:r,cy:n,r:i})):null};function qd(e){"@babel/helpers - typeof";return qd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qd(e)}var Ive=["x","y","top","left","width","height","className"];function Rb(){return Rb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rb.apply(this,arguments)}function v6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v6(Object(r),!0).forEach(function(n){Rve(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Rve(e,t,r){return t=Lve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lve(e){var t=zve(e,"string");return qd(t)=="symbol"?t:t+""}function zve(e,t){if(qd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Uve(e,t){if(e==null)return{};var r=Wve(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Wve(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Hve=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},Kve=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,l=o===void 0?0:o,c=t.left,u=c===void 0?0:c,d=t.width,x=d===void 0?0:d,f=t.height,h=f===void 0?0:f,m=t.className,p=Uve(t,Ive),v=Mve({x:n,y:a,top:l,left:u,width:x,height:h},p);return!me(n)||!me(a)||!me(x)||!me(h)||!me(l)||!me(u)?null:q.createElement("path",Rb({},Te(v,!0),{className:Me("recharts-cross",m),d:Hve(n,a,x,h,l,u)}))},Vve=QB,Gve=Vve(Object.getPrototypeOf,Object),qve=Gve,Yve=ma,Zve=qve,Xve=ga,Qve="[object Object]",Jve=Function.prototype,eye=Object.prototype,R7=Jve.toString,tye=eye.hasOwnProperty,rye=R7.call(Object);function nye(e){if(!Xve(e)||Yve(e)!=Qve)return!1;var t=Zve(e);if(t===null)return!0;var r=tye.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&R7.call(r)==rye}var iye=nye;const aye=qe(iye);var sye=ma,oye=ga,lye="[object Boolean]";function cye(e){return e===!0||e===!1||oye(e)&&sye(e)==lye}var uye=cye;const dye=qe(uye);function Yd(e){"@babel/helpers - typeof";return Yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yd(e)}function _h(){return _h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_h.apply(this,arguments)}function xye(e,t){return mye(e)||pye(e,t)||hye(e,t)||fye()}function fye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 959In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hye(e,t){if(e){if(typeof e=="string")return y6(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y6(e,t)}}function y6(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function pye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function mye(e){if(Array.isArray(e))return e}function b6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function E6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b6(Object(r),!0).forEach(function(n){gye(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gye(e,t,r){return t=vye(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vye(e){var t=yye(e,"string");return Yd(t)=="symbol"?t:t+""}function yye(e,t){if(Yd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Yd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var w6=function(t,r,n,i,a){var o=n-i,l;return l="M ".concat(t,",").concat(r),l+="L ".concat(t+n,",").concat(r),l+="L ".concat(t+n-o/2,",").concat(r+a),l+="L ".concat(t+n-o/2-i,",").concat(r+a),l+="L ".concat(t,",").concat(r," Z"),l},bye={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Eye=function(t){var r=E6(E6({},bye),t),n=A.useRef(),i=A.useState(-1),a=xye(i,2),o=a[0],l=a[1];A.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var g=n.current.getTotalLength();g&&l(g)}catch{}},[]);var c=r.x,u=r.y,d=r.upperWidth,x=r.lowerWidth,f=r.height,h=r.className,m=r.animationEasing,p=r.animationDuration,v=r.animationBegin,y=r.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||x!==+x||f!==+f||d===0&&x===0||f===0)return null;var b=Me("recharts-trapezoid",h);return y?q.createElement(da,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:f,x:c,y:u},to:{upperWidth:d,lowerWidth:x,height:f,x:c,y:u},duration:p,animationEasing:m,isActive:y},function(g){var w=g.upperWidth,E=g.lowerWidth,C=g.height,j=g.x,S=g.y;return q.createElement(da,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:p,easing:m},q.createElement("path",_h({},Te(r,!0),{className:b,d:w6(j,S,w,E,C),ref:n})))}):q.createElement("g",null,q.createElement("path",_h({},Te(r,!0),{className:b,d:w6(c,u,d,x,f)})))},wye=["option","shapeType","propTransformer","activeClassName","isActive"];function Zd(e){"@babel/helpers - typeof";return Zd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zd(e)}function Cye(e,t){if(e==null)return{};var r=Aye(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Aye(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function C6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Sh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C6(Object(r),!0).forEach(function(n){jye(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jye(e,t,r){return t=kye(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kye(e){var t=_ye(e,"string");return Zd(t)=="symbol"?t:t+""}function _ye(e,t){if(Zd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sye(e,t){return Sh(Sh({},t),e)}function Bye(e,t){return e==="symbols"}function A6(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return q.createElement(Iw,r);case"trapezoid":return q.createElement(Eye,r);case"sector":return q.createElement(S7,r);case"symbols":if(Bye(t))return q.createElement(rw,r);break;default:return null}}function Nye(e){return A.isValidElement(e)?e.props:e}function Dye(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?Sye:n,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,l=e.isActive,c=Cye(e,wye),u;if(A.isValidElement(t))u=A.cloneElement(t,Sh(Sh({},c),Nye(t)));else if(Pe(t))u=t(c);else if(aye(t)&&!dye(t)){var d=i(t,c);u=q.createElement(A6,{shapeType:r,elementProps:d})}else{var x=c;u=q.createElement(A6,{shapeType:r,elementProps:x})}return l?q.createElement(vt,{className:o},u):u}function am(e,t){return t!=null&&"trapezoids"in e.props}function sm(e,t){return t!=null&&"sectors"in e.props}function Xd(e,t){return t!=null&&"points"in e.props}function Fye(e,t){var r,n,i=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,a=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return i&&a}function Pye(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function Oye(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function Tye(e,t){var r;return am(e,t)?r=Fye:sm(e,t)?r=Pye:Xd(e,t)&&(r=Oye),r}function $ye(e,t){var r;return am(e,t)?r="trapezoids":sm(e,t)?r="sectors":Xd(e,t)&&(r="points"),r}function Iye(e,t){if(am(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(sm(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return Xd(e,t)?t.payload:{}}function Mye(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=$ye(r,t),a=Iye(r,t),o=n.filter(function(c,u){var d=Od(a,c),x=r.props[i].filter(function(m){var p=Tye(r,t);return p(m,t)}),f=r.props[i].indexOf(x[x.length-1]),h=u===f;return d&&h}),l=n.indexOf(o[o.length-1]);return l}var Rye=Math.ceil,Lye=Math.max;function zye(e,t,r,n){for(var i=-1,a=Lye(Rye((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var Uye=zye,Wye=gN,j6=1/0,Hye=17976931348623157e292;function Kye(e){if(!e)return e===0?e:0;if(e=Wye(e),e===j6||e===-j6){var t=e<0?-1:1;return t*Hye}return e===e?e:0}var L7=Kye,Vye=Uye,Gye=qp,Hg=L7;function qye(e){return function(t,r,n){return n&&typeof n!="number"&&Gye(t,r,n)&&(r=n=void 0),t=Hg(t),r===void 0?(r=t,t=0):r=Hg(r),n=n===void 0?t<r?1:-1:Hg(n),Vye(t,r,n,e)}}var Yye=qye,Zye=Yye,Xye=Zye(),Qye=Xye;const Bh=qe(Qye);function Qd(e){"@babel/helpers - typeof";return Qd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qd(e)}function k6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?k6(Object(r),!0).forEach(function(n){z7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z7(e,t,r){return t=Jye(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jye(e){var t=ebe(e,"string");return Qd(t)=="symbol"?t:t+""}function ebe(e,t){if(Qd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tbe=["Webkit","Moz","O","ms"],rbe=function(t,r){var n=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=tbe.reduce(function(a,o){return _6(_6({},a),{},z7({},o+n,r))},{});return i[t]=r,i};function ic(e){"@babel/helpers - typeof";return ic=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ic(e)}function Nh(){return Nh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Nh.apply(this,arguments)}function S6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?S6(Object(r),!0).forEach(function(n){Gr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B6(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,W7(n.key),n)}}function ibe(e,t,r){return t&&B6(e.prototype,t),r&&B6(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function abe(e,t,r){return t=Dh(t),sbe(e,U7()?Reflect.construct(t,r||[],Dh(e).constructor):t.apply(e,r))}function sbe(e,t){if(t&&(ic(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return obe(e)}function obe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(U7=function(){return!!e})()}function Dh(e){return Dh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Dh(e)}function lbe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lb(e,t)}function Lb(e,t){return Lb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Lb(e,t)}function Gr(e,t,r){return t=W7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W7(e){var t=cbe(e,"string");return ic(t)=="symbol"?t:t+""}function cbe(e,t){if(ic(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ic(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ube=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,a=t.x,o=t.width,l=t.travellerWidth;if(!r||!r.length)return{};var c=r.length,u=$u().domain(Bh(0,c)).range([a,a+o-l]),d=u.domain().map(function(x){return u(x)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(i),scale:u,scaleValues:d}},N6=function(t){return t.changedTouches&&!!t.changedTouches.length},ac=function(e){function t(r){var n;return nbe(this,t),n=abe(this,t,[r]),Gr(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),Gr(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),Gr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,l=i.startIndex;o==null||o({endIndex:a,startIndex:l})}),n.detachDragEndListener()}),Gr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Gr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Gr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Gr(n,"handleSlideDragStart",function(i){var a=N6(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return lbe(t,e),ibe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,l=this.props,c=l.gap,u=l.data,d=u.length-1,x=Math.min(i,a),f=Math.max(i,a),h=t.getIndexInRange(o,x),m=t.getIndexInRange(o,f);return{startIndex:h-h%c,endIndex:m===d?d:m-m%c}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,l=i.dataKey,c=an(a[n],l,n);return Pe(o)?o(c,n):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,a=i.slideMoveStartX,o=i.startX,l=i.endX,c=this.props,u=c.x,d=c.width,x=c.travellerWidth,f=c.startIndex,h=c.endIndex,m=c.onChange,p=n.pageX-a;p>0?p=Math.min(p,u+d-x-l,u+d-x-o):p<0&&(p=Math.max(p,u-o,u-l));var v=this.getIndex({startX:o+p,endX:l+p});(v.startIndex!==f||v.endIndex!==h)&&m&&m(v),this.setState({startX:o+p,endX:l+p,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=N6(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,l=i.endX,c=i.startX,u=this.state[o],d=this.props,x=d.x,f=d.width,h=d.travellerWidth,m=d.onChange,p=d.gap,v=d.data,y={startX:this.state.startX,endX:this.state.endX},b=n.pageX-a;b>0?b=Math.min(b,x+f-h-u):b<0&&(b=Math.max(b,x-u)),y[o]=u+b;var g=this.getIndex(y),w=g.startIndex,E=g.endIndex,C=function(){var S=v.length-1;return o==="startX"&&(l>c?w%p===0:E%p===0)||l<c&&E===S||o==="endX"&&(l>c?E%p===0:w%p===0)||l>c&&E===S};this.setState(Gr(Gr({},o,u+b),"brushMoveStartX",n.pageX),function(){m&&C()&&m(g)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,l=o.scaleValues,c=o.startX,u=o.endX,d=this.state[i],x=l.indexOf(d);if(x!==-1){var f=x+n;if(!(f===-1||f>=l.length)){var h=l[f];i==="startX"&&h>=u||i==="endX"&&h<=c||this.setState(Gr({},i,h),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,l=n.height,c=n.fill,u=n.stroke;return q.createElement("rect",{stroke:u,fill:c,x:i,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,l=n.height,c=n.data,u=n.children,d=n.padding,x=A.Children.only(u);return x?q.cloneElement(x,{x:i,y:a,width:o,height:l,margin:d,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,l=this,c=this.props,u=c.y,d=c.travellerWidth,x=c.height,f=c.traveller,h=c.ariaLabel,m=c.data,p=c.startIndex,v=c.endIndex,y=Math.max(n,this.props.x),b=Kg(Kg({},Te(this.props,!1)),{},{x:y,y:u,width:d,height:x}),g=h||"Min value: ".concat((a=m[p])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=m[v])===null||o===void 0?void 0:o.name);return q.createElement(vt,{tabIndex:0,role:"slider","aria-label":g,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),l.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(f,b))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,l=a.height,c=a.stroke,u=a.travellerWidth,d=Math.min(n,i)+u,x=Math.max(Math.abs(i-n)-u,0);return q.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:d,y:o,width:x,height:l})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,l=n.height,c=n.travellerWidth,u=n.stroke,d=this.state,x=d.startX,f=d.endX,h=5,m={pointerEvents:"none",fill:u};return q.createElement(vt,{className:"recharts-brush-texts"},q.createElement(sh,Nh({textAnchor:"end",verticalAnchor:"middle",x:Math.min(x,f)-h,y:o+l/2},m),this.getTextOfTick(i)),q.createElement(sh,Nh({textAnchor:"start",verticalAnchor:"middle",x:Math.max(x,f)+c+h,y:o+l/2},m),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,l=n.x,c=n.y,u=n.width,d=n.height,x=n.alwaysShowText,f=this.state,h=f.startX,m=f.endX,p=f.isTextActive,v=f.isSlideMoving,y=f.isTravellerMoving,b=f.isTravellerFocused;if(!i||!i.length||!me(l)||!me(c)||!me(u)||!me(d)||u<=0||d<=0)return null;var g=Me("recharts-brush",a),w=q.Children.count(o)===1,E=rbe("userSelect","none");return q.createElement(vt,{className:g,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),w&&this.renderPanorama(),this.renderSlide(h,m),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(m,"endX"),(p||v||y||b||x)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,l=n.height,c=n.stroke,u=Math.floor(a+l/2)-1;return q.createElement(q.Fragment,null,q.createElement("rect",{x:i,y:a,width:o,height:l,fill:c,stroke:"none"}),q.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),q.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return q.isValidElement(n)?a=q.cloneElement(n,i):Pe(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,l=n.x,c=n.travellerWidth,u=n.updateId,d=n.startIndex,x=n.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return Kg({prevData:a,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:o},a&&a.length?ube({data:a,width:o,x:l,travellerWidth:c,startIndex:d,endIndex:x}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||l!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([l,l+o-c]);var f=i.scale.domain().map(function(h){return i.scale(h)});return{prevData:a,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:f}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,l=a-1;l-o>1;){var c=Math.floor((o+l)/2);n[c]>i?l=c:o=c}return i>=n[l]?l:o}}])}(A.PureComponent);Gr(ac,"displayName","Brush");Gr(ac,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var dbe=cw;function xbe(e,t){var r;return dbe(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var fbe=xbe,hbe=HB,pbe=vs,mbe=fbe,gbe=Kr,vbe=qp;function ybe(e,t,r){var n=gbe(e)?hbe:mbe;return r&&vbe(e,t,r)&&(t=void 0),n(e,pbe(t))}var bbe=ybe;const Ebe=qe(bbe);var Ci=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},D6=xN;function wbe(e,t,r){t=="__proto__"&&D6?D6(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Cbe=wbe,Abe=Cbe,jbe=uN,kbe=vs;function _be(e,t){var r={};return t=kbe(t),jbe(e,function(n,i,a){Abe(r,i,t(n,i,a))}),r}var Sbe=_be;const Bbe=qe(Sbe);function Nbe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var Dbe=Nbe,Fbe=cw;function Pbe(e,t){var r=!0;return Fbe(e,function(n,i,a){return r=!!t(n,i,a),r}),r}var Obe=Pbe,Tbe=Dbe,$be=Obe,Ibe=vs,Mbe=Kr,Rbe=qp;function Lbe(e,t,r){var n=Mbe(e)?Tbe:$be;return r&&Rbe(e,t,r)&&(t=void 0),n(e,Ibe(t))}var zbe=Lbe;const H7=qe(zbe);var Ube=["x","y"];function Jd(e){"@babel/helpers - typeof";return Jd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jd(e)}function zb(){return zb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zb.apply(this,arguments)}function F6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?F6(Object(r),!0).forEach(function(n){Wbe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wbe(e,t,r){return t=Hbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hbe(e){var t=Kbe(e,"string");return Jd(t)=="symbol"?t:t+""}function Kbe(e,t){if(Jd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Jd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vbe(e,t){if(e==null)return{};var r=Gbe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Gbe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function qbe(e,t){var r=e.x,n=e.y,i=Vbe(e,Ube),a="".concat(r),o=parseInt(a,10),l="".concat(n),c=parseInt(l,10),u="".concat(t.height||i.height),d=parseInt(u,10),x="".concat(t.width||i.width),f=parseInt(x,10);return cu(cu(cu(cu(cu({},t),i),o?{x:o}:{}),c?{y:c}:{}),{},{height:d,width:f,name:t.name,radius:t.radius})}function P6(e){return q.createElement(Dye,zb({shapeType:"rectangle",propTransformer:qbe,activeClassName:"recharts-active-bar"},e))}var Ybe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=me(n)||xte(n);return a?t(n,i):(a||Eo(),r)}},Zbe=["value","background"],K7;function sc(e){"@babel/helpers - typeof";return sc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sc(e)}function Xbe(e,t){if(e==null)return{};var r=Qbe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Qbe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Fh(){return Fh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fh.apply(this,arguments)}function O6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?O6(Object(r),!0).forEach(function(n){Ha(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T6(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,G7(n.key),n)}}function e1e(e,t,r){return t&&T6(e.prototype,t),r&&T6(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function t1e(e,t,r){return t=Ph(t),r1e(e,V7()?Reflect.construct(t,r||[],Ph(e).constructor):t.apply(e,r))}function r1e(e,t){if(t&&(sc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n1e(e)}function n1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function V7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(V7=function(){return!!e})()}function Ph(e){return Ph=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ph(e)}function i1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ub(e,t)}function Ub(e,t){return Ub=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ub(e,t)}function Ha(e,t,r){return t=G7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G7(e){var t=a1e(e,"string");return sc(t)=="symbol"?t:t+""}function a1e(e,t){if(sc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(sc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var us=function(e){function t(){var r;Jbe(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=t1e(this,t,[].concat(i)),Ha(r,"state",{isAnimationFinished:!1}),Ha(r,"id",C0("recharts-bar-")),Ha(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Ha(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return i1e(t,e),e1e(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,o=a.shape,l=a.dataKey,c=a.activeIndex,u=a.activeBar,d=Te(this.props,!1);return n&&n.map(function(x,f){var h=f===c,m=h?u:o,p=Nt(Nt(Nt({},d),x),{},{isActive:h,option:m,index:f,dataKey:l,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return q.createElement(vt,Fh({className:"recharts-bar-rectangle"},Vf(i.props,x,f),{key:"rectangle-".concat(x==null?void 0:x.x,"-").concat(x==null?void 0:x.y,"-").concat(x==null?void 0:x.value,"-").concat(f)}),q.createElement(P6,p))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,o=i.layout,l=i.isAnimationActive,c=i.animationBegin,u=i.animationDuration,d=i.animationEasing,x=i.animationId,f=this.state.prevData;return q.createElement(da,{begin:c,duration:u,isActive:l,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(x),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var m=h.t,p=a.map(function(v,y){var b=f&&f[y];if(b){var g=vn(b.x,v.x),w=vn(b.y,v.y),E=vn(b.width,v.width),C=vn(b.height,v.height);return Nt(Nt({},v),{},{x:g(m),y:w(m),width:E(m),height:C(m)})}if(o==="horizontal"){var j=vn(0,v.height),S=j(m);return Nt(Nt({},v),{},{y:v.y+v.height-S,height:S})}var _=vn(0,v.width),O=_(m);return Nt(Nt({},v),{},{width:O})});return q.createElement(vt,null,n.renderRectanglesStatically(p))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!Od(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,o=i.dataKey,l=i.activeIndex,c=Te(this.props.background,!1);return a.map(function(u,d){u.value;var x=u.background,f=Xbe(u,Zbe);if(!x)return null;var h=Nt(Nt(Nt(Nt(Nt({},f),{},{fill:"#eee"},x),c),Vf(n.props,u,d)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:d,className:"recharts-bar-background-rectangle"});return q.createElement(P6,Fh({key:"background-bar-".concat(d),option:n.props.background,isActive:d===l},h))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,l=a.xAxis,c=a.yAxis,u=a.layout,d=a.children,x=Jn(d,im);if(!x)return null;var f=u==="vertical"?o[0].height/2:o[0].width/2,h=function(v,y){var b=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:b,errorVal:an(v,y)}},m={clipPath:n?"url(#clipPath-".concat(i,")"):null};return q.createElement(vt,m,x.map(function(p){return q.cloneElement(p,{key:"error-bar-".concat(i,"-").concat(p.props.dataKey),data:o,xAxis:l,yAxis:c,layout:u,offset:f,dataPointFormatter:h})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,o=n.className,l=n.xAxis,c=n.yAxis,u=n.left,d=n.top,x=n.width,f=n.height,h=n.isAnimationActive,m=n.background,p=n.id;if(i||!a||!a.length)return null;var v=this.state.isAnimationFinished,y=Me("recharts-bar",o),b=l&&l.allowDataOverflow,g=c&&c.allowDataOverflow,w=b||g,E=Ie(p)?this.id:p;return q.createElement(vt,{className:y},b||g?q.createElement("defs",null,q.createElement("clipPath",{id:"clipPath-".concat(E)},q.createElement("rect",{x:b?u:u-x/2,y:g?d:d-f/2,width:b?x:x*2,height:g?f:f*2}))):null,q.createElement(vt,{className:"recharts-bar-rectangles",clipPath:w?"url(#clipPath-".concat(E,")"):null},m?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(w,E),(!h||v)&&ns.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])}(A.PureComponent);K7=us;Ha(us,"displayName","Bar");Ha(us,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Zi.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Ha(us,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,d=e.dataStartIndex,x=e.displayedData,f=e.offset,h=Tpe(n,r);if(!h)return null;var m=t.layout,p=r.type.defaultProps,v=p!==void 0?Nt(Nt({},p),r.props):r.props,y=v.dataKey,b=v.children,g=v.minPointSize,w=m==="horizontal"?o:a,E=u?w.scale.domain():null,C=Wpe({numericAxis:w}),j=Jn(b,yN),S=x.map(function(_,O){var I,B,T,k,$,W;u?I=$pe(u[d+O],E):(I=an(_,y),Array.isArray(I)||(I=[C,I]));var z=Ybe(g,K7.defaultProps.minPointSize)(I[1],O);if(m==="horizontal"){var L,F=[o.scale(I[0]),o.scale(I[1])],U=F[0],D=F[1];B=OA({axis:a,ticks:l,bandSize:i,offset:h.offset,entry:_,index:O}),T=(L=D??U)!==null&&L!==void 0?L:void 0,k=h.size;var N=U-D;if($=Number.isNaN(N)?0:N,W={x:B,y:o.y,width:k,height:o.height},Math.abs(z)>0&&Math.abs($)<Math.abs(z)){var K=Yn($||z)*(Math.abs(z)-Math.abs($));T-=K,$+=K}}else{var R=[a.scale(I[0]),a.scale(I[1])],H=R[0],X=R[1];if(B=H,T=OA({axis:o,ticks:c,bandSize:i,offset:h.offset,entry:_,index:O}),k=X-H,$=h.size,W={x:a.x,y:T,width:a.width,height:$},Math.abs(z)>0&&Math.abs(k)<Math.abs(z)){var ie=Yn(k||z)*(Math.abs(z)-Math.abs(k));k+=ie}}return Nt(Nt(Nt({},_),{},{x:B,y:T,width:k,height:$,value:u?I:I[1],payload:_,background:W},j&&j[O]&&j[O].props),{},{tooltipPayload:[j7(r,_)],tooltipPosition:{x:B+k/2,y:T+$/2}})});return Nt({data:S,layout:m},f)});function e0(e){"@babel/helpers - typeof";return e0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e0(e)}function s1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $6(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,q7(n.key),n)}}function o1e(e,t,r){return t&&$6(e.prototype,t),r&&$6(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function I6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Vn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?I6(Object(r),!0).forEach(function(n){om(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function om(e,t,r){return t=q7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q7(e){var t=l1e(e,"string");return e0(t)=="symbol"?t:t+""}function l1e(e,t){if(e0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(e0(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Y7=function(t,r,n,i,a){var o=t.width,l=t.height,c=t.layout,u=t.children,d=Object.keys(r),x={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:l-n.bottom,bottomMirror:l-n.bottom},f=!!Yr(u,us);return d.reduce(function(h,m){var p=r[m],v=p.orientation,y=p.domain,b=p.padding,g=b===void 0?{}:b,w=p.mirror,E=p.reversed,C="".concat(v).concat(w?"Mirror":""),j,S,_,O,I;if(p.type==="number"&&(p.padding==="gap"||p.padding==="no-gap")){var B=y[1]-y[0],T=1/0,k=p.categoricalDomain.sort(pte);if(k.forEach(function(R,H){H>0&&(T=Math.min((R||0)-(k[H-1]||0),T))}),Number.isFinite(T)){var $=T/B,W=p.layout==="vertical"?n.height:n.width;if(p.padding==="gap"&&(j=$*W/2),p.padding==="no-gap"){var z=yo(t.barCategoryGap,$*W),L=$*W/2;j=L-z-(L-z)/W*z}}}i==="xAxis"?S=[n.left+(g.left||0)+(j||0),n.left+n.width-(g.right||0)-(j||0)]:i==="yAxis"?S=c==="horizontal"?[n.top+n.height-(g.bottom||0),n.top+(g.top||0)]:[n.top+(g.top||0)+(j||0),n.top+n.height-(g.bottom||0)-(j||0)]:S=p.range,E&&(S=[S[1],S[0]]);var F=Ppe(p,a,f),U=F.scale,D=F.realScaleType;U.domain(y).range(S),Ope(U);var N=Upe(U,Vn(Vn({},p),{},{realScaleType:D}));i==="xAxis"?(I=v==="top"&&!w||v==="bottom"&&w,_=n.left,O=x[C]-I*p.height):i==="yAxis"&&(I=v==="left"&&!w||v==="right"&&w,_=x[C]-I*p.width,O=n.top);var K=Vn(Vn(Vn({},p),N),{},{realScaleType:D,x:_,y:O,scale:U,width:i==="xAxis"?n.width:p.width,height:i==="yAxis"?n.height:p.height});return K.bandSize=bh(K,N),!p.hide&&i==="xAxis"?x[C]+=(I?-1:1)*K.height:p.hide||(x[C]+=(I?-1:1)*K.width),Vn(Vn({},h),{},om({},m,K))},{})},Z7=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},c1e=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return Z7({x:r,y:n},{x:i,y:a})},X7=function(){function e(t){s1e(this,e),this.scale=t}return o1e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(r)+l}default:return this.scale(r)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();om(X7,"EPS",1e-4);var Rw=function(t){var r=Object.keys(t).reduce(function(n,i){return Vn(Vn({},n),{},om({},i,X7.create(t[i])))},{});return Vn(Vn({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return Bbe(i,function(c,u){return r[u].apply(c,{bandAware:o,position:l})})},isInRange:function(i){return H7(i,function(a,o){return r[o].isInRange(a)})}})};function u1e(e){return(e%180+180)%180}var d1e=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=u1e(i),o=a*Math.PI/180,l=Math.atan(n/r),c=o>l&&o<Math.PI-l?n/Math.sin(o):r/Math.cos(o);return Math.abs(c)},x1e=vs,f1e=A0,h1e=Vp;function p1e(e){return function(t,r,n){var i=Object(t);if(!f1e(t)){var a=x1e(r);t=h1e(t),r=function(l){return a(i[l],l,i)}}var o=e(t,r,n);return o>-1?i[a?t[o]:o]:void 0}}var m1e=p1e,g1e=L7;function v1e(e){var t=g1e(e),r=t%1;return t===t?r?t-r:t:0}var y1e=v1e,b1e=iN,E1e=vs,w1e=y1e,C1e=Math.max;function A1e(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:w1e(r);return i<0&&(i=C1e(n+i,0)),b1e(e,E1e(t),i)}var j1e=A1e,k1e=m1e,_1e=j1e,S1e=k1e(_1e),B1e=S1e;const N1e=qe(B1e);var D1e=mee(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),Lw=A.createContext(void 0),zw=A.createContext(void 0),Q7=A.createContext(void 0),J7=A.createContext({}),eD=A.createContext(void 0),tD=A.createContext(0),rD=A.createContext(0),M6=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,l=t.children,c=t.width,u=t.height,d=D1e(a);return q.createElement(Lw.Provider,{value:n},q.createElement(zw.Provider,{value:i},q.createElement(J7.Provider,{value:a},q.createElement(Q7.Provider,{value:d},q.createElement(eD.Provider,{value:o},q.createElement(tD.Provider,{value:u},q.createElement(rD.Provider,{value:c},l)))))))},F1e=function(){return A.useContext(eD)},nD=function(t){var r=A.useContext(Lw);r==null&&Eo();var n=r[t];return n==null&&Eo(),n},P1e=function(){var t=A.useContext(Lw);return Oa(t)},O1e=function(){var t=A.useContext(zw),r=N1e(t,function(n){return H7(n.domain,Number.isFinite)});return r||Oa(t)},iD=function(t){var r=A.useContext(zw);r==null&&Eo();var n=r[t];return n==null&&Eo(),n},T1e=function(){var t=A.useContext(Q7);return t},$1e=function(){return A.useContext(J7)},Uw=function(){return A.useContext(rD)},Ww=function(){return A.useContext(tD)};function oc(e){"@babel/helpers - typeof";return oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oc(e)}function I1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M1e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,sD(n.key),n)}}function R1e(e,t,r){return t&&M1e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function L1e(e,t,r){return t=Oh(t),z1e(e,aD()?Reflect.construct(t,r||[],Oh(e).constructor):t.apply(e,r))}function z1e(e,t){if(t&&(oc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return U1e(e)}function U1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(aD=function(){return!!e})()}function Oh(e){return Oh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Oh(e)}function W1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wb(e,t)}function Wb(e,t){return Wb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Wb(e,t)}function R6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function L6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?R6(Object(r),!0).forEach(function(n){Hw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hw(e,t,r){return t=sD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sD(e){var t=H1e(e,"string");return oc(t)=="symbol"?t:t+""}function H1e(e,t){if(oc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(oc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function K1e(e,t){return Y1e(e)||q1e(e,t)||G1e(e,t)||V1e()}function V1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 960In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G1e(e,t){if(e){if(typeof e=="string")return z6(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return z6(e,t)}}function z6(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function q1e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function Y1e(e){if(Array.isArray(e))return e}function Hb(){return Hb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hb.apply(this,arguments)}var Z1e=function(t,r){var n;return q.isValidElement(t)?n=q.cloneElement(t,r):Pe(t)?n=t(r):n=q.createElement("line",Hb({},r,{className:"recharts-reference-line-line"})),n},X1e=function(t,r,n,i,a,o,l,c,u){var d=a.x,x=a.y,f=a.width,h=a.height;if(n){var m=u.y,p=t.y.apply(m,{position:o});if(Ci(u,"discard")&&!t.y.isInRange(p))return null;var v=[{x:d+f,y:p},{x:d,y:p}];return c==="left"?v.reverse():v}if(r){var y=u.x,b=t.x.apply(y,{position:o});if(Ci(u,"discard")&&!t.x.isInRange(b))return null;var g=[{x:b,y:x+h},{x:b,y:x}];return l==="top"?g.reverse():g}if(i){var w=u.segment,E=w.map(function(C){return t.apply(C,{position:o})});return Ci(u,"discard")&&Ebe(E,function(C){return!t.isInRange(C)})?null:E}return null};function Q1e(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,l=e.className,c=e.alwaysShow,u=F1e(),d=nD(i),x=iD(a),f=T1e();if(!u||!f)return null;Yi(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Rw({x:d.scale,y:x.scale}),m=Wt(t),p=Wt(r),v=n&&n.length===2,y=X1e(h,m,p,v,f,e.position,d.orientation,x.orientation,e);if(!y)return null;var b=K1e(y,2),g=b[0],w=g.x,E=g.y,C=b[1],j=C.x,S=C.y,_=Ci(e,"hidden")?"url(#".concat(u,")"):void 0,O=L6(L6({clipPath:_},Te(e,!0)),{},{x1:w,y1:E,x2:j,y2:S});return q.createElement(vt,{className:Me("recharts-reference-line",l)},Z1e(o,O),hr.renderCallByParent(e,c1e({x1:w,y1:E,x2:j,y2:S})))}var Kw=function(e){function t(){return I1e(this,t),L1e(this,t,arguments)}return W1e(t,e),R1e(t,[{key:"render",value:function(){return q.createElement(Q1e,this.props)}}])}(q.Component);Hw(Kw,"displayName","ReferenceLine");Hw(Kw,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Kb(){return Kb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Kb.apply(this,arguments)}function lc(e){"@babel/helpers - typeof";return lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lc(e)}function U6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function W6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U6(Object(r),!0).forEach(function(n){lm(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function J1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eEe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,lD(n.key),n)}}function tEe(e,t,r){return t&&eEe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function rEe(e,t,r){return t=Th(t),nEe(e,oD()?Reflect.construct(t,r||[],Th(e).constructor):t.apply(e,r))}function nEe(e,t){if(t&&(lc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iEe(e)}function iEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oD=function(){return!!e})()}function Th(e){return Th=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Th(e)}function aEe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vb(e,t)}function Vb(e,t){return Vb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Vb(e,t)}function lm(e,t,r){return t=lD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lD(e){var t=sEe(e,"string");return lc(t)=="symbol"?t:t+""}function sEe(e,t){if(lc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(lc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oEe=function(t){var r=t.x,n=t.y,i=t.xAxis,a=t.yAxis,o=Rw({x:i.scale,y:a.scale}),l=o.apply({x:r,y:n},{bandAware:!0});return Ci(t,"discard")&&!o.isInRange(l)?null:l},cm=function(e){function t(){return J1e(this,t),rEe(this,t,arguments)}return aEe(t,e),tEe(t,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,o=n.r,l=n.alwaysShow,c=n.clipPathId,u=Wt(i),d=Wt(a);if(Yi(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!d)return null;var x=oEe(this.props);if(!x)return null;var f=x.x,h=x.y,m=this.props,p=m.shape,v=m.className,y=Ci(this.props,"hidden")?"url(#".concat(c,")"):void 0,b=W6(W6({clipPath:y},Te(this.props,!0)),{},{cx:f,cy:h});return q.createElement(vt,{className:Me("recharts-reference-dot",v)},t.renderDot(p,b),hr.renderCallByParent(this.props,{x:f-o,y:h-o,width:2*o,height:2*o}))}}])}(q.Component);lm(cm,"displayName","ReferenceDot");lm(cm,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});lm(cm,"renderDot",function(e,t){var r;return q.isValidElement(e)?r=q.cloneElement(e,t):Pe(e)?r=e(t):r=q.createElement(Mw,Kb({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function Gb(){return Gb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gb.apply(this,arguments)}function cc(e){"@babel/helpers - typeof";return cc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cc(e)}function H6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function K6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?H6(Object(r),!0).forEach(function(n){um(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cEe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,uD(n.key),n)}}function uEe(e,t,r){return t&&cEe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dEe(e,t,r){return t=$h(t),xEe(e,cD()?Reflect.construct(t,r||[],$h(e).constructor):t.apply(e,r))}function xEe(e,t){if(t&&(cc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fEe(e)}function fEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cD=function(){return!!e})()}function $h(e){return $h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$h(e)}function hEe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qb(e,t)}function qb(e,t){return qb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},qb(e,t)}function um(e,t,r){return t=uD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uD(e){var t=pEe(e,"string");return cc(t)=="symbol"?t:t+""}function pEe(e,t){if(cc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(cc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mEe=function(t,r,n,i,a){var o=a.x1,l=a.x2,c=a.y1,u=a.y2,d=a.xAxis,x=a.yAxis;if(!d||!x)return null;var f=Rw({x:d.scale,y:x.scale}),h={x:t?f.x.apply(o,{position:"start"}):f.x.rangeMin,y:n?f.y.apply(c,{position:"start"}):f.y.rangeMin},m={x:r?f.x.apply(l,{position:"end"}):f.x.rangeMax,y:i?f.y.apply(u,{position:"end"}):f.y.rangeMax};return Ci(a,"discard")&&(!f.isInRange(h)||!f.isInRange(m))?null:Z7(h,m)},dm=function(e){function t(){return lEe(this,t),dEe(this,t,arguments)}return hEe(t,e),uEe(t,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,o=n.y1,l=n.y2,c=n.className,u=n.alwaysShow,d=n.clipPathId;Yi(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var x=Wt(i),f=Wt(a),h=Wt(o),m=Wt(l),p=this.props.shape;if(!x&&!f&&!h&&!m&&!p)return null;var v=mEe(x,f,h,m,this.props);if(!v&&!p)return null;var y=Ci(this.props,"hidden")?"url(#".concat(d,")"):void 0;return q.createElement(vt,{className:Me("recharts-reference-area",c)},t.renderRect(p,K6(K6({clipPath:y},Te(this.props,!0)),v)),hr.renderCallByParent(this.props,v))}}])}(q.Component);um(dm,"displayName","ReferenceArea");um(dm,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});um(dm,"renderRect",function(e,t){var r;return q.isValidElement(e)?r=q.cloneElement(e,t):Pe(e)?r=e(t):r=q.createElement(Iw,Gb({},t,{className:"recharts-reference-area-rect"})),r});function dD(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function gEe(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return d1e(n,r)}function vEe(e,t,r){var n=r==="width",i=e.x,a=e.y,o=e.width,l=e.height;return t===1?{start:n?i:a,end:n?i+o:a+l}:{start:n?i+o:a+l,end:n?i:a}}function Ih(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function yEe(e,t){return dD(e,t+1)}function bEe(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,l=t.end,c=0,u=1,d=o,x=function(){var m=n==null?void 0:n[c];if(m===void 0)return{v:dD(n,u)};var p=c,v,y=function(){return v===void 0&&(v=r(m,p)),v},b=m.coordinate,g=c===0||Ih(e,b,y,d,l);g||(c=0,d=o,u+=1),g&&(d=b+e*(y()/2+i),c+=u)},f;u<=a.length;)if(f=x(),f)return f.v;return[]}function t0(e){"@babel/helpers - typeof";return t0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t0(e)}function V6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?V6(Object(r),!0).forEach(function(n){EEe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function EEe(e,t,r){return t=wEe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wEe(e){var t=CEe(e,"string");return t0(t)=="symbol"?t:t+""}function CEe(e,t){if(t0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(t0(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function AEe(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,l=t.start,c=t.end,u=function(f){var h=a[f],m,p=function(){return m===void 0&&(m=r(h,f)),m};if(f===o-1){var v=e*(h.coordinate+e*p()/2-c);a[f]=h=xr(xr({},h),{},{tickCoord:v>0?h.coordinate-v*e:h.coordinate})}else a[f]=h=xr(xr({},h),{},{tickCoord:h.coordinate});var y=Ih(e,h.tickCoord,p,l,c);y&&(c=h.tickCoord-e*(p()/2+i),a[f]=xr(xr({},h),{},{isShow:!0}))},d=o-1;d>=0;d--)u(d);return a}function jEe(e,t,r,n,i,a){var o=(n||[]).slice(),l=o.length,c=t.start,u=t.end;if(a){var d=n[l-1],x=r(d,l-1),f=e*(d.coordinate+e*x/2-u);o[l-1]=d=xr(xr({},d),{},{tickCoord:f>0?d.coordinate-f*e:d.coordinate});var h=Ih(e,d.tickCoord,function(){return x},c,u);h&&(u=d.tickCoord-e*(x/2+i),o[l-1]=xr(xr({},d),{},{isShow:!0}))}for(var m=a?l-1:l,p=function(b){var g=o[b],w,E=function(){return w===void 0&&(w=r(g,b)),w};if(b===0){var C=e*(g.coordinate-e*E()/2-c);o[b]=g=xr(xr({},g),{},{tickCoord:C<0?g.coordinate-C*e:g.coordinate})}else o[b]=g=xr(xr({},g),{},{tickCoord:g.coordinate});var j=Ih(e,g.tickCoord,E,c,u);j&&(c=g.tickCoord+e*(E()/2+i),o[b]=xr(xr({},g),{},{isShow:!0}))},v=0;v<m;v++)p(v);return o}function Vw(e,t,r){var n=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,l=e.orientation,c=e.interval,u=e.tickFormatter,d=e.unit,x=e.angle;if(!i||!i.length||!n)return[];if(me(c)||Zi.isSsr)return yEe(i,typeof c=="number"&&me(c)?c:0);var f=[],h=l==="top"||l==="bottom"?"width":"height",m=d&&h==="width"?Tu(d,{fontSize:t,letterSpacing:r}):{width:0,height:0},p=function(g,w){var E=Pe(u)?u(g.value,w):g.value;return h==="width"?gEe(Tu(E,{fontSize:t,letterSpacing:r}),m,x):Tu(E,{fontSize:t,letterSpacing:r})[h]},v=i.length>=2?Yn(i[1].coordinate-i[0].coordinate):1,y=vEe(a,v,h);return c==="equidistantPreserveStart"?bEe(v,y,p,i,o):(c==="preserveStart"||c==="preserveStartEnd"?f=jEe(v,y,p,i,o,c==="preserveStartEnd"):f=AEe(v,y,p,i,o),f.filter(function(b){return b.isShow}))}var kEe=["viewBox"],_Ee=["viewBox"],SEe=["ticks"];function uc(e){"@babel/helpers - typeof";return uc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uc(e)}function cl(){return cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cl.apply(this,arguments)}function G6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?G6(Object(r),!0).forEach(function(n){Gw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vg(e,t){if(e==null)return{};var r=BEe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function BEe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function NEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q6(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fD(n.key),n)}}function DEe(e,t,r){return t&&q6(e.prototype,t),r&&q6(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function FEe(e,t,r){return t=Mh(t),PEe(e,xD()?Reflect.construct(t,r||[],Mh(e).constructor):t.apply(e,r))}function PEe(e,t){if(t&&(uc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return OEe(e)}function OEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xD=function(){return!!e})()}function Mh(e){return Mh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Mh(e)}function TEe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yb(e,t)}function Yb(e,t){return Yb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Yb(e,t)}function Gw(e,t,r){return t=fD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fD(e){var t=$Ee(e,"string");return uc(t)=="symbol"?t:t+""}function $Ee(e,t){if(uc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(uc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Mc=function(e){function t(r){var n;return NEe(this,t),n=FEe(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return TEe(t,e),DEe(t,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,o=Vg(n,kEe),l=this.props,c=l.viewBox,u=Vg(l,_Ee);return!wl(a,c)||!wl(o,u)||!wl(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,o=i.y,l=i.width,c=i.height,u=i.orientation,d=i.tickSize,x=i.mirror,f=i.tickMargin,h,m,p,v,y,b,g=x?-1:1,w=n.tickSize||d,E=me(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":h=m=n.coordinate,v=o+ +!x*c,p=v-g*w,b=p-g*f,y=E;break;case"left":p=v=n.coordinate,m=a+ +!x*l,h=m-g*w,y=h-g*f,b=E;break;case"right":p=v=n.coordinate,m=a+ +x*l,h=m+g*w,y=h+g*f,b=E;break;default:h=m=n.coordinate,v=o+ +x*c,p=v+g*w,b=p+g*f,y=E;break}return{line:{x1:h,y1:p,x2:m,y2:v},tick:{x:y,y:b}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,l=n.height,c=n.orientation,u=n.mirror,d=n.axisLine,x=Mt(Mt(Mt({},Te(this.props,!1)),Te(d,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var f=+(c==="top"&&!u||c==="bottom"&&u);x=Mt(Mt({},x),{},{x1:i,y1:a+f*l,x2:i+o,y2:a+f*l})}else{var h=+(c==="left"&&!u||c==="right"&&u);x=Mt(Mt({},x),{},{x1:i+h*o,y1:a,x2:i+h*o,y2:a+l})}return q.createElement("line",cl({},x,{className:Me("recharts-cartesian-axis-line",Cn(d,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var o=this,l=this.props,c=l.tickLine,u=l.stroke,d=l.tick,x=l.tickFormatter,f=l.unit,h=Vw(Mt(Mt({},this.props),{},{ticks:n}),i,a),m=this.getTickTextAnchor(),p=this.getTickVerticalAnchor(),v=Te(this.props,!1),y=Te(d,!1),b=Mt(Mt({},v),{},{fill:"none"},Te(c,!1)),g=h.map(function(w,E){var C=o.getTickLineCoord(w),j=C.line,S=C.tick,_=Mt(Mt(Mt(Mt({textAnchor:m,verticalAnchor:p},v),{},{stroke:"none",fill:u},y),S),{},{index:E,payload:w,visibleTicksCount:h.length,tickFormatter:x});return q.createElement(vt,cl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(w.value,"-").concat(w.coordinate,"-").concat(w.tickCoord)},Vf(o.props,w,E)),c&&q.createElement("line",cl({},b,j,{className:Me("recharts-cartesian-axis-tick-line",Cn(c,"className"))})),d&&t.renderTickItem(d,_,"".concat(Pe(x)?x(w.value,E):w.value).concat(f||"")))});return q.createElement("g",{className:"recharts-cartesian-axis-ticks"},g)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,o=i.width,l=i.height,c=i.ticksGenerator,u=i.className,d=i.hide;if(d)return null;var x=this.props,f=x.ticks,h=Vg(x,SEe),m=f;return Pe(c)&&(m=f&&f.length>0?c(this.props):c(h)),o<=0||l<=0||!m||!m.length?null:q.createElement(vt,{className:Me("recharts-cartesian-axis",u),ref:function(v){n.layerReference=v}},a&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),hr.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,l=Me(i.className,"recharts-cartesian-axis-tick-value");return q.isValidElement(n)?o=q.cloneElement(n,Mt(Mt({},i),{},{className:l})):Pe(n)?o=n(Mt(Mt({},i),{},{className:l})):o=q.createElement(sh,cl({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(A.Component);Gw(Mc,"displayName","CartesianAxis");Gw(Mc,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var IEe=["x1","y1","x2","y2","key"],MEe=["offset"];function wo(e){"@babel/helpers - typeof";return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wo(e)}function Y6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Y6(Object(r),!0).forEach(function(n){REe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function REe(e,t,r){return t=LEe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LEe(e){var t=zEe(e,"string");return wo(t)=="symbol"?t:t+""}function zEe(e,t){if(wo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(wo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vs(){return Vs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vs.apply(this,arguments)}function Z6(e,t){if(e==null)return{};var r=UEe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function UEe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var WEe=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,l=t.height,c=t.ry;return q.createElement("rect",{x:i,y:a,ry:c,width:o,height:l,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function hD(e,t){var r;if(q.isValidElement(e))r=q.cloneElement(e,t);else if(Pe(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,l=t.key,c=Z6(t,IEe),u=Te(c,!1);u.offset;var d=Z6(u,MEe);r=q.createElement("line",Vs({},d,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:l}))}return r}function HEe(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(l,c){var u=pr(pr({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(c),index:c});return hD(i,u)});return q.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function KEe(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(l,c){var u=pr(pr({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(c),index:c});return hD(i,u)});return q.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function VEe(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,l=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var d=l.map(function(f){return Math.round(f+i-i)}).sort(function(f,h){return f-h});i!==d[0]&&d.unshift(0);var x=d.map(function(f,h){var m=!d[h+1],p=m?i+o-f:d[h+1]-f;if(p<=0)return null;var v=h%t.length;return q.createElement("rect",{key:"react-".concat(h),y:f,x:n,height:p,width:a,stroke:"none",fill:t[v],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return q.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},x)}function GEe(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,l=e.width,c=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var d=u.map(function(f){return Math.round(f+a-a)}).sort(function(f,h){return f-h});a!==d[0]&&d.unshift(0);var x=d.map(function(f,h){var m=!d[h+1],p=m?a+l-f:d[h+1]-f;if(p<=0)return null;var v=h%n.length;return q.createElement("rect",{key:"react-".concat(h),x:f,y:o,width:p,height:c,stroke:"none",fill:n[v],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return q.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},x)}var qEe=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return C7(Vw(pr(pr(pr({},Mc.defaultProps),n),{},{ticks:Ki(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},YEe=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return C7(Vw(pr(pr(pr({},Mc.defaultProps),n),{},{ticks:Ki(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},Ho={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function yu(e){var t,r,n,i,a,o,l=Uw(),c=Ww(),u=$1e(),d=pr(pr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Ho.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Ho.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Ho.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Ho.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Ho.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Ho.verticalFill,x:me(e.x)?e.x:u.left,y:me(e.y)?e.y:u.top,width:me(e.width)?e.width:u.width,height:me(e.height)?e.height:u.height}),x=d.x,f=d.y,h=d.width,m=d.height,p=d.syncWithTicks,v=d.horizontalValues,y=d.verticalValues,b=P1e(),g=O1e();if(!me(h)||h<=0||!me(m)||m<=0||!me(x)||x!==+x||!me(f)||f!==+f)return null;var w=d.verticalCoordinatesGenerator||qEe,E=d.horizontalCoordinatesGenerator||YEe,C=d.horizontalPoints,j=d.verticalPoints;if((!C||!C.length)&&Pe(E)){var S=v&&v.length,_=E({yAxis:g?pr(pr({},g),{},{ticks:S?v:g.ticks}):void 0,width:l,height:c,offset:u},S?!0:p);Yi(Array.isArray(_),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(wo(_),"]")),Array.isArray(_)&&(C=_)}if((!j||!j.length)&&Pe(w)){var O=y&&y.length,I=w({xAxis:b?pr(pr({},b),{},{ticks:O?y:b.ticks}):void 0,width:l,height:c,offset:u},O?!0:p);Yi(Array.isArray(I),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(wo(I),"]")),Array.isArray(I)&&(j=I)}return q.createElement("g",{className:"recharts-cartesian-grid"},q.createElement(WEe,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),q.createElement(HEe,Vs({},d,{offset:u,horizontalPoints:C,xAxis:b,yAxis:g})),q.createElement(KEe,Vs({},d,{offset:u,verticalPoints:j,xAxis:b,yAxis:g})),q.createElement(VEe,Vs({},d,{horizontalPoints:C})),q.createElement(GEe,Vs({},d,{verticalPoints:j})))}yu.displayName="CartesianGrid";var ZEe=["layout","type","stroke","connectNulls","isRange","ref"],XEe=["key"],pD;function dc(e){"@babel/helpers - typeof";return dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dc(e)}function mD(e,t){if(e==null)return{};var r=QEe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function QEe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Gs(){return Gs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gs.apply(this,arguments)}function X6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ka(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?X6(Object(r),!0).forEach(function(n){vi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q6(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,vD(n.key),n)}}function ewe(e,t,r){return t&&Q6(e.prototype,t),r&&Q6(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function twe(e,t,r){return t=Rh(t),rwe(e,gD()?Reflect.construct(t,r||[],Rh(e).constructor):t.apply(e,r))}function rwe(e,t){if(t&&(dc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nwe(e)}function nwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gD=function(){return!!e})()}function Rh(e){return Rh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Rh(e)}function iwe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zb(e,t)}function Zb(e,t){return Zb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Zb(e,t)}function vi(e,t,r){return t=vD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vD(e){var t=awe(e,"string");return dc(t)=="symbol"?t:t+""}function awe(e,t){if(dc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(dc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xa=function(e){function t(){var r;JEe(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=twe(this,t,[].concat(i)),vi(r,"state",{isAnimationFinished:!0}),vi(r,"id",C0("recharts-area-")),vi(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Pe(o)&&o()}),vi(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),Pe(o)&&o()}),r}return iwe(t,e),ewe(t,[{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive,l=this.state.isAnimationFinished;if(o&&!l)return null;var c=this.props,u=c.dot,d=c.points,x=c.dataKey,f=Te(this.props,!1),h=Te(u,!0),m=d.map(function(v,y){var b=ka(ka(ka({key:"dot-".concat(y),r:3},f),h),{},{index:y,cx:v.x,cy:v.y,dataKey:x,value:v.value,payload:v.payload,points:d});return t.renderDotItem(u,b)}),p={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return q.createElement(vt,Gs({className:"recharts-area-dots"},p),m)}},{key:"renderHorizontalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,l=i.strokeWidth,c=o[0].x,u=o[o.length-1].x,d=n*Math.abs(c-u),x=Wa(o.map(function(f){return f.y||0}));return me(a)&&typeof a=="number"?x=Math.max(a,x):a&&Array.isArray(a)&&a.length&&(x=Math.max(Wa(a.map(function(f){return f.y||0})),x)),me(x)?q.createElement("rect",{x:c<u?c:c-d,y:0,width:d,height:Math.floor(x+(l?parseInt("".concat(l),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,l=i.strokeWidth,c=o[0].y,u=o[o.length-1].y,d=n*Math.abs(c-u),x=Wa(o.map(function(f){return f.x||0}));return me(a)&&typeof a=="number"?x=Math.max(a,x):a&&Array.isArray(a)&&a.length&&(x=Math.max(Wa(a.map(function(f){return f.x||0})),x)),me(x)?q.createElement("rect",{x:0,y:c<u?c:c-d,width:x+(l?parseInt("".concat(l),10):1),height:Math.floor(d)}):null}},{key:"renderClipRect",value:function(n){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,i,a,o){var l=this.props,c=l.layout,u=l.type,d=l.stroke,x=l.connectNulls,f=l.isRange;l.ref;var h=mD(l,ZEe);return q.createElement(vt,{clipPath:a?"url(#clipPath-".concat(o,")"):null},q.createElement(Mu,Gs({},Te(h,!0),{points:n,connectNulls:x,type:u,baseLine:i,layout:c,stroke:"none",className:"recharts-area-area"})),d!=="none"&&q.createElement(Mu,Gs({},Te(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:x,fill:"none",points:n})),d!=="none"&&f&&q.createElement(Mu,Gs({},Te(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:x,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(n,i){var a=this,o=this.props,l=o.points,c=o.baseLine,u=o.isAnimationActive,d=o.animationBegin,x=o.animationDuration,f=o.animationEasing,h=o.animationId,m=this.state,p=m.prevPoints,v=m.prevBaseLine;return q.createElement(da,{begin:d,duration:x,isActive:u,easing:f,from:{t:0},to:{t:1},key:"area-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(y){var b=y.t;if(p){var g=p.length/l.length,w=l.map(function(S,_){var O=Math.floor(_*g);if(p[O]){var I=p[O],B=vn(I.x,S.x),T=vn(I.y,S.y);return ka(ka({},S),{},{x:B(b),y:T(b)})}return S}),E;if(me(c)&&typeof c=="number"){var C=vn(v,c);E=C(b)}else if(Ie(c)||Dc(c)){var j=vn(v,0);E=j(b)}else E=c.map(function(S,_){var O=Math.floor(_*g);if(v[O]){var I=v[O],B=vn(I.x,S.x),T=vn(I.y,S.y);return ka(ka({},S),{},{x:B(b),y:T(b)})}return S});return a.renderAreaStatically(w,E,n,i)}return q.createElement(vt,null,q.createElement("defs",null,q.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(b))),q.createElement(vt,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(l,c,n,i)))})}},{key:"renderArea",value:function(n,i){var a=this.props,o=a.points,l=a.baseLine,c=a.isAnimationActive,u=this.state,d=u.prevPoints,x=u.prevBaseLine,f=u.totalLength;return c&&o&&o.length&&(!d&&f>0||!Od(d,o)||!Od(x,l))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(o,l,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,l=i.points,c=i.className,u=i.top,d=i.left,x=i.xAxis,f=i.yAxis,h=i.width,m=i.height,p=i.isAnimationActive,v=i.id;if(a||!l||!l.length)return null;var y=this.state.isAnimationFinished,b=l.length===1,g=Me("recharts-area",c),w=x&&x.allowDataOverflow,E=f&&f.allowDataOverflow,C=w||E,j=Ie(v)?this.id:v,S=(n=Te(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},_=S.r,O=_===void 0?3:_,I=S.strokeWidth,B=I===void 0?2:I,T=Ate(o)?o:{},k=T.clipDot,$=k===void 0?!0:k,W=O*2+B;return q.createElement(vt,{className:g},w||E?q.createElement("defs",null,q.createElement("clipPath",{id:"clipPath-".concat(j)},q.createElement("rect",{x:w?d:d-h/2,y:E?u:u-m/2,width:w?h:h*2,height:E?m:m*2})),!$&&q.createElement("clipPath",{id:"clipPath-dots-".concat(j)},q.createElement("rect",{x:d-W/2,y:u-W/2,width:h+W,height:m+W}))):null,b?null:this.renderArea(C,j),(o||b)&&this.renderDots(C,$,j),(!p||y)&&ns.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(A.PureComponent);pD=xa;vi(xa,"displayName","Area");vi(xa,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Zi.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});vi(xa,"getBaseValue",function(e,t,r,n){var i=e.layout,a=e.baseValue,o=t.props.baseValue,l=o??a;if(me(l)&&typeof l=="number")return l;var c=i==="horizontal"?n:r,u=c.scale.domain();if(c.type==="number"){var d=Math.max(u[0],u[1]),x=Math.min(u[0],u[1]);return l==="dataMin"?x:l==="dataMax"||d<0?d:Math.max(Math.min(u[0],u[1]),0)}return l==="dataMin"?u[0]:l==="dataMax"?u[1]:u[0]});vi(xa,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,l=e.bandSize,c=e.dataKey,u=e.stackedData,d=e.dataStartIndex,x=e.displayedData,f=e.offset,h=t.layout,m=u&&u.length,p=pD.getBaseValue(t,r,n,i),v=h==="horizontal",y=!1,b=x.map(function(w,E){var C;m?C=u[d+E]:(C=an(w,c),Array.isArray(C)?y=!0:C=[p,C]);var j=C[1]==null||m&&an(w,c)==null;return v?{x:PA({axis:n,ticks:a,bandSize:l,entry:w,index:E}),y:j?null:i.scale(C[1]),value:C,payload:w}:{x:j?null:n.scale(C[1]),y:PA({axis:i,ticks:o,bandSize:l,entry:w,index:E}),value:C,payload:w}}),g;return m||y?g=b.map(function(w){var E=Array.isArray(w.value)?w.value[0]:null;return v?{x:w.x,y:E!=null&&w.y!=null?i.scale(E):null}:{x:E!=null?n.scale(E):null,y:w.y}}):g=v?i.scale(p):n.scale(p),ka({points:b,baseLine:g,layout:h,isRange:y},f)});vi(xa,"renderDotItem",function(e,t){var r;if(q.isValidElement(e))r=q.cloneElement(e,t);else if(Pe(e))r=e(t);else{var n=Me("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=mD(t,XEe);r=q.createElement(Mw,Gs({},a,{key:i,className:n}))}return r});function xc(e){"@babel/helpers - typeof";return xc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xc(e)}function swe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function owe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ED(n.key),n)}}function lwe(e,t,r){return t&&owe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cwe(e,t,r){return t=Lh(t),uwe(e,yD()?Reflect.construct(t,r||[],Lh(e).constructor):t.apply(e,r))}function uwe(e,t){if(t&&(xc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dwe(e)}function dwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yD=function(){return!!e})()}function Lh(e){return Lh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Lh(e)}function xwe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xb(e,t)}function Xb(e,t){return Xb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Xb(e,t)}function bD(e,t,r){return t=ED(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ED(e){var t=fwe(e,"string");return xc(t)=="symbol"?t:t+""}function fwe(e,t){if(xc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(xc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qb(){return Qb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qb.apply(this,arguments)}function hwe(e){var t=e.xAxisId,r=Uw(),n=Ww(),i=nD(t);return i==null?null:A.createElement(Mc,Qb({},i,{className:Me("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return Ki(o,!0)}}))}var Ka=function(e){function t(){return swe(this,t),cwe(this,t,arguments)}return xwe(t,e),lwe(t,[{key:"render",value:function(){return A.createElement(hwe,this.props)}}])}(A.Component);bD(Ka,"displayName","XAxis");bD(Ka,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function fc(e){"@babel/helpers - typeof";return fc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fc(e)}function pwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mwe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,AD(n.key),n)}}function gwe(e,t,r){return t&&mwe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vwe(e,t,r){return t=zh(t),ywe(e,wD()?Reflect.construct(t,r||[],zh(e).constructor):t.apply(e,r))}function ywe(e,t){if(t&&(fc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bwe(e)}function bwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wD=function(){return!!e})()}function zh(e){return zh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},zh(e)}function Ewe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jb(e,t)}function Jb(e,t){return Jb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Jb(e,t)}function CD(e,t,r){return t=AD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AD(e){var t=wwe(e,"string");return fc(t)=="symbol"?t:t+""}function wwe(e,t){if(fc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(fc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e1(){return e1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e1.apply(this,arguments)}var Cwe=function(t){var r=t.yAxisId,n=Uw(),i=Ww(),a=iD(r);return a==null?null:A.createElement(Mc,e1({},a,{className:Me("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(l){return Ki(l,!0)}}))},Va=function(e){function t(){return pwe(this,t),vwe(this,t,arguments)}return Ewe(t,e),gwe(t,[{key:"render",value:function(){return A.createElement(Cwe,this.props)}}])}(A.Component);CD(Va,"displayName","YAxis");CD(Va,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function J6(e){return _we(e)||kwe(e)||jwe(e)||Awe()}function Awe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 961In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jwe(e,t){if(e){if(typeof e=="string")return t1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t1(e,t)}}function kwe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _we(e){if(Array.isArray(e))return t1(e)}function t1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var r1=function(t,r,n,i,a){var o=Jn(t,Kw),l=Jn(t,cm),c=[].concat(J6(o),J6(l)),u=Jn(t,dm),d="".concat(i,"Id"),x=i[0],f=r;if(c.length&&(f=c.reduce(function(p,v){if(v.props[d]===n&&Ci(v.props,"extendDomain")&&me(v.props[x])){var y=v.props[x];return[Math.min(p[0],y),Math.max(p[1],y)]}return p},f)),u.length){var h="".concat(x,"1"),m="".concat(x,"2");f=u.reduce(function(p,v){if(v.props[d]===n&&Ci(v.props,"extendDomain")&&me(v.props[h])&&me(v.props[m])){var y=v.props[h],b=v.props[m];return[Math.min(p[0],y,b),Math.max(p[1],y,b)]}return p},f)}return a&&a.length&&(f=a.reduce(function(p,v){return me(v)?[Math.min(p[0],v),Math.max(p[1],v)]:p},f)),f},jD={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,u,d){this.fn=c,this.context=u,this.once=d||!1}function a(c,u,d,x,f){if(typeof d!="function")throw new TypeError("The listener must be a function");var h=new i(d,x||c,f),m=r?r+u:u;return c._events[m]?c._events[m].fn?c._events[m]=[c._events[m],h]:c._events[m].push(h):(c._events[m]=h,c._eventsCount++),c}function o(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],d,x;if(this._eventsCount===0)return u;for(x in d=this._events)t.call(d,x)&&u.push(r?x.slice(1):x);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},l.prototype.listeners=function(u){var d=r?r+u:u,x=this._events[d];if(!x)return[];if(x.fn)return[x.fn];for(var f=0,h=x.length,m=new Array(h);f<h;f++)m[f]=x[f].fn;return m},l.prototype.listenerCount=function(u){var d=r?r+u:u,x=this._events[d];return x?x.fn?1:x.length:0},l.prototype.emit=function(u,d,x,f,h,m){var p=r?r+u:u;if(!this._events[p])return!1;var v=this._events[p],y=arguments.length,b,g;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),y){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,d),!0;case 3:return v.fn.call(v.context,d,x),!0;case 4:return v.fn.call(v.context,d,x,f),!0;case 5:return v.fn.call(v.context,d,x,f,h),!0;case 6:return v.fn.call(v.context,d,x,f,h,m),!0}for(g=1,b=new Array(y-1);g<y;g++)b[g-1]=arguments[g];v.fn.apply(v.context,b)}else{var w=v.length,E;for(g=0;g<w;g++)switch(v[g].once&&this.removeListener(u,v[g].fn,void 0,!0),y){case 1:v[g].fn.call(v[g].context);break;case 2:v[g].fn.call(v[g].context,d);break;case 3:v[g].fn.call(v[g].context,d,x);break;case 4:v[g].fn.call(v[g].context,d,x,f);break;default:if(!b)for(E=1,b=new Array(y-1);E<y;E++)b[E-1]=arguments[E];v[g].fn.apply(v[g].context,b)}}return!0},l.prototype.on=function(u,d,x){return a(this,u,d,x,!1)},l.prototype.once=function(u,d,x){return a(this,u,d,x,!0)},l.prototype.removeListener=function(u,d,x,f){var h=r?r+u:u;if(!this._events[h])return this;if(!d)return o(this,h),this;var m=this._events[h];if(m.fn)m.fn===d&&(!f||m.once)&&(!x||m.context===x)&&o(this,h);else{for(var p=0,v=[],y=m.length;p<y;p++)(m[p].fn!==d||f&&!m[p].once||x&&m[p].context!==x)&&v.push(m[p]);v.length?this._events[h]=v.length===1?v[0]:v:o(this,h)}return this},l.prototype.removeAllListeners=function(u){var d;return u?(d=r?r+u:u,this._events[d]&&o(this,d)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(jD);var Swe=jD.exports;const Bwe=qe(Swe);var Gg=new Bwe,qg="recharts.syncMouseEvents";function r0(e){"@babel/helpers - typeof";return r0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r0(e)}function Nwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dwe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,kD(n.key),n)}}function Fwe(e,t,r){return t&&Dwe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yg(e,t,r){return t=kD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kD(e){var t=Pwe(e,"string");return r0(t)=="symbol"?t:t+""}function Pwe(e,t){if(r0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(r0(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Owe=function(){function e(){Nwe(this,e),Yg(this,"activeIndex",0),Yg(this,"coordinateList",[]),Yg(this,"layout","horizontal")}return Fwe(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,o=r.container,l=o===void 0?null:o,c=r.layout,u=c===void 0?null:c,d=r.offset,x=d===void 0?null:d,f=r.mouseHandlerCallback,h=f===void 0?null:f;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=l??this.container,this.layout=u??this.layout,this.offset=x??this.offset,this.mouseHandlerCallback=h??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,o=i.y,l=i.height,c=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,d=((n=window)===null||n===void 0?void 0:n.scrollY)||0,x=a+c+u,f=o+this.offset.top+l/2+d;this.mouseHandlerCallback({pageX:x,pageY:f})}}}])}();function Twe(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],i=e==null?void 0:e[1];if(n&&i&&me(n)&&me(i))return!0}return!1}function $we(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function _D(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,a=e.endAngle,o=nr(t,r,n,i),l=nr(t,r,n,a);return{points:[o,l],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function Iwe(e,t,r){var n,i,a,o;if(e==="horizontal")n=t.x,a=n,i=r.top,o=r.top+r.height;else if(e==="vertical")i=t.y,o=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,c=t.cy,u=t.innerRadius,d=t.outerRadius,x=t.angle,f=nr(l,c,u,x),h=nr(l,c,d,x);n=f.x,i=f.y,a=h.x,o=h.y}else return _D(t);return[{x:n,y:i},{x:a,y:o}]}function n0(e){"@babel/helpers - typeof";return n0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n0(e)}function ej(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ej(Object(r),!0).forEach(function(n){Mwe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ej(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mwe(e,t,r){return t=Rwe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rwe(e){var t=Lwe(e,"string");return n0(t)=="symbol"?t:t+""}function Lwe(e,t){if(n0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(n0(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zwe(e){var t,r,n=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,l=e.activePayload,c=e.offset,u=e.activeTooltipIndex,d=e.tooltipAxisBandSize,x=e.layout,f=e.chartName,h=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!h||!a||!o||f!=="ScatterChart"&&i!=="axis")return null;var m,p=Mu;if(f==="ScatterChart")m=o,p=Kve;else if(f==="BarChart")m=$we(x,o,c,d),p=Iw;else if(x==="radial"){var v=_D(o),y=v.cx,b=v.cy,g=v.radius,w=v.startAngle,E=v.endAngle;m={cx:y,cy:b,startAngle:w,endAngle:E,innerRadius:g,outerRadius:g},p=S7}else m={points:Iwe(x,o,c)},p=Mu;var C=kx(kx(kx(kx({stroke:"#ccc",pointerEvents:"none"},c),m),Te(h,!1)),{},{payload:l,payloadIndex:u,className:Me("recharts-tooltip-cursor",h.className)});return A.isValidElement(h)?A.cloneElement(h,C):A.createElement(p,C)}var Uwe=["item"],Wwe=["children","className","width","height","style","compact","title","desc"];function hc(e){"@babel/helpers - typeof";return hc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hc(e)}function ul(){return ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ul.apply(this,arguments)}function tj(e,t){return Vwe(e)||Kwe(e,t)||BD(e,t)||Hwe()}function Hwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 962In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kwe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function Vwe(e){if(Array.isArray(e))return e}function rj(e,t){if(e==null)return{};var r=Gwe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Gwe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function qwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ywe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ND(n.key),n)}}function Zwe(e,t,r){return t&&Ywe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xwe(e,t,r){return t=Uh(t),Qwe(e,SD()?Reflect.construct(t,r||[],Uh(e).constructor):t.apply(e,r))}function Qwe(e,t){if(t&&(hc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jwe(e)}function Jwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SD=function(){return!!e})()}function Uh(e){return Uh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Uh(e)}function e2e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n1(e,t)}function n1(e,t){return n1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},n1(e,t)}function pc(e){return n2e(e)||r2e(e)||BD(e)||t2e()}function t2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 963In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BD(e,t){if(e){if(typeof e=="string")return i1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i1(e,t)}}function r2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function n2e(e){if(Array.isArray(e))return i1(e)}function i1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function nj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function le(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nj(Object(r),!0).forEach(function(n){je(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function je(e,t,r){return t=ND(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ND(e){var t=i2e(e,"string");return hc(t)=="symbol"?t:t+""}function i2e(e,t){if(hc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(hc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var a2e={xAxis:["bottom","top"],yAxis:["left","right"]},s2e={width:"100%",height:"100%"},DD={x:0,y:0};function _x(e){return e}var o2e=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},l2e=function(t,r,n,i){var a=r.find(function(d){return d&&d.index===n});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,l=i.radius;return le(le(le({},i),nr(i.cx,i.cy,l,o)),{},{angle:o,radius:l})}var c=a.coordinate,u=i.angle;return le(le(le({},i),nr(i.cx,i.cy,c,u)),{},{angle:u,radius:c})}return DD},xm=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,o=(n??[]).reduce(function(l,c){var u=c.props.data;return u&&u.length?[].concat(pc(l),pc(u)):l},[]);return o.length>0?o:t&&t.length&&me(i)&&me(a)?t.slice(i,a+1):[]};function FD(e){return e==="number"?[0,"auto"]:void 0}var a1=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,l=xm(r,t);return n<0||!a||!a.length||n>=l.length?null:a.reduce(function(c,u){var d,x=(d=u.props.data)!==null&&d!==void 0?d:r;x&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(x=x.slice(t.dataStartIndex,t.dataEndIndex+1));var f;if(o.dataKey&&!o.allowDuplicatedCategory){var h=x===void 0?l:x;f=Hf(h,o.dataKey,i)}else f=x&&x[n]||l[n];return f?[].concat(pc(c),[j7(u,f)]):c},[])},ij=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=o2e(a,n),l=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,d=_pe(o,l,u,c);if(d>=0&&u){var x=u[d]&&u[d].value,f=a1(t,r,d,x),h=l2e(n,l,d,a);return{activeTooltipIndex:d,activeLabel:x,activePayload:f,activeCoordinate:h}}return null},c2e=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,d=t.layout,x=t.children,f=t.stackOffset,h=w7(d,a);return n.reduce(function(m,p){var v,y=p.type.defaultProps!==void 0?le(le({},p.type.defaultProps),p.props):p.props,b=y.type,g=y.dataKey,w=y.allowDataOverflow,E=y.allowDuplicatedCategory,C=y.scale,j=y.ticks,S=y.includeHidden,_=y[o];if(m[_])return m;var O=xm(t.data,{graphicalItems:i.filter(function(N){var K,R=o in N.props?N.props[o]:(K=N.type.defaultProps)===null||K===void 0?void 0:K[o];return R===_}),dataStartIndex:c,dataEndIndex:u}),I=O.length,B,T,k;Twe(y.domain,w,b)&&(B=Ab(y.domain,null,w),h&&(b==="number"||C!=="auto")&&(k=Iu(O,g,"category")));var $=FD(b);if(!B||B.length===0){var W,z=(W=y.domain)!==null&&W!==void 0?W:$;if(g){if(B=Iu(O,g,b),b==="category"&&h){var L=hte(B);E&&L?(T=B,B=Bh(0,I)):E||(B=IA(z,B,p).reduce(function(N,K){return N.indexOf(K)>=0?N:[].concat(pc(N),[K])},[]))}else if(b==="category")E?B=B.filter(function(N){return N!==""&&!Ie(N)}):B=IA(z,B,p).reduce(function(N,K){return N.indexOf(K)>=0||K===""||Ie(K)?N:[].concat(pc(N),[K])},[]);else if(b==="number"){var F=Fpe(O,i.filter(function(N){var K,R,H=o in N.props?N.props[o]:(K=N.type.defaultProps)===null||K===void 0?void 0:K[o],X="hide"in N.props?N.props.hide:(R=N.type.defaultProps)===null||R===void 0?void 0:R.hide;return H===_&&(S||!X)}),g,a,d);F&&(B=F)}h&&(b==="number"||C!=="auto")&&(k=Iu(O,g,"category"))}else h?B=Bh(0,I):l&&l[_]&&l[_].hasStack&&b==="number"?B=f==="expand"?[0,1]:A7(l[_].stackGroups,c,u):B=E7(O,i.filter(function(N){var K=o in N.props?N.props[o]:N.type.defaultProps[o],R="hide"in N.props?N.props.hide:N.type.defaultProps.hide;return K===_&&(S||!R)}),b,d,!0);if(b==="number")B=r1(x,B,_,a,j),z&&(B=Ab(z,B,w));else if(b==="category"&&z){var U=z,D=B.every(function(N){return U.indexOf(N)>=0});D&&(B=U)}}return le(le({},m),{},je({},_,le(le({},y),{},{axisType:a,domain:B,categoricalDomain:k,duplicateDomain:T,originalDomain:(v=y.domain)!==null&&v!==void 0?v:$,isCategorical:h,layout:d})))},{})},u2e=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,d=t.layout,x=t.children,f=xm(t.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:u}),h=f.length,m=w7(d,a),p=-1;return n.reduce(function(v,y){var b=y.type.defaultProps!==void 0?le(le({},y.type.defaultProps),y.props):y.props,g=b[o],w=FD("number");if(!v[g]){p++;var E;return m?E=Bh(0,h):l&&l[g]&&l[g].hasStack?(E=A7(l[g].stackGroups,c,u),E=r1(x,E,g,a)):(E=Ab(w,E7(f,n.filter(function(C){var j,S,_=o in C.props?C.props[o]:(j=C.type.defaultProps)===null||j===void 0?void 0:j[o],O="hide"in C.props?C.props.hide:(S=C.type.defaultProps)===null||S===void 0?void 0:S.hide;return _===g&&!O}),"number",d),i.defaultProps.allowDataOverflow),E=r1(x,E,g,a)),le(le({},v),{},je({},g,le(le({axisType:a},i.defaultProps),{},{hide:!0,orientation:Cn(a2e,"".concat(a,".").concat(p%2),null),domain:E,originalDomain:w,isCategorical:m,layout:d})))}return v},{})},d2e=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,d=t.children,x="".concat(i,"Id"),f=Jn(d,a),h={};return f&&f.length?h=c2e(t,{axes:f,graphicalItems:o,axisType:i,axisIdKey:x,stackGroups:l,dataStartIndex:c,dataEndIndex:u}):o&&o.length&&(h=u2e(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:x,stackGroups:l,dataStartIndex:c,dataEndIndex:u})),h},x2e=function(t){var r=Oa(t),n=Ki(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:uw(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:bh(r,n)}},aj=function(t){var r=t.children,n=t.defaultShowTooltip,i=Yr(r,ac),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},f2e=function(t){return!t||!t.length?!1:t.some(function(r){var n=qi(r&&r.type);return n&&n.indexOf("Bar")>=0})},sj=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},h2e=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,l=t.yAxisMap,c=l===void 0?{}:l,u=n.width,d=n.height,x=n.children,f=n.margin||{},h=Yr(x,ac),m=Yr(x,Cl),p=Object.keys(c).reduce(function(E,C){var j=c[C],S=j.orientation;return!j.mirror&&!j.hide?le(le({},E),{},je({},S,E[S]+j.width)):E},{left:f.left||0,right:f.right||0}),v=Object.keys(o).reduce(function(E,C){var j=o[C],S=j.orientation;return!j.mirror&&!j.hide?le(le({},E),{},je({},S,Cn(E,"".concat(S))+j.height)):E},{top:f.top||0,bottom:f.bottom||0}),y=le(le({},v),p),b=y.bottom;h&&(y.bottom+=h.props.height||ac.defaultProps.height),m&&r&&(y=Npe(y,i,n,r));var g=u-y.left-y.right,w=d-y.top-y.bottom;return le(le({brushBottom:b},y),{},{width:Math.max(g,0),height:Math.max(w,0)})},p2e=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},PD=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,c=t.axisComponents,u=t.legendContent,d=t.formatAxisMap,x=t.defaultProps,f=function(y,b){var g=b.graphicalItems,w=b.stackGroups,E=b.offset,C=b.updateId,j=b.dataStartIndex,S=b.dataEndIndex,_=y.barSize,O=y.layout,I=y.barGap,B=y.barCategoryGap,T=y.maxBarSize,k=sj(O),$=k.numericAxisName,W=k.cateAxisName,z=f2e(g),L=[];return g.forEach(function(F,U){var D=xm(y.data,{graphicalItems:[F],dataStartIndex:j,dataEndIndex:S}),N=F.type.defaultProps!==void 0?le(le({},F.type.defaultProps),F.props):F.props,K=N.dataKey,R=N.maxBarSize,H=N["".concat($,"Id")],X=N["".concat(W,"Id")],ie={},se=c.reduce(function(te,J){var oe=b["".concat(J.axisType,"Map")],pe=N["".concat(J.axisType,"Id")];oe&&oe[pe]||J.axisType==="zAxis"||Eo();var xe=oe[pe];return le(le({},te),{},je(je({},J.axisType,xe),"".concat(J.axisType,"Ticks"),Ki(xe)))},ie),ne=se[W],ce=se["".concat(W,"Ticks")],ae=w&&w[H]&&w[H].hasStack&&Hpe(F,w[H].stackGroups),Q=qi(F.type).indexOf("Bar")>=0,he=bh(ne,ce),P=[],G=z&&Spe({barSize:_,stackGroups:w,totalSize:p2e(se,W)});if(Q){var Z,V,M=Ie(R)?T:R,Y=(Z=(V=bh(ne,ce,!0))!==null&&V!==void 0?V:M)!==null&&Z!==void 0?Z:0;P=Bpe({barGap:I,barCategoryGap:B,bandSize:Y!==he?Y:he,sizeList:G[X],maxBarSize:M}),Y!==he&&(P=P.map(function(te){return le(le({},te),{},{position:le(le({},te.position),{},{offset:te.position.offset-Y/2})})}))}var ee=F&&F.type&&F.type.getComposedData;ee&&L.push({props:le(le({},ee(le(le({},se),{},{displayedData:D,props:y,dataKey:K,item:F,bandSize:he,barPosition:P,offset:E,stackedData:ae,layout:O,dataStartIndex:j,dataEndIndex:S}))),{},je(je(je({key:F.key||"item-".concat(U)},$,se[$]),W,se[W]),"animationId",C)),childIndex:_te(F,y.children),item:F})}),L},h=function(y,b){var g=y.props,w=y.dataStartIndex,E=y.dataEndIndex,C=y.updateId;if(!N5({props:g}))return null;var j=g.children,S=g.layout,_=g.stackOffset,O=g.data,I=g.reverseStackOrder,B=sj(S),T=B.numericAxisName,k=B.cateAxisName,$=Jn(j,n),W=zpe(O,$,"".concat(T,"Id"),"".concat(k,"Id"),_,I),z=c.reduce(function(N,K){var R="".concat(K.axisType,"Map");return le(le({},N),{},je({},R,d2e(g,le(le({},K),{},{graphicalItems:$,stackGroups:K.axisType===T&&W,dataStartIndex:w,dataEndIndex:E}))))},{}),L=h2e(le(le({},z),{},{props:g,graphicalItems:$}),b==null?void 0:b.legendBBox);Object.keys(z).forEach(function(N){z[N]=d(g,z[N],L,N.replace("Map",""),r)});var F=z["".concat(k,"Map")],U=x2e(F),D=f(g,le(le({},z),{},{dataStartIndex:w,dataEndIndex:E,updateId:C,graphicalItems:$,stackGroups:W,offset:L}));return le(le({formattedGraphicalItems:D,graphicalItems:$,offset:L,stackGroups:W},U),z)},m=function(v){function y(b){var g,w,E;return qwe(this,y),E=Xwe(this,y,[b]),je(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),je(E,"accessibilityManager",new Owe),je(E,"handleLegendBBoxUpdate",function(C){if(C){var j=E.state,S=j.dataStartIndex,_=j.dataEndIndex,O=j.updateId;E.setState(le({legendBBox:C},h({props:E.props,dataStartIndex:S,dataEndIndex:_,updateId:O},le(le({},E.state),{},{legendBBox:C}))))}}),je(E,"handleReceiveSyncEvent",function(C,j,S){if(E.props.syncId===C){if(S===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(j)}}),je(E,"handleBrushChange",function(C){var j=C.startIndex,S=C.endIndex;if(j!==E.state.dataStartIndex||S!==E.state.dataEndIndex){var _=E.state.updateId;E.setState(function(){return le({dataStartIndex:j,dataEndIndex:S},h({props:E.props,dataStartIndex:j,dataEndIndex:S,updateId:_},E.state))}),E.triggerSyncEvent({dataStartIndex:j,dataEndIndex:S})}}),je(E,"handleMouseEnter",function(C){var j=E.getMouseInfo(C);if(j){var S=le(le({},j),{},{isTooltipActive:!0});E.setState(S),E.triggerSyncEvent(S);var _=E.props.onMouseEnter;Pe(_)&&_(S,C)}}),je(E,"triggeredAfterMouseMove",function(C){var j=E.getMouseInfo(C),S=j?le(le({},j),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(S),E.triggerSyncEvent(S);var _=E.props.onMouseMove;Pe(_)&&_(S,C)}),je(E,"handleItemMouseEnter",function(C){E.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),je(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),je(E,"handleMouseMove",function(C){C.persist(),E.throttleTriggeredAfterMouseMove(C)}),je(E,"handleMouseLeave",function(C){E.throttleTriggeredAfterMouseMove.cancel();var j={isTooltipActive:!1};E.setState(j),E.triggerSyncEvent(j);var S=E.props.onMouseLeave;Pe(S)&&S(j,C)}),je(E,"handleOuterEvent",function(C){var j=kte(C),S=Cn(E.props,"".concat(j));if(j&&Pe(S)){var _,O;/.*touch.*/i.test(j)?O=E.getMouseInfo(C.changedTouches[0]):O=E.getMouseInfo(C),S((_=O)!==null&&_!==void 0?_:{},C)}}),je(E,"handleClick",function(C){var j=E.getMouseInfo(C);if(j){var S=le(le({},j),{},{isTooltipActive:!0});E.setState(S),E.triggerSyncEvent(S);var _=E.props.onClick;Pe(_)&&_(S,C)}}),je(E,"handleMouseDown",function(C){var j=E.props.onMouseDown;if(Pe(j)){var S=E.getMouseInfo(C);j(S,C)}}),je(E,"handleMouseUp",function(C){var j=E.props.onMouseUp;if(Pe(j)){var S=E.getMouseInfo(C);j(S,C)}}),je(E,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),je(E,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseDown(C.changedTouches[0])}),je(E,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseUp(C.changedTouches[0])}),je(E,"handleDoubleClick",function(C){var j=E.props.onDoubleClick;if(Pe(j)){var S=E.getMouseInfo(C);j(S,C)}}),je(E,"handleContextMenu",function(C){var j=E.props.onContextMenu;if(Pe(j)){var S=E.getMouseInfo(C);j(S,C)}}),je(E,"triggerSyncEvent",function(C){E.props.syncId!==void 0&&Gg.emit(qg,E.props.syncId,C,E.eventEmitterSymbol)}),je(E,"applySyncEvent",function(C){var j=E.props,S=j.layout,_=j.syncMethod,O=E.state.updateId,I=C.dataStartIndex,B=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)E.setState(le({dataStartIndex:I,dataEndIndex:B},h({props:E.props,dataStartIndex:I,dataEndIndex:B,updateId:O},E.state)));else if(C.activeTooltipIndex!==void 0){var T=C.chartX,k=C.chartY,$=C.activeTooltipIndex,W=E.state,z=W.offset,L=W.tooltipTicks;if(!z)return;if(typeof _=="function")$=_(L,C);else if(_==="value"){$=-1;for(var F=0;F<L.length;F++)if(L[F].value===C.activeLabel){$=F;break}}var U=le(le({},z),{},{x:z.left,y:z.top}),D=Math.min(T,U.x+U.width),N=Math.min(k,U.y+U.height),K=L[$]&&L[$].value,R=a1(E.state,E.props.data,$),H=L[$]?{x:S==="horizontal"?L[$].coordinate:D,y:S==="horizontal"?N:L[$].coordinate}:DD;E.setState(le(le({},C),{},{activeLabel:K,activeCoordinate:H,activePayload:R,activeTooltipIndex:$}))}else E.setState(C)}),je(E,"renderCursor",function(C){var j,S=E.state,_=S.isTooltipActive,O=S.activeCoordinate,I=S.activePayload,B=S.offset,T=S.activeTooltipIndex,k=S.tooltipAxisBandSize,$=E.getTooltipEventType(),W=(j=C.props.active)!==null&&j!==void 0?j:_,z=E.props.layout,L=C.key||"_recharts-cursor";return q.createElement(zwe,{key:L,activeCoordinate:O,activePayload:I,activeTooltipIndex:T,chartName:r,element:C,isActive:W,layout:z,offset:B,tooltipAxisBandSize:k,tooltipEventType:$})}),je(E,"renderPolarAxis",function(C,j,S){var _=Cn(C,"type.axisType"),O=Cn(E.state,"".concat(_,"Map")),I=C.type.defaultProps,B=I!==void 0?le(le({},I),C.props):C.props,T=O&&O[B["".concat(_,"Id")]];return A.cloneElement(C,le(le({},T),{},{className:Me(_,T.className),key:C.key||"".concat(j,"-").concat(S),ticks:Ki(T,!0)}))}),je(E,"renderPolarGrid",function(C){var j=C.props,S=j.radialLines,_=j.polarAngles,O=j.polarRadius,I=E.state,B=I.radiusAxisMap,T=I.angleAxisMap,k=Oa(B),$=Oa(T),W=$.cx,z=$.cy,L=$.innerRadius,F=$.outerRadius;return A.cloneElement(C,{polarAngles:Array.isArray(_)?_:Ki($,!0).map(function(U){return U.coordinate}),polarRadius:Array.isArray(O)?O:Ki(k,!0).map(function(U){return U.coordinate}),cx:W,cy:z,innerRadius:L,outerRadius:F,key:C.key||"polar-grid",radialLines:S})}),je(E,"renderLegend",function(){var C=E.state.formattedGraphicalItems,j=E.props,S=j.children,_=j.width,O=j.height,I=E.props.margin||{},B=_-(I.left||0)-(I.right||0),T=y7({children:S,formattedGraphicalItems:C,legendWidth:B,legendContent:u});if(!T)return null;var k=T.item,$=rj(T,Uwe);return A.cloneElement(k,le(le({},$),{},{chartWidth:_,chartHeight:O,margin:I,onBBoxUpdate:E.handleLegendBBoxUpdate}))}),je(E,"renderTooltip",function(){var C,j=E.props,S=j.children,_=j.accessibilityLayer,O=Yr(S,Zr);if(!O)return null;var I=E.state,B=I.isTooltipActive,T=I.activeCoordinate,k=I.activePayload,$=I.activeLabel,W=I.offset,z=(C=O.props.active)!==null&&C!==void 0?C:B;return A.cloneElement(O,{viewBox:le(le({},W),{},{x:W.left,y:W.top}),active:z,label:$,payload:z?k:[],coordinate:T,accessibilityLayer:_})}),je(E,"renderBrush",function(C){var j=E.props,S=j.margin,_=j.data,O=E.state,I=O.offset,B=O.dataStartIndex,T=O.dataEndIndex,k=O.updateId;return A.cloneElement(C,{key:C.key||"_recharts-brush",onChange:wx(E.handleBrushChange,C.props.onChange),data:_,x:me(C.props.x)?C.props.x:I.left,y:me(C.props.y)?C.props.y:I.top+I.height+I.brushBottom-(S.bottom||0),width:me(C.props.width)?C.props.width:I.width,startIndex:B,endIndex:T,updateId:"brush-".concat(k)})}),je(E,"renderReferenceElement",function(C,j,S){if(!C)return null;var _=E,O=_.clipPathId,I=E.state,B=I.xAxisMap,T=I.yAxisMap,k=I.offset,$=C.type.defaultProps||{},W=C.props,z=W.xAxisId,L=z===void 0?$.xAxisId:z,F=W.yAxisId,U=F===void 0?$.yAxisId:F;return A.cloneElement(C,{key:C.key||"".concat(j,"-").concat(S),xAxis:B[L],yAxis:T[U],viewBox:{x:k.left,y:k.top,width:k.width,height:k.height},clipPathId:O})}),je(E,"renderActivePoints",function(C){var j=C.item,S=C.activePoint,_=C.basePoint,O=C.childIndex,I=C.isRange,B=[],T=j.props.key,k=j.item.type.defaultProps!==void 0?le(le({},j.item.type.defaultProps),j.item.props):j.item.props,$=k.activeDot,W=k.dataKey,z=le(le({index:O,dataKey:W,cx:S.x,cy:S.y,r:4,fill:$w(j.item),strokeWidth:2,stroke:"#fff",payload:S.payload,value:S.value},Te($,!1)),Kf($));return B.push(y.renderActiveDot($,z,"".concat(T,"-activePoint-").concat(O))),_?B.push(y.renderActiveDot($,le(le({},z),{},{cx:_.x,cy:_.y}),"".concat(T,"-basePoint-").concat(O))):I&&B.push(null),B}),je(E,"renderGraphicChild",function(C,j,S){var _=E.filterFormatItem(C,j,S);if(!_)return null;var O=E.getTooltipEventType(),I=E.state,B=I.isTooltipActive,T=I.tooltipAxis,k=I.activeTooltipIndex,$=I.activeLabel,W=E.props.children,z=Yr(W,Zr),L=_.props,F=L.points,U=L.isRange,D=L.baseLine,N=_.item.type.defaultProps!==void 0?le(le({},_.item.type.defaultProps),_.item.props):_.item.props,K=N.activeDot,R=N.hide,H=N.activeBar,X=N.activeShape,ie=!!(!R&&B&&z&&(K||H||X)),se={};O!=="axis"&&z&&z.props.trigger==="click"?se={onClick:wx(E.handleItemMouseEnter,C.props.onClick)}:O!=="axis"&&(se={onMouseLeave:wx(E.handleItemMouseLeave,C.props.onMouseLeave),onMouseEnter:wx(E.handleItemMouseEnter,C.props.onMouseEnter)});var ne=A.cloneElement(C,le(le({},_.props),se));function ce(J){return typeof T.dataKey=="function"?T.dataKey(J.payload):null}if(ie)if(k>=0){var ae,Q;if(T.dataKey&&!T.allowDuplicatedCategory){var he=typeof T.dataKey=="function"?ce:"payload.".concat(T.dataKey.toString());ae=Hf(F,he,$),Q=U&&D&&Hf(D,he,$)}else ae=F==null?void 0:F[k],Q=U&&D&&D[k];if(X||H){var P=C.props.activeIndex!==void 0?C.props.activeIndex:k;return[A.cloneElement(C,le(le(le({},_.props),se),{},{activeIndex:P})),null,null]}if(!Ie(ae))return[ne].concat(pc(E.renderActivePoints({item:_,activePoint:ae,basePoint:Q,childIndex:k,isRange:U})))}else{var G,Z=(G=E.getItemByXY(E.state.activeCoordinate))!==null&&G!==void 0?G:{graphicalItem:ne},V=Z.graphicalItem,M=V.item,Y=M===void 0?C:M,ee=V.childIndex,te=le(le(le({},_.props),se),{},{activeIndex:ee});return[A.cloneElement(Y,te),null,null]}return U?[ne,null,null]:[ne,null]}),je(E,"renderCustomized",function(C,j,S){return A.cloneElement(C,le(le({key:"recharts-customized-".concat(S)},E.props),E.state))}),je(E,"renderMap",{CartesianGrid:{handler:_x,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:_x},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:_x},YAxis:{handler:_x},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((g=b.id)!==null&&g!==void 0?g:C0("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=vN(E.triggeredAfterMouseMove,(w=b.throttleDelay)!==null&&w!==void 0?w:1e3/60),E.state={},E}return e2e(y,v),Zwe(y,[{key:"componentDidMount",value:function(){var g,w;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(g=this.props.margin.left)!==null&&g!==void 0?g:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var g=this.props,w=g.children,E=g.data,C=g.height,j=g.layout,S=Yr(w,Zr);if(S){var _=S.props.defaultIndex;if(!(typeof _!="number"||_<0||_>this.state.tooltipTicks.length-1)){var O=this.state.tooltipTicks[_]&&this.state.tooltipTicks[_].value,I=a1(this.state,E,_,O),B=this.state.tooltipTicks[_].coordinate,T=(this.state.offset.top+C)/2,k=j==="horizontal",$=k?{x:B,y:T}:{y:B,x:T},W=this.state.formattedGraphicalItems.find(function(L){var F=L.item;return F.type.name==="Scatter"});W&&($=le(le({},$),W.props.points[_].tooltipPosition),I=W.props.points[_].tooltipPayload);var z={activeTooltipIndex:_,isTooltipActive:!0,activeLabel:O,activePayload:I,activeCoordinate:$};this.setState(z),this.renderCursor(S),this.accessibilityManager.setIndex(_)}}}},{key:"getSnapshotBeforeUpdate",value:function(g,w){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==w.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==g.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==g.margin){var E,C;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(g){Ry([Yr(g.children,Zr)],[Yr(this.props.children,Zr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var g=Yr(this.props.children,Zr);if(g&&typeof g.props.shared=="boolean"){var w=g.props.shared?"axis":"item";return l.indexOf(w)>=0?w:a}return a}},{key:"getMouseInfo",value:function(g){if(!this.container)return null;var w=this.container,E=w.getBoundingClientRect(),C=Jde(E),j={chartX:Math.round(g.pageX-C.left),chartY:Math.round(g.pageY-C.top)},S=E.width/w.offsetWidth||1,_=this.inRange(j.chartX,j.chartY,S);if(!_)return null;var O=this.state,I=O.xAxisMap,B=O.yAxisMap,T=this.getTooltipEventType(),k=ij(this.state,this.props.data,this.props.layout,_);if(T!=="axis"&&I&&B){var $=Oa(I).scale,W=Oa(B).scale,z=$&&$.invert?$.invert(j.chartX):null,L=W&&W.invert?W.invert(j.chartY):null;return le(le({},j),{},{xValue:z,yValue:L},k)}return k?le(le({},j),k):null}},{key:"inRange",value:function(g,w){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,j=g/E,S=w/E;if(C==="horizontal"||C==="vertical"){var _=this.state.offset,O=j>=_.left&&j<=_.left+_.width&&S>=_.top&&S<=_.top+_.height;return O?{x:j,y:S}:null}var I=this.state,B=I.angleAxisMap,T=I.radiusAxisMap;if(B&&T){var k=Oa(B);return LA({x:j,y:S},k)}return null}},{key:"parseEventsOfWrapper",value:function(){var g=this.props.children,w=this.getTooltipEventType(),E=Yr(g,Zr),C={};E&&w==="axis"&&(E.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var j=Kf(this.props,this.handleOuterEvent);return le(le({},j),C)}},{key:"addListener",value:function(){Gg.on(qg,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Gg.removeListener(qg,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(g,w,E){for(var C=this.state.formattedGraphicalItems,j=0,S=C.length;j<S;j++){var _=C[j];if(_.item===g||_.props.key===g.key||w===qi(_.item.type)&&E===_.childIndex)return _}return null}},{key:"renderClipPath",value:function(){var g=this.clipPathId,w=this.state.offset,E=w.left,C=w.top,j=w.height,S=w.width;return q.createElement("defs",null,q.createElement("clipPath",{id:g},q.createElement("rect",{x:E,y:C,height:j,width:S})))}},{key:"getXScales",value:function(){var g=this.state.xAxisMap;return g?Object.entries(g).reduce(function(w,E){var C=tj(E,2),j=C[0],S=C[1];return le(le({},w),{},je({},j,S.scale))},{}):null}},{key:"getYScales",value:function(){var g=this.state.yAxisMap;return g?Object.entries(g).reduce(function(w,E){var C=tj(E,2),j=C[0],S=C[1];return le(le({},w),{},je({},j,S.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(g){var w;return(w=this.state.xAxisMap)===null||w===void 0||(w=w[g])===null||w===void 0?void 0:w.scale}},{key:"getYScaleByAxisId",value:function(g){var w;return(w=this.state.yAxisMap)===null||w===void 0||(w=w[g])===null||w===void 0?void 0:w.scale}},{key:"getItemByXY",value:function(g){var w=this.state,E=w.formattedGraphicalItems,C=w.activeItem;if(E&&E.length)for(var j=0,S=E.length;j<S;j++){var _=E[j],O=_.props,I=_.item,B=I.type.defaultProps!==void 0?le(le({},I.type.defaultProps),I.props):I.props,T=qi(I.type);if(T==="Bar"){var k=(O.data||[]).find(function(L){return Tve(g,L)});if(k)return{graphicalItem:_,payload:k}}else if(T==="RadialBar"){var $=(O.data||[]).find(function(L){return LA(g,L)});if($)return{graphicalItem:_,payload:$}}else if(am(_,C)||sm(_,C)||Xd(_,C)){var W=Mye({graphicalItem:_,activeTooltipItem:C,itemData:B.data}),z=B.activeIndex===void 0?W:B.activeIndex;return{graphicalItem:le(le({},_),{},{childIndex:z}),payload:Xd(_,C)?B.data[W]:_.props.data[W]}}}return null}},{key:"render",value:function(){var g=this;if(!N5(this))return null;var w=this.props,E=w.children,C=w.className,j=w.width,S=w.height,_=w.style,O=w.compact,I=w.title,B=w.desc,T=rj(w,Wwe),k=Te(T,!1);if(O)return q.createElement(M6,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},q.createElement(zy,ul({},k,{width:j,height:S,title:I,desc:B}),this.renderClipPath(),F5(E,this.renderMap)));if(this.props.accessibilityLayer){var $,W;k.tabIndex=($=this.props.tabIndex)!==null&&$!==void 0?$:0,k.role=(W=this.props.role)!==null&&W!==void 0?W:"application",k.onKeyDown=function(L){g.accessibilityManager.keyboardEvent(L)},k.onFocus=function(){g.accessibilityManager.focus()}}var z=this.parseEventsOfWrapper();return q.createElement(M6,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},q.createElement("div",ul({className:Me("recharts-wrapper",C),style:le({position:"relative",curs
963or:"default",width:j,height:S},_)},z,{ref:function(F){g.container=F}}),q.createElement(zy,ul({},k,{width:j,height:S,title:I,desc:B,style:s2e}),this.renderClipPath(),F5(E,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(A.Component);je(m,"displayName",r),je(m,"defaultProps",le({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},x)),je(m,"getDerivedStateFromProps",function(v,y){var b=v.dataKey,g=v.data,w=v.children,E=v.width,C=v.height,j=v.layout,S=v.stackOffset,_=v.margin,O=y.dataStartIndex,I=y.dataEndIndex;if(y.updateId===void 0){var B=aj(v);return le(le(le({},B),{},{updateId:0},h(le(le({props:v},B),{},{updateId:0}),y)),{},{prevDataKey:b,prevData:g,prevWidth:E,prevHeight:C,prevLayout:j,prevStackOffset:S,prevMargin:_,prevChildren:w})}if(b!==y.prevDataKey||g!==y.prevData||E!==y.prevWidth||C!==y.prevHeight||j!==y.prevLayout||S!==y.prevStackOffset||!wl(_,y.prevMargin)){var T=aj(v),k={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},$=le(le({},ij(y,g,j)),{},{updateId:y.updateId+1}),W=le(le(le({},T),k),$);return le(le(le({},W),h(le({props:v},W),y)),{},{prevDataKey:b,prevData:g,prevWidth:E,prevHeight:C,prevLayout:j,prevStackOffset:S,prevMargin:_,prevChildren:w})}if(!Ry(w,y.prevChildren)){var z,L,F,U,D=Yr(w,ac),N=D&&(z=(L=D.props)===null||L===void 0?void 0:L.startIndex)!==null&&z!==void 0?z:O,K=D&&(F=(U=D.props)===null||U===void 0?void 0:U.endIndex)!==null&&F!==void 0?F:I,R=N!==O||K!==I,H=!Ie(g),X=H&&!R?y.updateId:y.updateId+1;return le(le({updateId:X},h(le(le({props:v},y),{},{updateId:X,dataStartIndex:N,dataEndIndex:K}),y)),{},{prevChildren:w,dataStartIndex:N,dataEndIndex:K})}return null}),je(m,"renderActiveDot",function(v,y,b){var g;return A.isValidElement(v)?g=A.cloneElement(v,y):Pe(v)?g=v(y):g=q.createElement(Mw,y),q.createElement(vt,{className:"recharts-active-dot",key:b},g)});var p=A.forwardRef(function(y,b){return q.createElement(m,ul({},y,{ref:b}))});return p.displayName=m.displayName,p},oj=PD({chartName:"BarChart",GraphicalChild:us,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Ka},{axisType:"yAxis",AxisComp:Va}],formatAxisMap:Y7}),lj=PD({chartName:"AreaChart",GraphicalChild:xa,axisComponents:[{axisType:"xAxis",AxisComp:Ka},{axisType:"yAxis",AxisComp:Va}],formatAxisMap:Y7});function dt({children:e,allowedRoles:t=["admin"]}){const{roles:r,loading:n}=nB(),i=ms(),a=r.some(o=>t.includes(o));return A.useEffect(()=>{!n&&!a&&i("/admin/login",{replace:!0})},[a,n,i]),n?s.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center gap-3 bg-background text-muted-foreground",children:[s.jsx(uE,{size:32,className:"text-primary animate-pulse","aria-hidden":"true"}),s.jsx("p",{className:"text-sm",children:"Zugriff wird geprüft â¦"})]}):a?s.jsx(s.Fragment,{children:e}):null}const qo=e=>`⬠${(e/100).toLocaleString("de-DE",{minimumFractionDigits:0})}`,m2e=[{label:"7 Tage",days:7},{label:"14 Tage",days:14},{label:"30 Tage",days:30},{label:"Alle",days:999}],cj={processed:{label:"Erstattet",cls:"bg-green-500/15 text-green-400",icon:ut},pending:{label:"Ausstehend",cls:"bg-orange-500/15 text-orange-400",icon:gr},rejected:{label:"Abgelehnt",cls:"bg-destructive/15 text-destructive",icon:Kt}};function Sx({active:e,payload:t,label:r,unit:n}){return!e||!(t!=null&&t.length)?null:s.jsxs("div",{className:"rounded-xl border border-border bg-card px-3 py-2 text-xs shadow-lg",children:[s.jsx("p",{className:"font-bold text-foreground mb-1",children:r}),t.map(i=>s.jsxs("p",{style:{color:i.color},children:[i.name,": ",n==="â¬"?qo(i.value):i.value.toLocaleString("de-DE")]},i.name))]})}function g2e(){const[e,t]=A.useState([]),[r,n]=A.useState([]),[i,a]=A.useState(!0),[o,l]=A.useState(30),[c,u]=A.useState(null),d=A.useCallback(async()=>{a(!0);const g=o===999?"2000-01-01":new Date(Date.now()-o*864e5).toISOString().slice(0,10),[{data:w},{data:E}]=await Promise.all([re.from("daily_sales_live").select("sale_date,event_name,category,units_sold,revenue_cents,checkins").gte("sale_date",g).order("sale_date"),re.from("refunds").select("*").order("refund_date",{ascending:!1})]);t(w??[]),n(E??[]),u(new Date),a(!1)},[o]);A.useEffect(()=>{d()},[d]);const x=Object.values(e.reduce((g,w)=>{const E=w.sale_date;return g[E]||(g[E]={date:new Date(E).toLocaleDateString("de-DE",{day:"2-digit",month:"2-digit"}),revenue:0,tickets:0,checkins:0}),g[E].revenue+=w.revenue_cents,g[E].tickets+=w.units_sold,g[E].checkins+=w.checkins,g},{})),f=e.reduce((g,w)=>g+w.revenue_cents,0),h=e.reduce((g,w)=>g+w.units_sold,0),m=e.reduce((g,w)=>g+w.checkins,0),p=r.filter(g=>g.status==="processed").reduce((g,w)=>g+w.amount_cents,0),v=r.filter(g=>g.status==="pending").length,y=Object.entries(e.reduce((g,w)=>
963{const E=w.category||w.event_name;return g[E]=(g[E]??0)+w.revenue_cents,g},{})).map(([g,w])=>({name:g,revenue:w})).sort((g,w)=>w.revenue-g.revenue).slice(0,6);function b(){const g=["Datum","Kategorie","Veranstaltung","Betrag (â¬)","Grund","Status"],w=r.map(j=>[j.refund_date,j.category,j.event_name,(j.amount_cents/100).toFixed(2),j.reason??"",j.status].join(";")),E=new Blob(["\uFEFF"+[g.join(";"),...w].join(` 964`)],{type:"text/csv;charset=utf-8;"}),C=document.createElement("a");C.href=URL.createObjectURL(E),C.download=`refunds-${new Date().toISOString().slice(0,10)}.csv`,C.click()}return s.jsxs(dt,{children:[s.jsx(Hr,{}),s.jsxs("main",{id:"main-content",className:"pt-14 min-h-screen",children:[s.jsx("section",{className:"py-12 bg-card/50 border-b border-border","aria-label":"Analytics Ãberschrift",children:s.jsx("div",{className:"container mx-auto px-4 max-w-6xl",children:s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end sm:justify-between gap-4",children:[s.jsxs("div",{children:[s.jsxs(we,{to:"/dashboard",className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-primary transition-colors mb-3",children:[s.jsx(Sn,{size:12,"aria-hidden":"true"})," Dashboard"]}),s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-1",children:"Admin · Echtzeit-Metriken"}),s.jsx("h1",{className:"font-display text-5xl md:text-7xl",children:"ANALYTICS"})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("div",{className:"flex gap-1",role:"group","aria-label":"Zeitraum wählen",children:m2e.map(g=>s.jsx("button",{onClick:()=>l(g.days),"aria-pressed":o===g.days,className:`px-3 py-1.5 rounded-lg text-xs font-semibold transition-all ${o===g.days?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:g.label},g.days))}),s.jsxs("button",{onClick:d,disabled:i,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border text-xs text-muted-foreground hover:text-foreground transition-all disabled:opacity-50","aria-label":"Daten aktualisieren",children:[s.jsx(Be,{size:12,className:i?"animate-spin":"","aria-hidden":"true"}),c?c.toLocaleTimeString("de-DE"):"Ladenâ¦"]})]})]})})}),s.jsxs("div",{className:"container mx-auto px-4 max-w-6xl py-10 space-y-10",children:[s.jsx(Ce,{children:s.jsx("dl",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[{label:"Umsatz",value:qo(f),sub:"im gewählten Zeitraum",icon:ji,highlight:!0},{label:"Tickets verkauft",value:h.toLocaleString("de-DE"),sub:"Einzel + Kombi",icon:Pt,highlight:!0},{label:"Check-ins",value:m.toLocaleString("de-DE"),sub:"Einlass-Scans",icon:Je,highlight:!1},{label:"Erstattungen",value:qo(p),sub:`${v} ausstehend`,icon:xE,highlight:!1}].map(({label:g,value:w,sub:E,icon:C,highlight:j})=>s.jsxs("div",{className:`relative p-5 rounded-2xl border gradient-card overflow-hidden ${j?"border-primary/30":"border-border"}`,children:[j&&s.jsx("div",{className:"absolute inset-0 bg-primary/5 pointer-events-none rounded-2xl","aria-hidden":"true"}),s.jsxs("div",{className:"relative z-10 flex flex-col gap-2",children:[s.jsx(C,{size:18,className:"text-primary","aria-hidden":"true"}),s.jsx("dd",{className:"font-display text-3xl leading-none text-foreground",children:i?"â":w}),s.jsx("dt",{className:"text-xs text-muted-foreground",children:g}),s.jsx("p",{className:"text-[10px] text-primary/70",children:E})]})]},g))})}),s.jsx(Ce,{children:s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6",children:[s.jsx("h2",{className:"font-bold text-sm text-foreground mb-1",children:"Umsatz im Zeitverlauf"}),s.jsx("p",{className:"text-xs text-muted-foreground mb-5",children:"Tageseinnahmen aus Ticketverkäufen"}),i?s.jsx("div",{className:"h-56 flex items-center justify-center text-muted-foreground text-sm animate-pulse",children:"Daten werden geladen â¦"}):s.jsx(gx,{width:"100%",height:220,children:s.jsxs(lj,{data:x,margin:{top:4,right:4,left:0,bottom:0},children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:"revGrad",x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"5%",
964stopColor:"hsl(var(--primary))",stopOpacity:.25}),s.jsx("stop",{offset:"95%",stopColor:"hsl(var(--primary))",stopOpacity:0})]})}),s.jsx(yu,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),s.jsx(Ka,{dataKey:"date",tick:{fontSize:10,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),s.jsx(Va,{tickFormatter:g=>`â¬${(g/100).toFixed(0)}`,tick:{fontSize:10,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,width:60}),s.jsx(Zr,{content:s.jsx(Sx,{unit:"â¬"})}),s.jsx(xa,{type:"monotone",dataKey:"revenue",name:"Umsatz",stroke:"hsl(var(--primary))",strokeWidth:2,fill:"url(#revGrad)",dot:!1,activeDot:{r:4}})]})})]})}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsx(Ce,{children:s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6 h-full",children:[s.jsx("h2",{className:"font-bold text-sm text-foreground mb-1",children:"Tickets verkauft (täglich)"}),s.jsx("p",{className:"text-xs text-muted-foreground mb-5",children:"Stückzahl je Tag"}),i?s.jsx("div",{className:"h-48 flex items-center justify-center text-muted-foreground text-sm animate-pulse",children:"Ladenâ¦"}):s.jsx(gx,{width:"100%",height:190,children:s.jsxs(oj,{data:x,margin:{top:4,right:4,left:0,bottom:0},children:[s.jsx(yu,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),s.jsx(Ka,{dataKey:"date",tick:{fontSize:10,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),s.jsx(Va,{tick:{fontSize:10,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,width:32}),s.jsx(Zr,{content:s.jsx(Sx,{unit:""})}),s.jsx(us,{dataKey:"tickets",name:"Tickets",fill:"hsl(var(--primary))",radius:[3,3,0,0],maxBarSize:24})]})})]})}),s.jsx(Ce,{delay:100,children:s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6 h-full",children:[s.jsx("h2",{className:"font-bold text-sm text-foreground mb-1",children:"Umsatz nach Kategorie"}),s.jsx("p",{className:"text-xs text-muted-foreground mb-5",children:"Top-6 Ticket-Kategorien"}),i?s.jsx("div",{className:"h-48 flex items-center justify-center text-muted-foreground text-sm animate-pulse",children:"Ladenâ¦"}):s.jsx(gx,{width:"100%",height:190,children:s.jsxs(oj,{data:y,layout:"vertical",margin:{top:4,right:8,left:4,bottom:0},children:[s.jsx(yu,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",horizontal:!1}),s.jsx(Ka,{type:"number",tickFormatter:g=>`â¬${(g/100).toFixed(0)}`,tick:{fontSize:9,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),s.jsx(Va,{type:"category",dataKey:"name",tick:{fontSize:9,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,width:80}),s.jsx(Zr,{content:s.jsx(Sx,{unit:"â¬"})}),s.jsx(us,{dataKey:"revenue",name:"Umsatz",fill:"hsl(var(--primary))",radius:[0,3,3,0],maxBarSize:18})]})})]})})]}),s.jsx(Ce,{children:s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6",children:[s.jsx("h2",{className:"font-bold text-sm text-foreground mb-1",children:"Check-in Verlauf"}),s.jsx("p",{className:"text-xs text-muted-foreground mb-5",children:"Einlass-Scans pro Tag während des Festivals"}),i?s.jsx("div",{className:"h-40 flex items-center justify-center text-muted-foreground text-sm animate-pulse",children:"Ladenâ¦"}):s.jsx(gx,{width:"100%",height:160,children:s.jsxs(lj,{data:x.filter(g=>g.checkins>0),margin:{top:4,right:4,left:0,bottom:0},children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:"checkGrad",x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"5%",stopColor:"#22c55e",stopOpacity:.25}),s.jsx("stop",{offset:"95%",stopColor:"#22c55e",stopOpacity:0})]})}),s.jsx(yu,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),s.jsx(Ka,{dataKey:"date",tick:{fontSize:10,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),s.jsx(Va,{tick:{fontSize:10,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,width:40}),s.jsx(Zr,{content:s.jsx(Sx,{unit:""})}),s.jsx(xa,{type:"monotone",dataKey:"checkins",name:"Check-ins",stroke:"#22c55e",strokeWidth:2,fill:"url(#checkGrad)",dot:{r:5,fill:"#22c55e"}})]})})]})}),s.jsx(Ce,{children:s.jsxs("div",{className:"rounded-2xl border border-border bg-card overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"font-bold text-sm text-foreground",children:"Erstattungen"}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:[r.length," Erstattungen · ",qo(p)," erstattet",v>0&&s.jsxs("span",{className:"ml-2 inline-flex items-center gap-1 text-[10px] text-orange-400 font-bold bg-orange-500/15 px-1.5 py-0.5 rounded",children:[s.jsx(bn,{size:9,"aria-hidden":"true"}),v," ausstehend"]})]})]}),s.jsxs("button",{onClick:b,disabled:r.length===0,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-primary/10 text-primary text-xs font-bold hover:bg-primary/20 transition-colors disabled:opacity-50","aria-label":"Erstattungen als CSV exportieren",children:[s.jsx(zr,{size:12,"aria-hidden":"true"})," CSV"]})]}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm","aria-label":"Erstattungs-Liste",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border text-xs text-muted-foreground",children:[s.jsx("th",{className:"text-left px-5 py-2.5 font-medium",children:"Datum"}),s.jsx("th",{className:"text-left px-4 py-2.5 font-medium",children:"Kategorie"}),s.jsx("th",{className:"text-right px-4 py-2.5 font-medium",children:"Betrag"}),s.jsx("th",{className:"text-left px-4 py-2.5 font-medium hidden sm:table-cell",children:"Grund"}),s.jsx("th",{className:"text-center px-4 py-2.5 font-medium",children:"Status"})]})}),s.jsx("tbody",{children:i?s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"text-center py-8 text-muted-foreground text-xs animate-pulse",children:"Ladenâ¦"})}):r.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"text-center py-8 text-muted-foreground text-xs",children:"Keine Erstattungen vorhanden."})}):r.map(g=>{const w=cj[g.status]??cj.processed,E=w.icon;return s.jsxs("tr",{className:"border-b border-border/50 last:border-0 hover:bg-muted/20 transition-colors",children:[s.jsx("td",{className:"px-5 py-3 text-muted-foreground text-xs",children:new Date(g.refund_date).toLocaleDateString("de-DE")}),s.jsx("td",{className:"px-4 py-3 font-medium text-foreground text-xs max-w-[160px] truncate",children:g.category}),s.jsxs("td",{className:"px-4 py-3 text-right font-bold text-destructive text-xs",children:["-",qo(g.amount_cents)]}),s.jsx("td",{className:"px-4 py-3 text-xs text-muted-foreground hidden sm:table-cell",children:g.reason??"â"}),s.jsx("td",{className:"px-4 py-3 text-center",children:s.jsxs("span",{className:`inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full font-bold ${w.cls}`,children:[s.jsx(E,{size:9,"aria-hidden":"true"}),w.label]})})]},g.id)})}),!i&&r.length>0&&s.jsx("tfoot",{children:s.jsxs("tr",{className:"border-t border-border bg-muted/20",children:[s.jsx("td",{colSpan:2,className:"px-5 py-2.5 text-xs font-bold text-foreground",children:"Gesamt (erstattet)"}),s.jsxs("td",{className:"px-4 py-2.5 text-right text-xs font-bold text-destructive",children:["-",qo(p)]}),s.jsx("td",{colSpan:2})]})})]})})]})})]})]})]})}function Bx(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var OD={exports:{}};/*! 965 966JSZip v3.10.1 - A JavaScript class for generating and reading zip files 967<http://stuartk.com/jszip> 968
vendor: 4,668 bytes, lines 969-974
969(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com> 970Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. 971 972JSZip uses the library pako released under the MIT license : 973https://github.com/nodeca/pako/blob/main/LICENSE 974*/(function(e,t){(function(r){e.exports=r()})(function(){return function r(n,i,a){function o(u,d){if(!i[u]){if(!n[u]){var x=typeof Bx=="function"&&Bx;if(!d&&x)return x(u,!0);if(l)return l(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var h=i[u]={exports:{}};n[u][0].call(h.exports,function(m){var p=n[u][1][m];return o(p||m)},h,h.exports,r,n,i,a)}return i[u].exports}for(var l=typeof Bx=="function"&&Bx,c=0;c<a.length;c++)o(a[c]);return o}({1:[function(r,n,i){var a=r("./utils"),o=r("./support"),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(c){for(var u,d,x,f,h,m,p,v=[],y=0,b=c.length,g=b,w=a.getTypeOf(c)!=="string";y<c.length;)g=b-y,x=w?(u=c[y++],d=y<b?c[y++]:0,y<b?c[y++]:0):(u=c.charCodeAt(y++),d=y<b?c.charCodeAt(y++):0,y<b?c.charCodeAt(y++):0),f=u>>2,h=(3&u)<<4|d>>4,m=1<g?(15&d)<<2|x>>6:64,p=2<g?63&x:64,v.push(l.charAt(f)+l.charAt(h)+l.charAt(m)+l.charAt(p));return v.join("")},i.decode=function(c){var u,d,x,f,h,m,p=0,v=0,y="data:";if(c.substr(0,y.length)===y)throw new Error("Invalid base64 input, it looks like a data url.");var b,g=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===l.charAt(64)&&g--,c.charAt(c.length-2)===l.charAt(64)&&g--,g%1!=0)throw new Error("Invalid base64 input, bad content length.");for(b=o.uint8array?new Uint8Array(0|g):new Array(0|g);p<c.length;)u=l.indexOf(c.charAt(p++))<<2|(f=l.indexOf(c.charAt(p++)))>>4,d=(15&f)<<4|(h=l.indexOf(c.charAt(p++)))>>2,x=(3&h)<<6|(m=l.indexOf(c.charAt(p++))),b[v++]=u,h!==64&&(b[v++]=d),m!==64&&(b[v++]=x);return b}},{"./support":30,"./utils":32}],2:[function(r,n,i){var a=r("./external"),o=r("./stream/DataWorker"),l=r("./stream/Crc32Probe"),c=r("./stream/DataLengthProbe");function u(d,x,f,h,m){this.compressedSize=d,this.uncompressedSize=x,this.crc32=f,this.compression=h,this.compressedContent=m}u.prototype={getContentWorker:function(){var d=new o(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),x=this;return d.on("end",function(){if(this.streamInfo.data_length!==x.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new o(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(d,x,f){return d.pipe(new l).pipe(new c("uncompressedSize")).pipe(x.compressWorker(f)).pipe(new c("compressedSize")).withStreamInfo("compression",x)},n.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,n,i){var a=r("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new a("STORE compression")},uncompressWorker:function(){return new a("STORE decompression")}},i.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,n,i){var a=r("./utils"),o=function(){for(var l,c=[],u=0;u<256;u++){l=u;for(var d=0;d<8;d++)l=1&l?3988292384^l>>>1:l>>>1;c[u]=l}return c}();n.exports=function(l,c){return l!==void 0&&l.length?a.getTypeOf(l)!=="string"?function(u,d,x,f){var h=o,m=f+x;u^=-1;for(var p=f;p<m;p++)u=u>>>8^h[255&(u^d[p])];return-1^u}(0|c,l,l.length,0):function(u,d,x,f){var h=o,m=f+x;u^=-1;for(var p=f;p<m;p++)u=u>>>8^h[255&(u^d.charCodeAt(p))];return-1^u}(0|c,l,l.length,0):0}},{"./utils":32}],5:[function(r,n,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(r,n,i){var a=null;a=typeof Promise<"u"?Promise:r("lie"),n.exports={Promise:a}},{lie:37}],7:[function(r,n,i){var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=r("pako"),l=r("./utils"),c=r("./stream/GenericWorker"),u=a?"uint8array":"array";function d(x,f){c.call(this,"FlateWorker/"+x),this._pako=null,this._pakoAction=x,this._pakoOptions=f,this.meta={}}i.magic="\b\0",l.inherits(d,c),d.prototype.processChunk=function(x){this.meta=x.meta,this._pako===null&&this._createPako(),this._pako.push(l.transformTo(u,x.data),!1)},d.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)}
vendor: 4,739 bytes, lines 974-975
974,d.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var x=this;this._pako.onData=function(f){x.push({data:f,meta:x.meta})}},i.compressWorker=function(x){return new d("Deflate",x)},i.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,n,i){function a(h,m){var p,v="";for(p=0;p<m;p++)v+=String.fromCharCode(255&h),h>>>=8;return v}function o(h,m,p,v,y,b){var g,w,E=h.file,C=h.compression,j=b!==u.utf8encode,S=l.transformTo("string",b(E.name)),_=l.transformTo("string",u.utf8encode(E.name)),O=E.comment,I=l.transformTo("string",b(O)),B=l.transformTo("string",u.utf8encode(O)),T=_.length!==E.name.length,k=B.length!==O.length,$="",W="",z="",L=E.dir,F=E.date,U={crc32:0,compressedSize:0,uncompressedSize:0};m&&!p||(U.crc32=h.crc32,U.compressedSize=h.compressedSize,U.uncompressedSize=h.uncompressedSize);var D=0;m&&(D|=8),j||!T&&!k||(D|=2048);var N=0,K=0;L&&(N|=16),y==="UNIX"?(K=798,N|=function(H,X){var ie=H;return H||(ie=X?16893:33204),(65535&ie)<<16}(E.unixPermissions,L)):(K=20,N|=function(H){return 63&(H||0)}(E.dosPermissions)),g=F.getUTCHours(),g<<=6,g|=F.getUTCMinutes(),g<<=5,g|=F.getUTCSeconds()/2,w=F.getUTCFullYear()-1980,w<<=4,w|=F.getUTCMonth()+1,w<<=5,w|=F.getUTCDate(),T&&(W=a(1,1)+a(d(S),4)+_,$+="up"+a(W.length,2)+W),k&&(z=a(1,1)+a(d(I),4)+B,$+="uc"+a(z.length,2)+z);var R="";return R+=` 975\0`,R+=a(D,2),R+=C.magic,R+=a(g,2),R+=a(w,2),R+=a(U.crc32,4),R+=a(U.compressedSize,4),R+=a(U.uncompressedSize,4),R+=a(S.length,2),R+=a($.length,2),{fileRecord:x.LOCAL_FILE_HEADER+R+S+$,dirRecord:x.CENTRAL_FILE_HEADER+a(K,2)+R+a(I.length,2)+"\0\0\0\0"+a(N,4)+a(v,4)+S+$+I}}var l=r("../utils"),c=r("../stream/GenericWorker"),u=r("../utf8"),d=r("../crc32"),x=r("../signature");function f(h,m,p,v){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=m,this.zipPlatform=p,this.encodeFileName=v,this.streamFiles=h,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(f,c),f.prototype.push=function(h){var m=h.meta.percent||0,p=this.entriesCount,v=this._sources.length;this.accumulate?this.contentBuffer.push(h):(this.bytesWritten+=h.data.length,c.prototype.push.call(this,{data:h.data,meta:{currentFile:this.currentFile,percent:p?(m+100*(p-v-1))/p:100}}))},f.prototype.openedSource=function(h){this.currentSourceOffset=this.bytesWritten,this.currentFile=h.file.name;var m=this.streamFiles&&!h.file.dir;if(m){var p=o(h,m,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},f.prototype.closedSource=function(h){this.accumulate=!1;var m=this.streamFiles&&!h.file.dir,p=o(h,m,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),m)this.push({data:function(v){return x.DATA_DESCRIPTOR+a(v.crc32,4)+a(v.compressedSize,4)+a(v.uncompressedSize,4)}(h),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},f.prototype.flush=function(){for(var h=this.bytesWritten,m=0;m<this.dirRecords.length;m++)this.push({data:this.dirRecords[m],meta:{percent:100}});var p=this.bytesWritten-h,v=function(y,b,g,w,E){var C=l.transformTo("string",E(w));return x.CENTRAL_DIRECTORY_END+"\0\0\0\0"+a(y,2)+a(y,2)+a(b,4)+a(g,4)+a(C.length,2)+C}(this.dirRecords.length,p,h,this.zipComment,this.encodeFileName);this.push({data:v,meta:{percent:100}})},f.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},f.prototype.registerPrevious=function(h){this._sources.push(h);var m=this;return h.on("data",function(p){m.processChunk(p)}),h.on("end",function(){m.closedSource(m.previous.streamInfo),m._sources.length?m.prepareNextSource():m.end()}),h.on("error",function(p){m.error(p)}),this},f.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},f.prototype.error=function(h){var m=this._sources;if(!c.prototype.error.call(this,h))return!1;for(var p=0;p<m.length;p++)try{m[p].error(h)}catch{}return!0},f.prototype.lock=function(){c.prototype.lock.call(this);for(var h=this._sources,m=0;m<h.length;m++)h[m].lock()},n.exports=f},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}
vendor: 29,087 bytes, line 975
975],9:[function(r,n,i){var a=r("../compressions"),o=r("./ZipFileWorker");i.generateWorker=function(l,c,u){var d=new o(c.streamFiles,u,c.platform,c.encodeFileName),x=0;try{l.forEach(function(f,h){x++;var m=function(b,g){var w=b||g,E=a[w];if(!E)throw new Error(w+" is not a valid compression method !");return E}(h.options.compression,c.compression),p=h.options.compressionOptions||c.compressionOptions||{},v=h.dir,y=h.date;h._compressWorker(m,p).withStreamInfo("file",{name:f,dir:v,date:y,comment:h.comment||"",unixPermissions:h.unixPermissions,dosPermissions:h.dosPermissions}).pipe(d)}),d.entriesCount=x}catch(f){d.error(f)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,n,i){function a(){if(!(this instanceof a))return new a;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new a;for(var l in this)typeof this[l]!="function"&&(o[l]=this[l]);return o}}(a.prototype=r("./object")).loadAsync=r("./load"),a.support=r("./support"),a.defaults=r("./defaults"),a.version="3.10.1",a.loadAsync=function(o,l){return new a().loadAsync(o,l)},a.external=r("./external"),n.exports=a},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,n,i){var a=r("./utils"),o=r("./external"),l=r("./utf8"),c=r("./zipEntries"),u=r("./stream/Crc32Probe"),d=r("./nodejsUtils");function x(f){return new o.Promise(function(h,m){var p=f.decompressed.getContentWorker().pipe(new u);p.on("error",function(v){m(v)}).on("end",function(){p.streamInfo.crc32!==f.decompressed.crc32?m(new Error("Corrupted zip : CRC32 mismatch")):h()}).resume()})}n.exports=function(f,h){var m=this;return h=a.extend(h||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:l.utf8decode}),d.isNode&&d.isStream(f)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):a.prepareContent("the loaded zip file",f,!0,h.optimizedBinaryString,h.base64).then(function(p){var v=new c(h);return v.load(p),v}).then(function(p){var v=[o.Promise.resolve(p)],y=p.files;if(h.checkCRC32)for(var b=0;b<y.length;b++)v.push(x(y[b]));return o.Promise.all(v)}).then(function(p){for(var v=p.shift(),y=v.files,b=0;b<y.length;b++){var g=y[b],w=g.fileNameStr,E=a.resolve(g.fileNameStr);m.file(E,g.decompressed,{binary:!0,optimizedBinaryString:!0,date:g.date,dir:g.dir,comment:g.fileCommentStr.length?g.fileCommentStr:null,unixPermissions:g.unixPermissions,dosPermissions:g.dosPermissions,createFolders:h.createFolders}),g.dir||(m.file(E).unsafeOriginalName=w)}return v.zipComment.length&&(m.comment=v.zipComment),m})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,n,i){var a=r("../utils"),o=r("../stream/GenericWorker");function l(c,u){o.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(u)}a.inherits(l,o),l.prototype._bindStream=function(c){var u=this;(this._stream=c).pause(),c.on("data",function(d){u.push({data:d,meta:{percent:0}})}).on("error",function(d){u.isPaused?this.generatedError=d:u.error(d)}).on("end",function(){u.isPaused?u._upstreamEnded=!0:u.end()})},l.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},l.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=l},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,n,i){var a=r("readable-stream").Readable;function o(l,c,u){a.call(this,c),this._helper=l;var d=this;l.on("data",function(x,f){d.push(x)||d._helper.pause(),u&&u(f)}).on("error",function(x){d.emit("error",x)}).on("end",function(){d.push(null)})}r("../utils").inherits(o,a),o.prototype._read=function(){this._helper.resume()},n.exports=o},{"../utils":32,"readable-stream":16}],14:[function(r,n,i){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(a,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(a,o);if(typeof a=="number")throw new Error('The "data" argument must not be a number');return new Buffer(a,o)},allocBuffer:function(a){if(Buffer.alloc)return Buffer.alloc(a);var o=new Buffer(a);return o.fill(0),o},isBuffer:function(a){return Buffer.isBuffer(a)},isStream:function(a){return a&&typeof a.on=="function"&&typeof a.pause=="function"&&typeof a.resume=="function"}}},{}],15:[function(r,n,i){function a(E,C,j){var S,_=l.getTypeOf(C),O=l.extend(j||{},d);O.date=O.date||new Date,O.compression!==null&&(O.compression=O.compression.toUpperCase()),typeof O.unixPermissions=="string"&&(O.unixPermissions=parseInt(O.unixPermissions,8)),O.unixPermissions&&16384&O.unixPermissions&&(O.dir=!0),O.dosPermissions&&16&O.dosPermissions&&(O.dir=!0),O.dir&&(E=y(E)),O.createFolders&&(S=v(E))&&b.call(this,S,!0);var I=_==="string"&&O.binary===!1&&O.base64===!1;j&&j.binary!==void 0||(O.binary=!I),(C instanceof x&&C.uncompressedSize===0||O.dir||!C||C.length===0)&&(O.base64=!1,O.binary=!0,C="",O.compression="STORE",_="string");var B=null;B=C instanceof x||C instanceof c?C:m.isNode&&m.isStream(C)?new p(E,C):l.prepareContent(E,C,O.binary,O.optimizedBinaryString,O.base64);var T=new f(E,B,O);this.files[E]=T}var o=r("./utf8"),l=r("./utils"),c=r("./stream/GenericWorker"),u=r("./stream/StreamHelper"),d=r("./defaults"),x=r("./compressedObject"),f=r("./zipObject"),h=r("./generate"),m=r("./nodejsUtils"),p=r("./nodejs/NodejsStreamInputAdapter"),v=function(E){E.slice(-1)==="/"&&(E=E.substring(0,E.length-1));var C=E.lastIndexOf("/");return 0<C?E.substring(0,C):""},y=function(E){return E.slice(-1)!=="/"&&(E+="/"),E},b=function(E,C){return C=C!==void 0?C:d.createFolders,E=y(E),this.files[E]||a.call(this,E,null,{dir:!0,createFolders:C}),this.files[E]};function g(E){return Object.prototype.toString.call(E)==="[object RegExp]"}var w={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(E){var C,j,S;for(C in this.files)S=this.files[C],(j=C.slice(this.root.length,C.length))&&C.slice(0,this.root.length)===this.root&&E(j,S)},filter:function(E){var C=[];return this.forEach(function(j,S){E(j,S)&&C.push(S)}),C},file:function(E,C,j){if(arguments.length!==1)return E=this.root+E,a.call(this,E,C,j),this;if(g(E)){var S=E;return this.filter(function(O,I){return!I.dir&&S.test(O)})}var _=this.files[this.root+E];return _&&!_.dir?_:null},folder:function(E){if(!E)return this;if(g(E))return this.filter(function(_,O){return O.dir&&E.test(_)});var C=this.root+E,j=b.call(this,C),S=this.clone();return S.root=j.name,S},remove:function(E){E=this.root+E;var C=this.files[E];if(C||(E.slice(-1)!=="/"&&(E+="/"),C=this.files[E]),C&&!C.dir)delete this.files[E];else for(var j=this.filter(function(_,O){return O.name.slice(0,E.length)===E}),S=0;S<j.length;S++)delete this.files[j[S].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(E){var C,j={};try{if((j=l.extend(E||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=j.type.toLowerCase(),j.compression=j.compression.toUpperCase(),j.type==="binarystring"&&(j.type="string"),!j.type)throw new Error("No output type specified.");l.checkSupport(j.type),j.platform!=="darwin"&&j.platform!=="freebsd"&&j.platform!=="linux"&&j.platform!=="sunos"||(j.platform="UNIX"),j.platform==="win32"&&(j.platform="DOS");var S=j.comment||this.comment||"";C=h.generateWorker(this,j,S)}catch(_){(C=new c("error")).error(_)}return new u(C,j.type||"string",j.mimeType)},generateAsync:function(E,C){return this.generateInternalStream(E).accumulate(C)},generateNodeStream:function(E,C){return(E=E||{}).type||(E.type="nodebuffer"),this.generateInternalStream(E).toNodejsStream(C)}};n.exports=w},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(r,n,i){n.exports=r("stream")},{stream:void 0}],17:[function(r,n,i){var a=r("./DataReader");function o(l){a.call(this,l);for(var c=0;c<this.data.length;c++)l[c]=255&l[c]}r("../utils").inherits(o,a),o.prototype.byteAt=function(l){return this.data[this.zero+l]},o.prototype.lastIndexOfSignature=function(l){for(var c=l.charCodeAt(0),u=l.charCodeAt(1),d=l.charCodeAt(2),x=l.charCodeAt(3),f=this.length-4;0<=f;--f)if(this.data[f]===c&&this.data[f+1]===u&&this.data[f+2]===d&&this.data[f+3]===x)return f-this.zero;return-1},o.prototype.readAndCheckSignature=function(l){var c=l.charCodeAt(0),u=l.charCodeAt(1),d=l.charCodeAt(2),x=l.charCodeAt(3),f=this.readData(4);return c===f[0]&&u===f[1]&&d===f[2]&&x===f[3]},o.prototype.readData=function(l){if(this.checkOffset(l),l===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},n.exports=o},{"../utils":32,"./DataReader":18}],18:[function(r,n,i){var a=r("../utils");function o(l){this.data=l,this.length=l.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(l){this.checkIndex(this.index+l)},checkIndex:function(l){if(this.length<this.zero+l||l<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+l+"). Corrupted zip ?")},setIndex:function(l){this.checkIndex(l),this.index=l},skip:function(l){this.setIndex(this.index+l)},byteAt:function(){},readInt:function(l){var c,u=0;for(this.checkOffset(l),c=this.index+l-1;c>=this.index;c--)u=(u<<8)+this.byteAt(c);return this.index+=l,u},readString:function(l){return a.transformTo("string",this.readData(l))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var l=this.readInt(4);return new Date(Date.UTC(1980+(l>>25&127),(l>>21&15)-1,l>>16&31,l>>11&31,l>>5&63,(31&l)<<1))}},n.exports=o},{"../utils":32}],19:[function(r,n,i){var a=r("./Uint8ArrayReader");function o(l){a.call(this,l)}r("../utils").inherits(o,a),o.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},n.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,i){var a=r("./DataReader");function o(l){a.call(this,l)}r("../utils").inherits(o,a),o.prototype.byteAt=function(l){return this.data.charCodeAt(this.zero+l)},o.prototype.lastIndexOfSignature=function(l){return this.data.lastIndexOf(l)-this.zero},o.prototype.readAndCheckSignature=function(l){return l===this.readData(4)},o.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},n.exports=o},{"../utils":32,"./DataReader":18}],21:[function(r,n,i){var a=r("./ArrayReader");function o(l){a.call(this,l)}r("../utils").inherits(o,a),o.prototype.readData=function(l){if(this.checkOffset(l),l===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},n.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,i){var a=r("../utils"),o=r("../support"),l=r("./ArrayReader"),c=r("./StringReader"),u=r("./NodeBufferReader"),d=r("./Uint8ArrayReader");n.exports=function(x){var f=a.getTypeOf(x);return a.checkSupport(f),f!=="string"||o.uint8array?f==="nodebuffer"?new u(x):o.uint8array?new d(a.transformTo("uint8array",x)):new l(a.transformTo("array",x)):new c(x)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,i){i.LOCAL_FILE_HEADER="PK��",i.CENTRAL_FILE_HEADER="PK��",i.CENTRAL_DIRECTORY_END="PK��",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK�\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK��",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,n,i){var a=r("./GenericWorker"),o=r("../utils");function l(c){a.call(this,"ConvertWorker to "+c),this.destType=c}o.inherits(l,a),l.prototype.processChunk=function(c){this.push({data:o.transformTo(this.destType,c.data),meta:c.meta})},n.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,i){var a=r("./GenericWorker"),o=r("../crc32");function l(){a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(l,a),l.prototype.processChunk=function(c){this.streamInfo.crc32=o(c.data,this.streamInfo.crc32||0),this.push(c)},n.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,i){var a=r("../utils"),o=r("./GenericWorker");function l(c){o.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}a.inherits(l,o),l.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}o.prototype.processChunk.call(this,c)},n.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,i){var a=r("../utils"),o=r("./GenericWorker");function l(c){o.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(d){u.dataIsReady=!0,u.data=d,u.max=d&&d.length||0,u.type=a.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}a.inherits(l,o),l.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},l.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,a.delay(this._tickAndRepeat,[],this)),!0)},l.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},l.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u)}return this.index=u,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,i){function a(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}a.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,l){return this._listeners[o].push(l),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,l){if(this._listeners[o])for(var c=0;c<this._listeners[o].length;c++)this._listeners[o][c].call(this,l)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var l=this;return o.on("data",function(c){l.processChunk(c)}),o.on("end",function(){l.end()}),o.on("error",function(c){l.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,l){return this.extraStreamInfo[o]=l,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},n.exports=a},{}],29:[function(r,n,i){var a=r("../utils"),o=r("./ConvertWorker"),l=r("./GenericWorker"),c=r("../base64"),u=r("../support"),d=r("../external"),x=null;if(u.nodestream)try{x=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function f(m,p){return new d.Promise(function(v,y){var b=[],g=m._internalType,w=m._outputType,E=m._mimeType;m.on("data",function(C,j){b.push(C),p&&p(j)}).on("error",function(C){b=[],y(C)}).on("end",function(){try{var C=function(j,S,_){switch(j){case"blob":return a.newBlob(a.transformTo("arraybuffer",S),_);case"base64":return c.encode(S);default:return a.transformTo(j,S)}}(w,function(j,S){var _,O=0,I=null,B=0;for(_=0;_<S.length;_++)B+=S[_].length;switch(j){case"string":return S.join("");case"array":return Array.prototype.concat.apply([],S);case"uint8array":for(I=new Uint8Array(B),_=0;_<S.length;_++)I.set(S[_],O),O+=S[_].length;return I;case"nodebuffer":return Buffer.concat(S);default:throw new Error("concat : unsupported type '"+j+"'")}}(g,b),E);v(C)}catch(j){y(j)}b=[]}).resume()})}function h(m,p,v){var y=p;switch(p){case"blob":case"arraybuffer":y="uint8array";break;case"base64":y="string"}try{this._internalType=y,this._outputType=p,this._mimeType=v,a.checkSupport(y),this._worker=m.pipe(new o(y)),m.lock()}catch(b){this._worker=new l("error"),this._worker.error(b)}}h.prototype={accumulate:function(m){return f(this,m)},on:function(m,p){var v=this;return m==="data"?this._worker.on(m,function(y){p.call(v,y.data,y.meta)}):this._worker.on(m,function(){a.delay(p,arguments,v)}),this},resume:function(){return a.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(m){if(a.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new x(this,{objectMode:this._outputType!=="nodebuffer"},m)}},n.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,n,i){if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",i.nodebuffer=typeof Buffer<"u",i.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")i.blob=!1;else{var a=new ArrayBuffer(0);try{i.blob=new Blob([a],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(a),i.blob=o.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!r("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(r,n,i){for(var a=r("./utils"),o=r("./support"),l=r("./nodejsUtils"),c=r("./stream/GenericWorker"),u=new Array(256),d=0;d<256;d++)u[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;u[254]=u[254]=1;function x(){c.call(this,"utf-8 decode"),this.leftOver=null}function f(){c.call(this,"utf-8 encode")}i.utf8encode=function(h){return o.nodebuffer?l.newBufferFrom(h,"utf-8"):function(m){var p,v,y,b,g,w=m.length,E=0;for(b=0;b<w;b++)(64512&(v=m.charCodeAt(b)))==55296&&b+1<w&&(64512&(y=m.charCodeAt(b+1)))==56320&&(v=65536+(v-55296<<10)+(y-56320),b++),E+=v<128?1:v<2048?2:v<65536?3:4;for(p=o.uint8array?new Uint8Array(E):new Array(E),b=g=0;g<E;b++)(64512&(v=m.charCodeAt(b)))==55296&&b+1<w&&(64512&(y=m.charCodeAt(b+1)))==56320&&(v=65536+(v-55296<<10)+(y-56320),b++),v<128?p[g++]=v:(v<2048?p[g++]=192|v>>>6:(v<65536?p[g++]=224|v>>>12:(p[g++]=240|v>>>18,p[g++]=128|v>>>12&63),p[g++]=128|v>>>6&63),p[g++]=128|63&v);return p}(h)},i.utf8decode=function(h){return o.nodebuffer?a.transformTo("nodebuffer",h).toString("utf-8"):function(m){var p,v,y,b,g=m.length,w=new Array(2*g);for(p=v=0;p<g;)if((y=m[p++])<128)w[v++]=y;else if(4<(b=u[y]))w[v++]=65533,p+=b-1;else{for(y&=b===2?31:b===3?15:7;1<b&&p<g;)y=y<<6|63&m[p++],b--;1<b?w[v++]=65533:y<65536?w[v++]=y:(y-=65536,w[v++]=55296|y>>10&1023,w[v++]=56320|1023&y)}return w.length!==v&&(w.subarray?w=w.subarray(0,v):w.length=v),a.applyFromCharCode(w)}(h=a.transformTo(o.uint8array?"uint8array":"array",h))},a.inherits(x,c),x.prototype.processChunk=function(h){var m=a.transformTo(o.uint8array?"uint8array":"array",h.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var p=m;(m=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),m.set(p,this.leftOver.length)}else m=this.leftOver.concat(m);this.leftOver=null}var v=function(b,g){var w;for((g=g||b.length)>b.length&&(g=b.length),w=g-1;0<=w&&(192&b[w])==128;)w--;return w<0||w===0?g:w+u[b[w]]>g?w:g}(m),y=m;v!==m.length&&(o.uint8array?(y=m.subarray(0,v),this.leftOver=m.subarray(v,m.length)):(y=m.slice(0,v),this.leftOver=m.slice(v,m.length))),this.push({data:i.utf8decode(y),meta:h.meta})},x.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=x,a.inherits(f,c),f.prototype.processChunk=function(h){this.push({data:i.utf8encode(h.data),meta:h.meta})},i.Utf8EncodeWorker=f},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,i){var a=r("./support"),o=r("./base64"),l=r("./nodejsUtils"),c=r("./external");function u(p){return p}function d(p,v){for(var y=0;y<p.length;++y)v[y]=255&p.charCodeAt(y);return v}r("setimmediate"),i.newBlob=function(p,v){i.checkSupport("blob");try{return new Blob([p],{type:v})}catch{try{var y=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return y.append(p),y.getBlob(v)}catch{throw new Error("Bug : can't construct the Blob.")}}};var x={stringifyByChunk:function(p,v,y){var b=[],g=0,w=p.length;if(w<=y)return String.fromCharCode.apply(null,p);for(;g<w;)v==="array"||v==="nodebuffer"?b.push(String.fromCharCode.apply(null,p.slice(g,Math.min(g+y,w)))):b.push(String.fromCharCode.apply(null,p.subarray(g,Math.min(g+y,w)))),g+=y;return b.join("")},stringifyByChar:function(p){for(var v="",y=0;y<p.length;y++)v+=String.fromCharCode(p[y]);return v},applyCanBeUsed:{uint8array:function(){try{return a.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return a.nodebuffer&&String.fromCharCode.apply(null,l.allocBuffer(1)).length===1}catch{return!1}}()}};function f(p){var v=65536,y=i.getTypeOf(p),b=!0;if(y==="uint8array"?b=x.applyCanBeUsed.uint8array:y==="nodebuffer"&&(b=x.applyCanBeUsed.nodebuffer),b)for(;1<v;)try{return x.stringifyByChunk(p,y,v)}catch{v=Math.floor(v/2)}return x.stringifyByChar(p)}function h(p,v){for(var y=0;y<p.length;y++)v[y]=p[y];return v}i.applyFromCharCode=f;var m={};m.string={string:u,array:function(p){return d(p,new Array(p.length))},arraybuffer:function(p){return m.string.uint8array(p).buffer},uint8array:function(p){return d(p,new Uint8Array(p.length))},nodebuffer:function(p){return d(p,l.allocBuffer(p.length))}},m.array={string:f,array:u,arraybuffer:function(p){return new Uint8Array(p).buffer},uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return l.newBufferFrom(p)}},m.arraybuffer={string:function(p){return f(new Uint8Array(p))},array:function(p){return h(new Uint8Array(p),new Array(p.byteLength))},arraybuffer:u,uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return l.newBufferFrom(new Uint8Array(p))}},m.uint8array={string:f,array:function(p){return h(p,new Array(p.length))},arraybuffer:function(p){return p.buffer},uint8array:u,nodebuffer:function(p){return l.newBufferFrom(p)}},m.nodebuffer={string:f,array:function(p){return h(p,new Array(p.length))},arraybuffer:function(p){return m.nodebuffer.uint8array(p).buffer},uint8array:function(p){return h(p,new Uint8Array(p.length))},nodebuffer:u},i.transformTo=function(p,v){if(v=v||"",!p)return v;i.checkSupport(p);var y=i.getTypeOf(v);return m[y][p](v)},i.resolve=function(p){for(var v=p.split("/"),y=[],b=0;b<v.length;b++){var g=v[b];g==="."||g===""&&b!==0&&b!==v.length-1||(g===".."?y.pop():y.push(g))}return y.join("/")},i.getTypeOf=function(p){return typeof p=="string"?"string":Object.prototype.toString.call(p)==="[object Array]"?"array":a.nodebuffer&&l.isBuffer(p)?"nodebuffer":a.uint8array&&p instanceof Uint8Array?"uint8array":a.arraybuffer&&p instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(p){if(!a[p.toLowerCase()])throw new Error(p+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(p){var v,y,b="";for(y=0;y<(p||"").length;y++)b+="\\x"+((v=p.charCodeAt(y))<16?"0":"")+v.toString(16).toUpperCase();return b},i.delay=function(p,v,y){setImmediate(function(){p.apply(y||null,v||[])})},i.inherits=function(p,v){function y(){}y.prototype=v.prototype,p.prototype=new y},i.extend=function(){var p,v,y={};for(p=0;p<arguments.length;p++)for(v in arguments[p])Object.prototype.hasOwnProperty.call(arguments[p],v)&&y[v]===void 0&&(y[v]=arguments[p][v]);return y},i.prepareContent=function(p,v,y,b,g){return c.Promise.resolve(v).then(function(w){return a.blob&&(w instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(w))!==-1)&&typeof FileReader<"u"?new c.Promise(function(E,C){var j=new FileReader;j.onload=function(S){E(S.target.result)},j.onerror=function(S){C(S.target.error)},j.readAsArrayBuffer(w)}):w}).then(function(w){var E=i.getTypeOf(w);return E?(E==="arraybuffer"?w=i.transformTo("uint8array",w):E==="string"&&(g?w=o.decode(w):y&&b!==!0&&(w=function(C){return d(C,a.uint8array?new Uint8Array(C.length):new Array(C.length))}(w))),w):c.Promise.reject(new Error("Can't read the data of '"+p+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,n,i){var a=r("./reader/readerFor"),o=r("./utils"),l=r("./signature"),c=r("./zipEntry"),u=r("./support");function d(x){this.files=[],this.loadOptions=x}d.prototype={checkSignature:function(x){if(!this.reader.readAndCheckSignature(x)){this.reader.index-=4;var f=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(f)+", expected "+o.pretty(x)+")")}},isSignature:function(x,f){var h=this.reader.index;this.reader.setIndex(x);var m=this.reader.readString(4)===f;return this.reader.setIndex(h),m},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var x=this.reader.readData(this.zipCommentLength),f=u.uint8array?"uint8array":"array",h=o.transformTo(f,x);this.zipComment=this.loadOptions.decodeFileName(h)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var x,f,h,m=this.zip64EndOfCentralSize-44;0<m;)x=this.reader.readInt(2),f=this.reader.readInt(4),h=this.reader.readData(f),this.zip64ExtensibleData[x]={id:x,length:f,value:h}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var x,f;for(x=0;x<this.files.length;x++)f=this.files[x],this.reader.setIndex(f.localHeaderOffset),this.checkSignature(l.LOCAL_FILE_HEADER),f.readLocalPart(this.reader),f.handleUTF8(),f.processAttributes()},readCentralDir:function(){var x;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(l.CENTRAL_FILE_HEADER);)(x=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(x);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var x=this.reader.lastIndexOfSignature(l.CENTRAL_DIRECTORY_END);if(x<0)throw this.isSignature(0,l.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip f
975ile ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(x);var f=x;if(this.checkSignature(l.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(x=this.reader.lastIndexOfSignature(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(x),this.checkSignature(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,l.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(l.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(l.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var h=this.centralDirOffset+this.centralDirSize;this.zip64&&(h+=20,h+=12+this.zip64EndOfCentralSize);var m=f-h;if(0<m)this.isSignature(f,l.CENTRAL_FILE_HEADER)||(this.reader.zero=m);else if(m<0)throw new Error("Corrupted zip: missing "+Math.abs(m)+" bytes.")},prepareReader:function(x){this.reader=a(x)},load:function(x){this.prepareReader(x),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,n,i){var a=r("./reader/readerFor"),o=r("./utils"),l=r("./compressedObject"),c=r("./crc32"),u=r("./utf8"),d=r("./compressions"),x=r("./support");function f(h,m){this.options=h,this.loadOptions=m}f.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(h){var m,p;if(h.skip(22),this.fileNameLength=h.readInt(2),p=h.readInt(2),this.fileName=h.readData(this.fileNameLength),h.skip(p),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((m=function(v){for(var y in d)if(Object.prototype.hasOwnProperty.call(d,y)&&d[y].magic===v)return d[y];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new l(this.compressedSize,this.uncompressedSize,this.crc32,m,h.readData(this.compressedSize))},readCentralPart:function(h){this.versionMadeBy=h.readInt(2),h.skip(2),this.bitFlag=h.readInt(2),this.compressionMethod=h.readString(2),this.date=h.readDate(),this.crc32=h.readInt(4),this.compressedSize=h.readInt(4),this.uncompressedSize=h.readInt(4);var m=h.readInt(2);if(this.extraFieldsLength=h.readInt(2),this.fileCommentLength=h.readInt(2),this.diskNumberStart=h.readInt(2),this.internalFileAttributes=h.readInt(2),this.externalFileAttributes=h.readInt(4),this.localHeaderOffset=h.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");h.skip(m),this.readExtraFields(h),this.parseZIP64ExtraField(h),this.fileComment=h.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var h=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),h==0&&(this.dosPermissions=63&this.externalFileAttributes),h==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var h=a(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=h.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=h.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&
vendor: 7,719 bytes, line 975
975(this.localHeaderOffset=h.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=h.readInt(4))}},readExtraFields:function(h){var m,p,v,y=h.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});h.index+4<y;)m=h.readInt(2),p=h.readInt(2),v=h.readData(p),this.extraFields[m]={id:m,length:p,value:v};h.setIndex(y)},handleUTF8:function(){var h=x.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var m=this.findExtraFieldUnicodePath();if(m!==null)this.fileNameStr=m;else{var p=o.transformTo(h,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(p)}var v=this.findExtraFieldUnicodeComment();if(v!==null)this.fileCommentStr=v;else{var y=o.transformTo(h,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(y)}}},findExtraFieldUnicodePath:function(){var h=this.extraFields[28789];if(h){var m=a(h.value);return m.readInt(1)!==1||c(this.fileName)!==m.readInt(4)?null:u.utf8decode(m.readData(h.length-5))}return null},findExtraFieldUnicodeComment:function(){var h=this.extraFields[25461];if(h){var m=a(h.value);return m.readInt(1)!==1||c(this.fileComment)!==m.readInt(4)?null:u.utf8decode(m.readData(h.length-5))}return null}},n.exports=f},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,n,i){function a(m,p,v){this.name=m,this.dir=v.dir,this.date=v.date,this.comment=v.comment,this.unixPermissions=v.unixPermissions,this.dosPermissions=v.dosPermissions,this._data=p,this._dataBinary=v.binary,this.options={compression:v.compression,compressionOptions:v.compressionOptions}}var o=r("./stream/StreamHelper"),l=r("./stream/DataWorker"),c=r("./utf8"),u=r("./compressedObject"),d=r("./stream/GenericWorker");a.prototype={internalStream:function(m){var p=null,v="string";try{if(!m)throw new Error("No output type specified.");var y=(v=m.toLowerCase())==="string"||v==="text";v!=="binarystring"&&v!=="text"||(v="string"),p=this._decompressWorker();var b=!this._dataBinary;b&&!y&&(p=p.pipe(new c.Utf8EncodeWorker)),!b&&y&&(p=p.pipe(new c.Utf8DecodeWorker))}catch(g){(p=new d("error")).error(g)}return new o(p,v,"")},async:function(m,p){return this.internalStream(m).accumulate(p)},nodeStream:function(m,p){return this.internalStream(m||"nodebuffer").toNodejsStream(p)},_compressWorker:function(m,p){if(this._data instanceof u&&this._data.compression.magic===m.magic)return this._data.getCompressedWorker();var v=this._decompressWorker();return this._dataBinary||(v=v.pipe(new c.Utf8EncodeWorker)),u.createWorkerFrom(v,m,p)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof d?this._data:new l(this._data)}};for(var x=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],f=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<x.length;h++)a.prototype[x[h]]=f;n.exports=a},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,n,i){(function(a){var o,l,c=a.MutationObserver||a.WebKitMutationObserver;if(c){var u=0,d=new c(m),x=a.document.createTextNode("");d.observe(x,{characterData:!0}),o=function(){x.data=u=++u%2}}else if(a.setImmediate||a.MessageChannel===void 0)o="document"in a&&"onreadystatechange"in a.document.createElement("script")?function(){var p=a.document.createElement("script");p.onreadystatechange=function(){m(),p.onreadystatechange=null,p.parentNode.removeChild(p),p=null},a.document.documentElement.appendChild(p)}:function(){setTimeout(m,0)};else{var f=new a.MessageChannel;f.port1.onmessage=m,o=function(){f.port2.postMessage(0)}}var h=[];function m(){var p,v;l=!0;for(var y=h.length;y;){for(v=h,h=[],p=-1;++p<y;)v[p]();y=h.length}l=!1}n.exports=function(p){h.push(p)!==1||l||o()}}).call(this,typeof Li<"u"?Li:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,n,i){var a=r("immediate");function o(){}var l={},c=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function x(y){if(typeof y!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,y!==o&&p(this,y)}function f(y,b,g){this.promise=y,typeof b=="function"&&(this.onFulfilled=b,this.callFulfilled=this.otherCallFulfilled),typeof g=="function"&&(this.onRejected=g,this.callRejected=this.otherCallRejected)}function h(y,b,g){a(function(){var w;try{w=b(g)}catch(E){return l.reject(y,E)}w===y?l.reject(y,new TypeError("Cannot resolve promise with itself")):l.resolve(y,w)})}function m(y){var b=y&&y.then;if(y&&(typeof y=="object"||typeof y=="function")&&typeof b=="function")return function(){b.apply(y,arguments)}}function p(y,b){var g=!1;function w(j){g||(g=!0,l.reject(y,j))}function E(j){g||(g=!0,l.resolve(y,j))}var C=v(function(){b(E,w)});C.status==="error"&&w(C.value)}function v(y,b){var g={};try{g.value=y(b),g.status="success"}catch(w){g.status="error",g.value=w}return g}(n.exports=x).prototype.finally=function(y){if(typeof y!="function")return this;var b=this.constructor;return this.then(function(g){return b.resolve(y()).then(function(){return g})},function(g){return b.resolve(y()).then(function(){throw g})})},x.prototype.catch=function(y){return this.then(null,y)},x.prototype.then=function(y,b){if(typeof y!="function"&&this.state===u||typeof b!="function"&&this.state===c)return this;var g=new this.constructor(o);return this.state!==d?h(g,this.state===u?y:b,this.outcome):this.queue.push(new f(g,y,b)),g},f.prototype.callFulfilled=function(y){l.resolve(this.promise,y)},f.prototype.otherCallFulfilled=function(y){h(this.promise,this.onFulfilled,y)},f.prototype.callRejected=function(y){l.reject(this.promise,y)},f.prototype.otherCallRejected=function(y){h(this.promise,this.onRejected,y)},l.resolve=function(y,b){var g=v(m,b);if(g.status==="error")return l.reject(y,g.value);var w=g.value;if(w)p(y,w);else{y.state=u,y.outcome=b;for(var E=-1,C=y.queue.length;++E<C;)y.queue[E].callFulfilled(b)}return y},l.reject=function(y,b){y.state=c,y.outcome=b;for(var g=-1,w=y.queue.length;++g<w;)y.queue[g].callRejected(b);return y},x.resolve=function(y){return y instanceof this?y:l.resolve(new this(o),y)},x.reject=function(y){var b=new this(o);return l.reject(b,y)},x.all=function(y){var b=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var g=y.length,w=!1;if(!g)return this.resolve([]);for(var E=new Array(g),C=0,j=-1,S=new this(o);++j<g;)_(y[j],j);return S;function _(O,I){b.resolve(O).then(function(B){E[I]=B,++C!==g||w||(w=!0,l.resolve(S,E))},function(B){w||(w=!0,l.reject(S,B))})}},x.race=function(y){var b=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var g=y.length,w=!1;if(!g)return this.resolve([]);for(var E=-1,C=new this(o);++E<g;)j=y[E],b.resolve(j).then(function(S){w||(w=!0,l.resolve(C,S))},function(S){w||(w=!0,l.reject(C,S))});var j;return C}},{immediate:36}],38:[function(r,n,i){var a={};(0,r("./lib/utils/common").assign)(a,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),n.exports=a},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,n,i){var a=r("./zlib/deflate"),o=r("./utils/common"),l=r("./utils/strings"),c=r("./zlib/messages"),u=r("./zlib/zstream"),d=Object.prototype.toString,x=0,f=-1,h=0,m=8;function p(y){if(!(this instanceof p))return new p(y);this.options=o.assign({level:f,method:m,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},y||{});var b=this.options;
vendor: 4,869 bytes, line 975
975b.raw&&0<b.windowBits?b.windowBits=-b.windowBits:b.gzip&&0<b.windowBits&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var g=a.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(g!==x)throw new Error(c[g]);if(b.header&&a.deflateSetHeader(this.strm,b.header),b.dictionary){var w;if(w=typeof b.dictionary=="string"?l.string2buf(b.dictionary):d.call(b.dictionary)==="[object ArrayBuffer]"?new Uint8Array(b.dictionary):b.dictionary,(g=a.deflateSetDictionary(this.strm,w))!==x)throw new Error(c[g]);this._dict_set=!0}}function v(y,b){var g=new p(b);if(g.push(y,!0),g.err)throw g.msg||c[g.err];return g.result}p.prototype.push=function(y,b){var g,w,E=this.strm,C=this.options.chunkSize;if(this.ended)return!1;w=b===~~b?b:b===!0?4:0,typeof y=="string"?E.input=l.string2buf(y):d.call(y)==="[object ArrayBuffer]"?E.input=new Uint8Array(y):E.input=y,E.next_in=0,E.avail_in=E.input.length;do{if(E.avail_out===0&&(E.output=new o.Buf8(C),E.next_out=0,E.avail_out=C),(g=a.deflate(E,w))!==1&&g!==x)return this.onEnd(g),!(this.ended=!0);E.avail_out!==0&&(E.avail_in!==0||w!==4&&w!==2)||(this.options.to==="string"?this.onData(l.buf2binstring(o.shrinkBuf(E.output,E.next_out))):this.onData(o.shrinkBuf(E.output,E.next_out)))}while((0<E.avail_in||E.avail_out===0)&&g!==1);return w===4?(g=a.deflateEnd(this.strm),this.onEnd(g),this.ended=!0,g===x):w!==2||(this.onEnd(x),!(E.avail_out=0))},p.prototype.onData=function(y){this.chunks.push(y)},p.prototype.onEnd=function(y){y===x&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=y,this.msg=this.strm.msg},i.Deflate=p,i.deflate=v,i.deflateRaw=function(y,b){return(b=b||{}).raw=!0,v(y,b)},i.gzip=function(y,b){return(b=b||{}).gzip=!0,v(y,b)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,n,i){var a=r("./zlib/inflate"),o=r("./utils/common"),l=r("./utils/strings"),c=r("./zlib/constants"),u=r("./zlib/messages"),d=r("./zlib/zstream"),x=r("./zlib/gzheader"),f=Object.prototype.toString;function h(p){if(!(this instanceof h))return new h(p);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},p||{});var v=this.options;v.raw&&0<=v.windowBits&&v.windowBits<16&&(v.windowBits=-v.windowBits,v.windowBits===0&&(v.windowBits=-15)),!(0<=v.windowBits&&v.windowBits<16)||p&&p.windowBits||(v.windowBits+=32),15<v.windowBits&&v.windowBits<48&&!(15&v.windowBits)&&(v.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var y=a.inflateInit2(this.strm,v.windowBits);if(y!==c.Z_OK)throw new Error(u[y]);this.header=new x,a.inflateGetHeader(this.strm,this.header)}function m(p,v){var y=new h(v);if(y.push(p,!0),y.err)throw y.msg||u[y.err];return y.result}h.prototype.push=function(p,v){var y,b,g,w,E,C,j=this.strm,S=this.options.chunkSize,_=this.options.dictionary,O=!1;if(this.ended)return!1;b=v===~~v?v:v===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof p=="string"?j.input=l.binstring2buf(p):f.call(p)==="[object ArrayBuffer]"?j.input=new Uint8Array(p):j.input=p,j.next_in=0,j.avail_in=j.input.length;do{if(j.avail_out===0&&(j.output=new o.Buf8(S),j.next_out=0,j.avail_out=S),(y=a.inflate(j,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&_&&(C=typeof _=="string"?l.string2buf(_):f.call(_)==="[object ArrayBuffer]"?new Uint8Array(_):_,y=a.inflateSetDictionary(this.strm,C)),y===c.Z_BUF_ERROR&&O===!0&&(y=c.Z_OK,O=!1),y!==c.Z_STREAM_END&&y!==c.Z_OK)return this.onEnd(y),!(this.ended=!0);j.next_out&&(j.avail_out!==0&&y!==c.Z_STREAM_END&&(j.avail_in!==0||b!==c.Z_FINISH&&b!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(g=l.utf8border(j.output,j.next_out),w=j.next_out-g,E=l.buf2string(j.output,g),j.next_out=w,j.avail_out=S-w,w&&o.arraySet(j.output,j.output,g,w,0),this.onData(E)):this.onData(o.shrinkBuf(j.output,j.next_out)))),j.avail_in===0&&j.avail_out===0&&(O=!0)}while((0<j.avail_in||j.avail_out===0)&&y!==c.Z_STREAM_END);return y===c.Z_STREAM_END&&(b=c.Z_FINISH),b===c.Z_FINISH?(y=a.inflateEnd(this.strm),this.onEnd(y),this.ended=!0,y===c.Z_OK):b!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(j.avail_out=0))},h.prototype.onData=function(p){this.chunks.push(p)},h.prototype.onEnd=function(p){p===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},i.Inflate=h,i.inflate=m,i.inflateRaw=function(p,v){return(v=v||{}).raw=!0,m(p,v)},i.ungzip=m},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,n,i){var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";i.assign=function(c){for(var u=Array.prototype.slice.call(arguments,1
vendor: 17,626 bytes, line 975
975);u.length;){var d=u.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var x in d)d.hasOwnProperty(x)&&(c[x]=d[x])}}return c},i.shrinkBuf=function(c,u){return c.length===u?c:c.subarray?c.subarray(0,u):(c.length=u,c)};var o={arraySet:function(c,u,d,x,f){if(u.subarray&&c.subarray)c.set(u.subarray(d,d+x),f);else for(var h=0;h<x;h++)c[f+h]=u[d+h]},flattenChunks:function(c){var u,d,x,f,h,m;for(u=x=0,d=c.length;u<d;u++)x+=c[u].length;for(m=new Uint8Array(x),u=f=0,d=c.length;u<d;u++)h=c[u],m.set(h,f),f+=h.length;return m}},l={arraySet:function(c,u,d,x,f){for(var h=0;h<x;h++)c[f+h]=u[d+h]},flattenChunks:function(c){return[].concat.apply([],c)}};i.setTyped=function(c){c?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,o)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,l))},i.setTyped(a)},{}],42:[function(r,n,i){var a=r("./common"),o=!0,l=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{l=!1}for(var c=new a.Buf8(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function d(x,f){if(f<65537&&(x.subarray&&l||!x.subarray&&o))return String.fromCharCode.apply(null,a.shrinkBuf(x,f));for(var h="",m=0;m<f;m++)h+=String.fromCharCode(x[m]);return h}c[254]=c[254]=1,i.string2buf=function(x){var f,h,m,p,v,y=x.length,b=0;for(p=0;p<y;p++)(64512&(h=x.charCodeAt(p)))==55296&&p+1<y&&(64512&(m=x.charCodeAt(p+1)))==56320&&(h=65536+(h-55296<<10)+(m-56320),p++),b+=h<128?1:h<2048?2:h<65536?3:4;for(f=new a.Buf8(b),p=v=0;v<b;p++)(64512&(h=x.charCodeAt(p)))==55296&&p+1<y&&(64512&(m=x.charCodeAt(p+1)))==56320&&(h=65536+(h-55296<<10)+(m-56320),p++),h<128?f[v++]=h:(h<2048?f[v++]=192|h>>>6:(h<65536?f[v++]=224|h>>>12:(f[v++]=240|h>>>18,f[v++]=128|h>>>12&63),f[v++]=128|h>>>6&63),f[v++]=128|63&h);return f},i.buf2binstring=function(x){return d(x,x.length)},i.binstring2buf=function(x){for(var f=new a.Buf8(x.length),h=0,m=f.length;h<m;h++)f[h]=x.charCodeAt(h);return f},i.buf2string=function(x,f){var h,m,p,v,y=f||x.length,b=new Array(2*y);for(h=m=0;h<y;)if((p=x[h++])<128)b[m++]=p;else if(4<(v=c[p]))b[m++]=65533,h+=v-1;else{for(p&=v===2?31:v===3?15:7;1<v&&h<y;)p=p<<6|63&x[h++],v--;1<v?b[m++]=65533:p<65536?b[m++]=p:(p-=65536,b[m++]=55296|p>>10&1023,b[m++]=56320|1023&p)}return d(b,m)},i.utf8border=function(x,f){var h;for((f=f||x.length)>x.length&&(f=x.length),h=f-1;0<=h&&(192&x[h])==128;)h--;return h<0||h===0?f:h+c[x[h]]>f?h:f}},{"./common":41}],43:[function(r,n,i){n.exports=function(a,o,l,c){for(var u=65535&a|0,d=a>>>16&65535|0,x=0;l!==0;){for(l-=x=2e3<l?2e3:l;d=d+(u=u+o[c++]|0)|0,--x;);u%=65521,d%=65521}return u|d<<16|0}},{}],44:[function(r,n,i){n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(r,n,i){var a=function(){for(var o,l=[],c=0;c<256;c++){o=c;for(var u=0;u<8;u++)o=1&o?3988292384^o>>>1:o>>>1;l[c]=o}return l}();n.exports=function(o,l,c,u){var d=a,x=u+c;o^=-1;for(var f=u;f<x;f++)o=o>>>8^d[255&(o^l[f])];return-1^o}},{}],46:[function(r,n,i){var a,o=r("../utils/common"),l=r("./trees"),c=r("./adler32"),u=r("./crc32"),d=r("./messages"),x=0,f=4,h=0,m=-2,p=-1,v=4,y=2,b=8,g=9,w=286,E=30,C=19,j=2*w+1,S=15,_=3,O=258,I=O+_+1,B=42,T=113,k=1,$=2,W=3,z=4;function L(P,G){return P.msg=d[G],G}function F(P){return(P<<1)-(4<P?9:0)}function U(P){for(var G=P.length;0<=--G;)P[G]=0}function D(P){var G=P.state,Z=G.pending;Z>P.avail_out&&(Z=P.avail_out),Z!==0&&(o.arraySet(P.output,G.pending_buf,G.pending_out,Z,P.next_out),P.next_out+=Z,G.pending_out+=Z,P.total_out+=Z,P.avail_out-=Z,G.pending-=Z,G.pending===0&&(G.pending_out=0))}function N(P,G){l._tr_flush_block(P,0<=P.block_start?P.block_start:-1,P.strstart-P.block_start,G),P.block_start=P.strstart,D(P.strm)}function K(P,G){P.pending_buf[P.pending++]=G}function R(P,G){P.pending_buf[P.pending++]=G>>>8&255,P.pending_buf[P.pending++]=255&G}function H(P,G){var Z,V,M=P.max_chain_length,Y=P.strstart,ee=P.prev_length,te=P.nice_match,J=P.strstart>P.w_size-I?P.strstart-(P.w_size-I):0,oe=P.window,pe=P.w_mask,xe=P.prev,ve=P.strstart+O,Oe=oe[Y+ee-1],De=oe[Y+ee];P.prev_length>=P.good_match&&(M>>=2),te>P.lookahead&&(te=P.lookahead);do if(oe[(Z=G)+ee]===De&&oe[Z+ee-1]===Oe&&oe[Z]===oe[Y]&&oe[++Z]===oe[Y+1]){Y+=2,Z++;do;while(oe[++Y]===oe[++Z]&&oe[++Y]===oe[++Z]&&oe[++Y]===oe[++Z]&&oe[++Y]===oe[++Z]&&oe[++Y]===oe[++Z]&&oe[++Y]===oe[++Z]&&oe[++Y]===oe[++Z]&&oe[++Y]===oe[++Z]&&Y<ve);if(V=O-(ve-Y),Y=ve-O,ee<V){if(P.match_start=G,te<=(ee=V))break;Oe=oe[Y+ee-1],De=oe[Y+ee]}}while((G=xe[G&pe])>J&&--M!=0);return ee<=P.lookahead?ee:P.lookahead}function X(P){var G,Z,V,M,Y,ee,te,J,oe,pe,xe=P.w_size;do{if(M=P.window_size-P.lookahead-P.strstart,P.strstart>=xe+(xe-I)){for(o.arraySet(P.window,P.window,xe,xe,0),P.match_start-=xe,P.strstart-=xe,P.block_start-=xe,G=Z=P.hash_size;V=P.head[--G],P.head[G]=xe<=V?V-xe:0,--Z;);for(G=Z=xe;V=P.prev[--G],P.prev[G]=xe<=V?V-xe:0,--Z;);M+=xe}if(P.strm.avail_in===0)break;if(ee=P.strm,te=P.window,J=P.strstart+P.lookahead,oe=M,pe=void 0,pe=ee.avail_in,oe<pe&&(pe=oe),Z=pe===0?0:(ee.avail_in-=pe,o.arraySet(te,ee.input,ee.next_in,pe,J),ee.state.wrap===1?ee.adler=c(ee.adler,te,pe,J):ee.state.wrap===2&&(ee.adler=u(ee.adler,te,pe,J)),ee.next_in+=pe,ee.total_in+=pe,pe),P.lookahead+=Z,P.lookahead+P.insert>=_)for(Y=P.strstart-P.insert,P.ins_h=P.window[Y],P.ins_h=(P.ins_h<<P.hash_shift^P.window[Y+1])&P.hash_mask;P.insert&&(P.ins_h=(P.ins_h<<P.hash_shift^P.window[Y+_-1])&P.hash_mask,P.prev[Y&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=Y,Y++,P.insert--,!(P.lookahead+P.insert<_)););}while(P.lookahead<I&&P.strm.avail_in!==0)}function ie(P,G){for(var Z,V;;){if(P.lookahead<I){if(X(P),P.lookahead<I&&G===x)return k;if(P.lookahead===0)break}if(Z=0,P.lookahead>=_&&(P.ins_h=(P.ins_h<<P.hash_shift^P.window[P.strstart+_-1])&P.hash_mask,Z=P.prev[P.strstart&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=P.strstart),Z!==0&&P.strstart-Z<=P.w_size-I&&(P.match_length=H(P,Z)),P.match_length>=_)if(V=l._tr_tally(P,P.strstart-P.match_start,P.match_length-_),P.lookahead-=P.match_length,P.match_length<=P.max_lazy_match&&P.lookahead>=_){for(P.match_length--;P.strstart++,P.ins_h=(P.ins_h<<P.hash_shift^P.window[P.strstart+_-1])&P.hash_mask,Z=P.prev[P.strstart&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=P.strstart,--P.match_length!=0;);P.strstart++}else P.strstart+=P.match_length,P.match_length=0,P.ins_h=P.window[P.strstart],P.ins_h=(P.ins_h<<P.hash_shift^P.window[P.strstart+1])&P.hash_mask;else V=l._tr_tally(P,0,P.window[P.strstart]),P.lookahead--,P.strstart++;if(V&&(N(P,!1),P.strm.avail_out===0))return k}return P.insert=P.strstart<_-1?P.strstart:_-1,G===f?(N(P,!0),P.strm.avail_out===0?W:z):P.last_lit&&(N(P,!1),P.strm.avail_out===0)?k:$}function se(P,G){for(var Z,V,M;;){if(P.lookahead<I){if(X(P),P.lookahead<I&&G===x)return k;if(P.lookahead===0)break}if(Z=0,P.lookahead>=_&&(P.ins_h=(P.ins_h<<P.hash_shift^P.window[P.strstart+_-1])&P.hash_mask,Z=P.prev[P.strstart&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=P.strstart),P.prev_length=P.match_length,P.prev_match=P.match_start,P.match_length=_-1,Z!==0&&P.prev_length<P.max_lazy_match&&P.strstart-Z<=P.w_size-I&&(P.match_length=H(P,Z),P.match_length<=5&&(P.strategy===1||P.match_length===_&&4096<P.strstart-P.match_start)&&(P.match_length=_-1)),P.prev_length>=_&&P.match_length<=P.prev_length){for(M=P.strstart+P.lookahead-_,V=l._tr_tally(P,P.strstart-1-P.prev_match,P.prev_length-_),P.lookahead-=P.prev_length-1,P.prev_length-=2;++P.strstart<=M&&(P.ins_h=(P.ins_h<<P.hash_shift^P.window[P.strstart+_-1])&P.hash_mask,Z=P.prev[P.strstart&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=P.strstart),--P.prev_length!=0;);if(P.match_available=0,P.match_length=_-1,P.strstart++,V&&(N(P,!1),P.strm.avail_out===0))return k}else if(P.match_available){if((V=l._tr_tally(P,0,P.window[P.strstart-1]))&&N(P,!1),P.strstart++,P.lookahead--,P.strm.avail_out===0)return k}else P.match_available=1,P.strstart++,P.lookahead--}return P.match_available&&(V=l._tr_tally(P,0,P.window[P.strstart-1]),P.match_available=0),P.insert=P.strstart<_-1?P.strstart:_-1,G===f?(N(P,!0),P.strm.avail_out===0?W:z):P.last_lit&&(N(P,!1),P.strm.avail_out===0)?k:$}function ne(P,G,Z,V,M){this.good_length=P,this.max_lazy=G,this.nice_length=Z,this.max_chain=V,this.func=M}function ce(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=b,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*j),this.dyn_dtree=new o.Buf16(2*(2*E+1)),this.bl_tree=new o.Buf16(2*(2*C+1)),U(this.dyn_ltree),U(this.dyn_dtree),U(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(S+1),this.heap=new o.Buf16(2*w+1),U(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*w+1),U(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ae(P){var G;return P&&P.state?(P.total_in=P.total_out=0,P.data_type=y,(G=P.state).pending=0,G.pending_out=0,G.wrap<0&&(G.wrap=-G.wrap),G.status=G.wrap?B:T,P.adler=G.wrap===2?0:1,G.last_flush=x,l._tr_init(G),h):L(P,m)}function Q(P){var G=ae(P);return G===h&&function(Z){Z.window_size=2*Z.w_size,U(Z.head),Z.max_lazy_match=a[Z.level].max_lazy,Z.good_match=a[Z.level].good_length,Z.nice_match=a[Z.level].nice_length,Z.max_chain_length=a[Z.level].max_chain,Z.strstart=0,Z.block_start=0,Z.lookahead=0,Z.insert=0,Z.match_length=Z.prev_length=_-1,Z.match_available=0,Z.ins_h=0}(P.state),G}function he(P,G,Z,V,M,Y){if(!P)return m;var ee=1;if(G===p&&(G=6),V<0?(ee=0,V=-V):15<V&&(ee=2,V-=16),M<1||g<M||Z!==b||V<8||15<V||G<0||9<G||Y<0||v<Y)return L(P,m);V===8&&(V=9);var te=new ce;return(P.state=te).strm=P,te.wrap=ee,te.gzhead=null,te.w_bits=V,te.w_size=1<<te.w_bits,te.w_mask=te.w_size-1,te.hash_bits=M+7,te.hash_size=1<<te.hash_bits,te.hash_mask=te.hash_size-1,te.hash_shift=~~((te.hash_bits+_-1)/_),te.window=new o.Buf8(2*te.w_size),te.head=new o.Buf16(te.hash_size),te.prev=new o.Buf16(te.w_size),te.lit_bufsize=1<<M+6,te.pending_buf_size=4*te.lit_bufsize,te.pending_buf=new o.Buf8(te.pending_buf_size),te.d_buf=1*te.lit_bufsize,te.l_buf=3*te.lit_bufsize,te.level=G,te.strategy=Y,te.method=Z,Q(P)}a=[new ne(0,0,0,0,function(P,G){var Z=65535;for(Z>P.pending_buf_size-5&&(Z=P.pending_buf_size-5);;){if(P.lookahead<=1){if(X(P),P.lookahead===0&&G===x)return k;if(P.lookahead===0)break}P.strstart+=P.lookahead,P.lookahead=0;var V=P.block_start+Z;if((P.strstart===0||P.strstart>=V)&&(P.lookahead=P.strstart-V,P.strstart=V,N(P,!1),P.strm.avail_out===0)||P.strstart-P.block_start>=P.w_size-I&&(N(P,!1),P.strm.avail_out===0))return k}return P.insert=0,G===f?(N(P,!0),P.strm.avail_out===0?W:z):(P.strstart>P.block_start&&(N(P,!1),P.strm.avail_out),k)}),new ne(4,4,8,4,ie),new ne(4,5,16,8,ie),new ne(4,6,32,32,ie),new ne(4,4,16,16,se),new ne(8,16,32,32,se),new ne(8,16,128,128,se),new ne(8,32,128,256,se),new ne(32,128,258,1024,se),new ne(32,258,258,4096,se)],i.deflateInit=function(P,G){return he(P,G,b,15,8,0)},i.deflateInit2=he,i.deflateReset=Q,i.deflateResetKeep=ae,i.deflateSetHeader=function(P,G){return P&&P.state?P.state.wrap!==2?m:(P.state.gzhead=G,h):m},i.deflate=function(P,G){var Z,V,M,Y;if(!P||!P.state||5<G||G<0)return P?L(P,m):m;if(V=P.state,!P.output||!P.input&&P.avail_in!==0||V.status===666&&G!==f)return L(P,P.avail_out===0?-5:m);if(V.strm=P,Z=V.last_flush,V.last_flush=G,V.status===B)if(V.wrap===2)P.adler=0,K(V,31),K(V,139),K(V,8),V.gzhead?(K(V,(V.gzhead.text?1:0)+(V.gzhead.hcrc?2:0)+(V.gzhead.extra?4:0)+(V.gzhead.name?8:0)+(V.gzhead.comment?16:0)),K(V,255&V.gzhead.time),K(V,V.gzhead.time>>8&255),K(V,V.gzhead.time>>16&255),K(V,V.gzhead.time>>24&255),K(V,V.level===9?2:2<=V.strategy||V.level<2?4:0),K(V,255&V.gzhead.os),V.gzhead.extra&&V.gzhead.extra.length&&(K(V,255&V.gzhead.extra.length),K(V,V.gzhead.extra.length>>8&255)),V.gzhead.hcrc&&(P.adler=u(P.adler,V.pending_buf,V.pending,0)),V.gzindex=0,V.status=69):(K(V,0),K(V,0),K(V,0),K(V,0),K(V,0),K(V,V.level===9?2:2<=V.strategy||V.level<2?4:0),K(V,3),V.status=T);else{var ee=b+(V.w_bits-8<<4)<<8;ee|=(2<=V.strategy||V.level<2?0:V.level<6?1:V.level===6?2:3)<<6,V.strstart!==0&&(ee|=32),ee+=31-ee%31,V.status=T,R(V,ee),V.strstart!==0&&(R(V,P.adler>>>16),R(V,65535&P.adler)),P.adler=1}if(V.status===69)if(V.gzhead.extra){for(M=V.pending;V.gzindex<(65535&V.gzhead.extra.length)&&(V.pending!==V.pending_buf_size||(V.gzhead.hcrc&&V.pending>M&&(P.adler=u(P.adler,V.pending_buf,V.pending-M,M)),D(P),M=V.pending,V.pending!==V.pending_buf_size));)K(V,255&V.gzhead.extra[V.gzindex]),V.gzindex++;V.gzhead.hcrc&&V.pending>M&&(P.adler=u(P.adler,V.pending_buf,V.pending-M,M)),V.gzindex===V.gzhead.extra.length&&(V.gzindex=0,V.status=73)}else V.status=73;if(V.status===73)if(V.gzhead.name){M=V.pending;do{if(V.pending===V.pending_buf_size&&(V.gzhead.hcrc&&V.pending>M&&(P.adler=u(P.adler,V.pending_buf,V.pending-M,M)),D(P),M=V.pending,V.pending===V.pending_buf_size)){Y=1;break}Y=V.gzindex<V.gzhead.name.length?255&V.gzhead.name.charCodeAt(V.gzindex++):0,K(V,Y)}while(Y!==0);V.gzhead.hcrc&&V.pending>M&&(P.adler=u(P.adler,V.pending_buf,V.pending-M,M)),Y===0&&(V.gzindex=0,V.status=91)}else V.status=91;if(V.status===91)if(V.gzhead.comment){M=V.pending;do{if(V.pending===V.pending_buf_size&&(V.gzhead.hcrc&&V.pending>M&&(P.adler=u(P.adler,V.pending_buf,V.pending-M,M)),D(P),M=V.pending,V.pending===V.pending_buf_size)){Y=1;break}Y=V.gzindex<V.gzhead.comment.length?255&V.gzhead.comment.charCodeAt(V.gzindex++):0,K(V,Y)}while(Y!==0);V.gzhead.hcrc&&V.pending>M&&(P.adler=u(P.adler,V.pending_buf,V.pending-M,M)),Y===0&&(V.status=103)}else V.status=103;if(V.status===103&&(V.gzhead.hcrc?(V.pending+2>V.pending_buf_size&&D(P),V.pending+2<=V.pending_buf_size&&(K(V,255&P.adler),K(V,P.adler>>8&255),P.adler=0,V.status=T)):V.status=T),V.pending!==0){if(D(P),P.avail_out===0)return V.last_flush=-1,h}else if(P.avail_in===0&&F(G)<=F(Z)&&G!==f)return L(P,-5);if(V.status===666&&P.avail_in!==0)return L(P,-5);if(P.avail_in!==0||V.lookahead!==0||G!==x&&V.status!==666){var te=V.strategy===2?function(J,oe){for(var pe;;){if(J.lookahead===0&&(X(J),J.lookahead===0)){if(oe===x)return k;break}if(J.match_length=0,pe=l._tr_tally(J,0,J.window[J.strstart]),J.lookahead--,J.strstart++,pe&&(N(J,!1),J.strm.avail_out===0))return k}return J.insert=0,oe===f?(N(J,!0),J.strm.avail_out===0?W:z):J.last_lit&&(N(J,!1),J.strm.avail_out===0)?k:$}(V,G):V.strategy===3?function(J,oe){for(var pe,xe,ve,Oe,De=J.window;;){if(J.lookahead<=O){if(X(J),J.lookahead<=O&&oe===x)return k;if(J.lookahead===0)break}if(J.match_length=0,J.lookahead>=_&&0<J.strstart&&(xe=De[ve=J.strstart-1])===De[++ve]&&xe===De[++ve]&&xe===De[++ve]){Oe=J.strstart+O;do;while(xe===De[++ve]&&xe===De[++ve]&&xe===De[++ve]&&xe===De[++ve]&&xe===De[++ve]&&xe===De[++ve]&&xe===De[++ve]&&xe===De[++ve]&&ve<Oe);J.match_length=O-(Oe-ve),J.match_length>J.lookahead&&(J.match_length=J.lookahead)}if(J.match_length>=_?(pe=l._tr_tally(J,1,J.match_length-_),J.lookahead-=J.match_length,J.strstart+=J.match_length,J.match_length=0):(pe=l._tr_tally(J,0,J.window[J.strstart]),J.lookahead--,J.strstart++),pe&&(N(J,!1),J.strm.avail_out===0))return k}return J.insert=0,oe===f?(N(J,!0),J.strm.avail_out===0?W:z):J.last_lit&&(N(J,!1),J.strm.avail_out===0)?k:$}(V,G):a[V.level].func(V,G);if(te!==W&&te!==z||(V.status=666),te===k||te===W)return P.avail_out===0&&(V.last_flush=-1),h;if(te===$&&(G===1?l._tr_align(V):G!==5&&(l._tr_stored_block(V,0,0,!1),G===3&&(U(V.head),V.lookahead===0&&(V.strstart=0,V.block_start=0,V.insert=0))),D(P),P.avail_out===0))return V.last_flush=-1,h}return G!==f?h:V.wrap<=0?1:(V.wrap===2?(K(V,255&P.adler),K(V,P.adler>>8&255),K(V,P.adler>>16&255),K(V,P.adler>>24&255),K(V,255&P.total_in),K(V,P.total_in>>8&255),K(V,P.total_in>>16&255),K(V,P.total_in>>24&255)):(R(V,P.adler>>>16),R(V,65535&P.adler)),D(P),0<V.wrap&&(V.wrap=-V.wrap),V.pending!==0?h:1)},i.deflateEnd=function(P){var G;return P&&P.state?(G=P.state.status)!==B&&G!==69&&G!==73&&G!==91&&G!==103&&G!==T&&G!==666?L(P,m):(P.state=null,G===T?L(P,-3):h):m},i.deflateSetDictionary=function(P,G){var Z,V,M,Y,ee,te,J,oe,pe=G.length;if(!P||!P.state||(Y=(Z=P.state).wrap)===2||Y===1&&Z.status!==B||Z.lookahead)return m;for(Y===1&&(P.adler=c(P.adler,G,pe,0)),Z.wrap=0,pe>=Z.w_size&&(Y===0&&(U(Z.head),Z.strstart=0,Z.block_start=0,Z.insert=0),oe=new o.Buf8(Z.w_size),o.arraySet(oe,G,pe-Z.w_size,Z.w_size,0),G=oe,pe=Z.w_size),ee=P.avail_in,te=P.next_in,J=P.input,P.avail_in=pe,P.next_in=0,P.input=G,X(Z);Z.lookahead>=_;){for(V=Z.strstart,M=Z.lookahead-(_-1);Z.ins_h=(Z.ins_h<<Z.hash_shift^Z.window[V+_-1])&Z.hash_mask,Z.prev[V&Z.w_mask]=Z.head[Z.ins_h],Z.head[Z.ins_h]=V,V++,--M;);Z.strstart=V,Z.lookahead=_-1,X(Z)}return Z.strstart+=Z.lookahead,Z.block_start=Z.strstart,Z.insert=Z.lookahead,Z.lookahead=0,Z.match_length=Z.prev_length=_-1,Z.match_available=0,P.next_in=te,P.input
vendor: 5,276 bytes, line 975
975=J,P.avail_in=ee,Z.wrap=Y,h},i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,n,i){n.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(r,n,i){n.exports=function(a,o){var l,c,u,d,x,f,h,m,p,v,y,b,g,w,E,C,j,S,_,O,I,B,T,k,$;l=a.state,c=a.next_in,k=a.input,u=c+(a.avail_in-5),d=a.next_out,$=a.output,x=d-(o-a.avail_out),f=d+(a.avail_out-257),h=l.dmax,m=l.wsize,p=l.whave,v=l.wnext,y=l.window,b=l.hold,g=l.bits,w=l.lencode,E=l.distcode,C=(1<<l.lenbits)-1,j=(1<<l.distbits)-1;e:do{g<15&&(b+=k[c++]<<g,g+=8,b+=k[c++]<<g,g+=8),S=w[b&C];t:for(;;){if(b>>>=_=S>>>24,g-=_,(_=S>>>16&255)===0)$[d++]=65535&S;else{if(!(16&_)){if(!(64&_)){S=w[(65535&S)+(b&(1<<_)-1)];continue t}if(32&_){l.mode=12;break e}a.msg="invalid literal/length code",l.mode=30;break e}O=65535&S,(_&=15)&&(g<_&&(b+=k[c++]<<g,g+=8),O+=b&(1<<_)-1,b>>>=_,g-=_),g<15&&(b+=k[c++]<<g,g+=8,b+=k[c++]<<g,g+=8),S=E[b&j];r:for(;;){if(b>>>=_=S>>>24,g-=_,!(16&(_=S>>>16&255))){if(!(64&_)){S=E[(65535&S)+(b&(1<<_)-1)];continue r}a.msg="invalid distance code",l.mode=30;break e}if(I=65535&S,g<(_&=15)&&(b+=k[c++]<<g,(g+=8)<_&&(b+=k[c++]<<g,g+=8)),h<(I+=b&(1<<_)-1)){a.msg="invalid distance too far back",l.mode=30;break e}if(b>>>=_,g-=_,(_=d-x)<I){if(p<(_=I-_)&&l.sane){a.msg="invalid distance too far back",l.mode=30;break e}if(T=y,(B=0)===v){if(B+=m-_,_<O){for(O-=_;$[d++]=y[B++],--_;);B=d-I,T=$}}else if(v<_){if(B+=m+v-_,(_-=v)<O){for(O-=_;$[d++]=y[B++],--_;);if(B=0,v<O){for(O-=_=v;$[d++]=y[B++],--_;);B=d-I,T=$}}}else if(B+=v-_,_<O){for(O-=_;$[d++]=y[B++],--_;);B=d-I,T=$}for(;2<O;)$[d++]=T[B++],$[d++]=T[B++],$[d++]=T[B++],O-=3;O&&($[d++]=T[B++],1<O&&($[d++]=T[B++]))}else{for(B=d-I;$[d++]=$[B++],$[d++]=$[B++],$[d++]=$[B++],2<(O-=3););O&&($[d++]=$[B++],1<O&&($[d++]=$[B++]))}break}}break}}while(c<u&&d<f);c-=O=g>>3,b&=(1<<(g-=O<<3))-1,a.next_in=c,a.next_out=d,a.avail_in=c<u?u-c+5:5-(c-u),a.avail_out=d<f?f-d+257:257-(d-f),l.hold=b,l.bits=g}},{}],49:[function(r,n,i){var a=r("../utils/common"),o=r("./adler32"),l=r("./crc32"),c=r("./inffast"),u=r("./inftrees"),d=1,x=2,f=0,h=-2,m=1,p=852,v=592;function y(B){return(B>>>24&255)+(B>>>8&65280)+((65280&B)<<8)+((255&B)<<24)}function b(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function g(B){var T;return B&&B.state?(T=B.state,B.total_in=B.total_out=T.total=0,B.msg="",T.wrap&&(B.adler=1&T.wrap),T.mode=m,T.last=0,T.havedict=0,T.dmax=32768,T.head=null,T.hold=0,T.bits=0,T.lencode=T.lendyn=new a.Buf32(p),T.distcode=T.distdyn=new a.Buf32(v),T.sane=1,T.back=-1,f):h}function w(B){var T;return B&&B.state?((T=B.state).wsize=0,T.whave=0,T.wnext=0,g(B)):h}function E(B,T){var k,$;return B&&B.state?($=B.state,T<0?(k=0,T=-T):(k=1+(T>>4),T<48&&(T&=15)),T&&(T<8||15<T)?h:($.window!==null&&$.wbits!==T&&($.window=null),$.wrap=k,$.wbits=T,w(B))):h}function C(B,T){var k,$;return B?($=new b,(B.state=$).window=null,(k=E(B,T))!==f&&(B.state=null),k):h}var j,S,_=!0;function O(B){if(_){var T;for(j=new a.Buf32(512),S=new a.Buf32(32),T=0;T<144;)B.lens[T++]=8;for(;T<256;)B.lens[T++]=9;for(;T<280;)B.lens[T++]=7;for(;T<288;)B.lens[T++]=8;for(u(d,B.lens,0,288,j,0,B.work,{bits:9}),T=0;T<32;)B.lens[T++]=5;u(x,B.lens,0,32,S,0,B.work,{bits:5}),_=!1}B.lencode=j,B.lenbits=9,B.distcode=S,B.distbits=5}function I(B,T,k,$){var W,z=B.state;return z.window===null&&(z.wsize=1<<z.wbits,z.wnext=0,z.whave=0,z.window=new a.Buf8(z.wsize)),$>=z.wsize?(a.arraySet(z.window,T,k-z.wsize,z.wsize,0),z.wnext=0,z.whave=z.wsize):($<(W=z.wsize-z.wnext)&&(W=$),a.arraySet(z.window,T,k-$,W,z.wnext),($-=W)?(a.arraySet(z.window,T,k-$,$,0),z.wnext=$,z.whave=z.wsize):(z.wnext+=W,z.wnext===z.wsize&&(z.wnext=0),z.whave<z.wsize&&(z.whave+=W))),0}i.inflateReset=w,i.inflateReset2=E,i.inflateResetKeep=g,i.inflateInit=function(B){return C(B,15)},i.inflateInit2=C,i.inflate=function(B,T){var k,$,W,z,L,F,U,D,N,K,R,H,X,ie,se,ne,ce,ae,Q,he,P,G,Z,V,M=0,Y=new a.Buf8(4),ee=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!B||!B.state||!B.output||!B.input&&B.avail_in!==0)return h;(k=B.state).mode===12&&(k.mode=13),L=B.next_out,W=B.output,U=B.avail_out,z=B.next_in,$=B.input,F=B.avail_in,D=k.hold,N=k.bits,K=F,R=U,G=f;e:for(;;)switch(k.mode){case m:if(k.wrap===0){k.mode=13;break}for(;N<16;){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}if(2&k.wrap&&D===35615){Y[k.check=0]=255&D,Y[1]=D>>>8&255,k.check=l(k.check,Y,2,0),N=D=0,k.mode=2;break}if(k.flags=0,k.head&&(k.head.done=!1),!(1&k.wrap)||(((255&D)<<8)+(D>>8))%31){B.msg="incorrect header check",k.mode=30;break}if((15&D)!=8){B.msg="unknown compression method",k.mode=30;break}if(N-=4,P=8+(15&(D>>>=4)),k.wbits===0)k.wbits=P;else if(P>k.wbits){B.msg="invalid window size",k.mode=30;break}
vendor: 4,327 bytes, line 975
975k.dmax=1<<P,B.adler=k.check=1,k.mode=512&D?10:12,N=D=0;break;case 2:for(;N<16;){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}if(k.flags=D,(255&k.flags)!=8){B.msg="unknown compression method",k.mode=30;break}if(57344&k.flags){B.msg="unknown header flags set",k.mode=30;break}k.head&&(k.head.text=D>>8&1),512&k.flags&&(Y[0]=255&D,Y[1]=D>>>8&255,k.check=l(k.check,Y,2,0)),N=D=0,k.mode=3;case 3:for(;N<32;){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}k.head&&(k.head.time=D),512&k.flags&&(Y[0]=255&D,Y[1]=D>>>8&255,Y[2]=D>>>16&255,Y[3]=D>>>24&255,k.check=l(k.check,Y,4,0)),N=D=0,k.mode=4;case 4:for(;N<16;){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}k.head&&(k.head.xflags=255&D,k.head.os=D>>8),512&k.flags&&(Y[0]=255&D,Y[1]=D>>>8&255,k.check=l(k.check,Y,2,0)),N=D=0,k.mode=5;case 5:if(1024&k.flags){for(;N<16;){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}k.length=D,k.head&&(k.head.extra_len=D),512&k.flags&&(Y[0]=255&D,Y[1]=D>>>8&255,k.check=l(k.check,Y,2,0)),N=D=0}else k.head&&(k.head.extra=null);k.mode=6;case 6:if(1024&k.flags&&(F<(H=k.length)&&(H=F),H&&(k.head&&(P=k.head.extra_len-k.length,k.head.extra||(k.head.extra=new Array(k.head.extra_len)),a.arraySet(k.head.extra,$,z,H,P)),512&k.flags&&(k.check=l(k.check,$,H,z)),F-=H,z+=H,k.length-=H),k.length))break e;k.length=0,k.mode=7;case 7:if(2048&k.flags){if(F===0)break e;for(H=0;P=$[z+H++],k.head&&P&&k.length<65536&&(k.head.name+=String.fromCharCode(P)),P&&H<F;);if(512&k.flags&&(k.check=l(k.check,$,H,z)),F-=H,z+=H,P)break e}else k.head&&(k.head.name=null);k.length=0,k.mode=8;case 8:if(4096&k.flags){if(F===0)break e;for(H=0;P=$[z+H++],k.head&&P&&k.length<65536&&(k.head.comment+=String.fromCharCode(P)),P&&H<F;);if(512&k.flags&&(k.check=l(k.check,$,H,z)),F-=H,z+=H,P)break e}else k.head&&(k.head.comment=null);k.mode=9;case 9:if(512&k.flags){for(;N<16;){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}if(D!==(65535&k.check)){B.msg="header crc mismatch",k.mode=30;break}N=D=0}k.head&&(k.head.hcrc=k.flags>>9&1,k.head.done=!0),B.adler=k.check=0,k.mode=12;break;case 10:for(;N<32;){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}B.adler=k.check=y(D),N=D=0,k.mode=11;case 11:if(k.havedict===0)return B.next_out=L,B.avail_out=U,B.next_in=z,B.avail_in=F,k.hold=D,k.bits=N,2;B.adler=k.check=1,k.mode=12;case 12:if(T===5||T===6)break e;case 13:if(k.last){D>>>=7&N,N-=7&N,k.mode=27;break}for(;N<3;){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}switch(k.last=1&D,N-=1,3&(D>>>=1)){case 0:k.mode=14;break;case 1:if(O(k),k.mode=20,T!==6)break;D>>>=2,N-=2;break e;case 2:k.mode=17;break;case 3:B.msg="invalid block type",k.mode=30}D>>>=2,N-=2;break;case 14:for(D>>>=7&N,N-=7&N;N<32;){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}if((65535&D)!=(D>>>16^65535)){B.msg="invalid stored block lengths",k.mode=30;break}if(k.length=65535&D,N=D=0,k.mode=15,T===6)break e;case 15:k.mode=16;case 16:if(H=k.length){if(F<H&&(H=F),U<H&&(H=U),H===0)break e;a.arraySet(W,$,z,H,L),F-=H,z+=H,U-=H,L+=H,k.length-=H;break}k.mode=12;break;case 17:for(;N<14;){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}if(k.nlen=257+(31&D),D>>>=5,N-=5,k.ndist=1+(31&D),D>>>=5,N-=5,k.ncode=4+(15&D),D>>>=4,N-=4,286<k.nlen||30<k.ndist){B.msg="too many length or distance symbols",k.mode=30;break}k.have=0,k.mode=18;case 18:for(;k.have<k.ncode;){for(;N<3;){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}k.lens[ee[k.have++]]=7&D,D>>>=3,N-=3}for(;k.have<19;)k.lens[ee[k.have++]]=0;if(k.lencode=k.lendyn,k.lenbits=7,Z={bits:k.lenbits},G=u(0,k.lens,0,19,k.lencode,0,k.work,Z),k.lenbits=Z.bits,G){B.msg="invalid code lengths set",k.mode=30;break}k.have=0,k.mode=19;case 19:for(;k.have<k.nlen+k.ndist;){for(;ne=(M=k.lencode[D&(1<<k.lenbits)-1])>>>16&255,ce=65535&M,!((se=M>>>24)<=N);){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}if(ce<16)D>>>=se,N-=se,k.lens[k.have++]=ce;else{if(ce===16){for(V=se+2;N<V;){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}if(D>>>=se,N-=se,k.have===0){B.msg="invalid bit length repeat",k.mode=30;break}P=k.lens[k.have-1],H=3+(3&D),D>>>=2,N-=2}else if(ce===17){for(V=se+3;N<V;){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}N-=se,P=0,H=3+(7&(D>>>=se)),D>>>=3,N-=3}else{for(V=se+7;N<V;){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}N-=se,P=0,H=11+(127&(D>>>=se)),D>>>=7,N-=7}if(k.have+H>k.nlen+k.ndist){B.msg="invalid bit length repeat",k.mode=30;break}for(;H--;)k.lens[k.have++]=P}}if(k.mode===30)break;if(k.lens[256]===0){B.msg="invalid code -- missing end-of-block",k.mode=30;break}
vendor: 4,327 bytes, line 975
975if(k.lenbits=9,Z={bits:k.lenbits},G=u(d,k.lens,0,k.nlen,k.lencode,0,k.work,Z),k.lenbits=Z.bits,G){B.msg="invalid literal/lengths set",k.mode=30;break}if(k.distbits=6,k.distcode=k.distdyn,Z={bits:k.distbits},G=u(x,k.lens,k.nlen,k.ndist,k.distcode,0,k.work,Z),k.distbits=Z.bits,G){B.msg="invalid distances set",k.mode=30;break}if(k.mode=20,T===6)break e;case 20:k.mode=21;case 21:if(6<=F&&258<=U){B.next_out=L,B.avail_out=U,B.next_in=z,B.avail_in=F,k.hold=D,k.bits=N,c(B,R),L=B.next_out,W=B.output,U=B.avail_out,z=B.next_in,$=B.input,F=B.avail_in,D=k.hold,N=k.bits,k.mode===12&&(k.back=-1);break}for(k.back=0;ne=(M=k.lencode[D&(1<<k.lenbits)-1])>>>16&255,ce=65535&M,!((se=M>>>24)<=N);){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}if(ne&&!(240&ne)){for(ae=se,Q=ne,he=ce;ne=(M=k.lencode[he+((D&(1<<ae+Q)-1)>>ae)])>>>16&255,ce=65535&M,!(ae+(se=M>>>24)<=N);){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}D>>>=ae,N-=ae,k.back+=ae}if(D>>>=se,N-=se,k.back+=se,k.length=ce,ne===0){k.mode=26;break}if(32&ne){k.back=-1,k.mode=12;break}if(64&ne){B.msg="invalid literal/length code",k.mode=30;break}k.extra=15&ne,k.mode=22;case 22:if(k.extra){for(V=k.extra;N<V;){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}k.length+=D&(1<<k.extra)-1,D>>>=k.extra,N-=k.extra,k.back+=k.extra}k.was=k.length,k.mode=23;case 23:for(;ne=(M=k.distcode[D&(1<<k.distbits)-1])>>>16&255,ce=65535&M,!((se=M>>>24)<=N);){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}if(!(240&ne)){for(ae=se,Q=ne,he=ce;ne=(M=k.distcode[he+((D&(1<<ae+Q)-1)>>ae)])>>>16&255,ce=65535&M,!(ae+(se=M>>>24)<=N);){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}D>>>=ae,N-=ae,k.back+=ae}if(D>>>=se,N-=se,k.back+=se,64&ne){B.msg="invalid distance code",k.mode=30;break}k.offset=ce,k.extra=15&ne,k.mode=24;case 24:if(k.extra){for(V=k.extra;N<V;){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}k.offset+=D&(1<<k.extra)-1,D>>>=k.extra,N-=k.extra,k.back+=k.extra}if(k.offset>k.dmax){B.msg="invalid distance too far back",k.mode=30;break}k.mode=25;case 25:if(U===0)break e;if(H=R-U,k.offset>H){if((H=k.offset-H)>k.whave&&k.sane){B.msg="invalid distance too far back",k.mode=30;break}X=H>k.wnext?(H-=k.wnext,k.wsize-H):k.wnext-H,H>k.length&&(H=k.length),ie=k.window}else ie=W,X=L-k.offset,H=k.length;for(U<H&&(H=U),U-=H,k.length-=H;W[L++]=ie[X++],--H;);k.length===0&&(k.mode=21);break;case 26:if(U===0)break e;W[L++]=k.length,U--,k.mode=21;break;case 27:if(k.wrap){for(;N<32;){if(F===0)break e;F--,D|=$[z++]<<N,N+=8}if(R-=U,B.total_out+=R,k.total+=R,R&&(B.adler=k.check=k.flags?l(k.check,W,R,L-R):o(k.check,W,R,L-R)),R=U,(k.flags?D:y(D))!==k.check){B.msg="incorrect data check",k.mode=30;break}N=D=0}k.mode=28;case 28:if(k.wrap&&k.flags){for(;N<32;){if(F===0)break e;F--,D+=$[z++]<<N,N+=8}if(D!==(4294967295&k.total)){B.msg="incorrect length check",k.mode=30;break}N=D=0}k.mode=29;case 29:G=1;break e;case 30:G=-3;break e;case 31:return-4;case 32:default:return h}return B.next_out=L,B.avail_out=U,B.next_in=z,B.avail_in=F,k.hold=D,k.bits=N,(k.wsize||R!==B.avail_out&&k.mode<30&&(k.mode<27||T!==4))&&I(B,B.output,B.next_out,R-B.avail_out)?(k.mode=31,-4):(K-=B.avail_in,R-=B.avail_out,B.total_in+=K,B.total_out+=R,k.total+=R,k.wrap&&R&&(B.adler=k.check=k.flags?l(k.check,W,R,B.next_out-R):o(k.check,W,R,B.next_out-R)),B.data_type=k.bits+(k.last?64:0)+(k.mode===12?128:0)+(k.mode===20||k.mode===15?256:0),(K==0&&R===0||T===4)&&G===f&&(G=-5),G)},i.inflateEnd=function(B){if(!B||!B.state)return h;var T=B.state;return T.window&&(T.window=null),B.state=null,f},i.inflateGetHeader=function(B,T){var k;return B&&B.state&&2&(k=B.state).wrap?((k.head=T).done=!1,f):h},i.inflateSetDictionary=function(B,T){var k,$=T.length;return B&&B.state?(k=B.state).wrap!==0&&k.mode!==11?h:k.mode===11&&o(1,T,$,0)!==k.check?-3:I(B,T,$,$)?(k.mode=31,-4):(k.havedict=1,f):h},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,n,i){var a=r("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];
vendor: 10,025 bytes, line 975
975n.exports=function(d,x,f,h,m,p,v,y){var b,g,w,E,C,j,S,_,O,I=y.bits,B=0,T=0,k=0,$=0,W=0,z=0,L=0,F=0,U=0,D=0,N=null,K=0,R=new a.Buf16(16),H=new a.Buf16(16),X=null,ie=0;for(B=0;B<=15;B++)R[B]=0;for(T=0;T<h;T++)R[x[f+T]]++;for(W=I,$=15;1<=$&&R[$]===0;$--);if($<W&&(W=$),$===0)return m[p++]=20971520,m[p++]=20971520,y.bits=1,0;for(k=1;k<$&&R[k]===0;k++);for(W<k&&(W=k),B=F=1;B<=15;B++)if(F<<=1,(F-=R[B])<0)return-1;if(0<F&&(d===0||$!==1))return-1;for(H[1]=0,B=1;B<15;B++)H[B+1]=H[B]+R[B];for(T=0;T<h;T++)x[f+T]!==0&&(v[H[x[f+T]]++]=T);if(j=d===0?(N=X=v,19):d===1?(N=o,K-=257,X=l,ie-=257,256):(N=c,X=u,-1),B=k,C=p,L=T=D=0,w=-1,E=(U=1<<(z=W))-1,d===1&&852<U||d===2&&592<U)return 1;for(;;){for(S=B-L,O=v[T]<j?(_=0,v[T]):v[T]>j?(_=X[ie+v[T]],N[K+v[T]]):(_=96,0),b=1<<B-L,k=g=1<<z;m[C+(D>>L)+(g-=b)]=S<<24|_<<16|O|0,g!==0;);for(b=1<<B-1;D&b;)b>>=1;if(b!==0?(D&=b-1,D+=b):D=0,T++,--R[B]==0){if(B===$)break;B=x[f+v[T]]}if(W<B&&(D&E)!==w){for(L===0&&(L=W),C+=k,F=1<<(z=B-L);z+L<$&&!((F-=R[z+L])<=0);)z++,F<<=1;if(U+=1<<z,d===1&&852<U||d===2&&592<U)return 1;m[w=D&E]=W<<24|z<<16|C-p|0}}return D!==0&&(m[C+D]=B-L<<24|64<<16|0),y.bits=W,0}},{"../utils/common":41}],51:[function(r,n,i){n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(r,n,i){var a=r("../utils/common"),o=0,l=1;function c(M){for(var Y=M.length;0<=--Y;)M[Y]=0}var u=0,d=29,x=256,f=x+1+d,h=30,m=19,p=2*f+1,v=15,y=16,b=7,g=256,w=16,E=17,C=18,j=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],S=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],I=new Array(2*(f+2));c(I);var B=new Array(2*h);c(B);var T=new Array(512);c(T);var k=new Array(256);c(k);var $=new Array(d);c($);var W,z,L,F=new Array(h);function U(M,Y,ee,te,J){this.static_tree=M,this.extra_bits=Y,this.extra_base=ee,this.elems=te,this.max_length=J,this.has_stree=M&&M.length}function D(M,Y){this.dyn_tree=M,this.max_code=0,this.stat_desc=Y}function N(M){return M<256?T[M]:T[256+(M>>>7)]}function K(M,Y){M.pending_buf[M.pending++]=255&Y,M.pending_buf[M.pending++]=Y>>>8&255}function R(M,Y,ee){M.bi_valid>y-ee?(M.bi_buf|=Y<<M.bi_valid&65535,K(M,M.bi_buf),M.bi_buf=Y>>y-M.bi_valid,M.bi_valid+=ee-y):(M.bi_buf|=Y<<M.bi_valid&65535,M.bi_valid+=ee)}function H(M,Y,ee){R(M,ee[2*Y],ee[2*Y+1])}function X(M,Y){for(var ee=0;ee|=1&M,M>>>=1,ee<<=1,0<--Y;);return ee>>>1}function ie(M,Y,ee){var te,J,oe=new Array(v+1),pe=0;for(te=1;te<=v;te++)oe[te]=pe=pe+ee[te-1]<<1;for(J=0;J<=Y;J++){var xe=M[2*J+1];xe!==0&&(M[2*J]=X(oe[xe]++,xe))}}function se(M){var Y;for(Y=0;Y<f;Y++)M.dyn_ltree[2*Y]=0;for(Y=0;Y<h;Y++)M.dyn_dtree[2*Y]=0;for(Y=0;Y<m;Y++)M.bl_tree[2*Y]=0;M.dyn_ltree[2*g]=1,M.opt_len=M.static_len=0,M.last_lit=M.matches=0}function ne(M){8<M.bi_valid?K(M,M.bi_buf):0<M.bi_valid&&(M.pending_buf[M.pending++]=M.bi_buf),M.bi_buf=0,M.bi_valid=0}function ce(M,Y,ee,te){var J=2*Y,oe=2*ee;return M[J]<M[oe]||M[J]===M[oe]&&te[Y]<=te[ee]}function ae(M,Y,ee){for(var te=M.heap[ee],J=ee<<1;J<=M.heap_len&&(J<M.heap_len&&ce(Y,M.heap[J+1],M.heap[J],M.depth)&&J++,!ce(Y,te,M.heap[J],M.depth));)M.heap[ee]=M.heap[J],ee=J,J<<=1;M.heap[ee]=te}function Q(M,Y,ee){var te,J,oe,pe,xe=0;if(M.last_lit!==0)for(;te=M.pending_buf[M.d_buf+2*xe]<<8|M.pending_buf[M.d_buf+2*xe+1],J=M.pending_buf[M.l_buf+xe],xe++,te===0?H(M,J,Y):(H(M,(oe=k[J])+x+1,Y),(pe=j[oe])!==0&&R(M,J-=$[oe],pe),H(M,oe=N(--te),ee),(pe=S[oe])!==0&&R(M,te-=F[oe],pe)),xe<M.last_lit;);H(M,g,Y)}function he(M,Y){var ee,te,J,oe=Y.dyn_tree,pe=Y.stat_desc.static_tree,xe=Y.stat_desc.has_stree,ve=Y.stat_desc.elems,Oe=-1;for(M.heap_len=0,M.heap_max=p,ee=0;ee<ve;ee++)oe[2*ee]!==0?(M.heap[++M.heap_len]=Oe=ee,M.depth[ee]=0):oe[2*ee+1]=0;for(;M.heap_len<2;)oe[2*(J=M.heap[++M.heap_len]=Oe<2?++Oe:0)]=1,M.depth[J]=0,M.opt_len--,xe&&(M.static_len-=pe[2*J+1]);for(Y.max_code=Oe,ee=M.heap_len>>1;1<=ee;ee--)ae(M,oe,ee);for(J=ve;ee=M.heap[1],M.heap[1]=M.heap[M.heap_len--],ae(M,oe,1),te=M.heap[1],M.heap[--M.heap_max]=ee,M.heap[--M.heap_max]=te,oe[2*J]=oe[2*ee]+oe[2*te],M.depth[J]=(M.depth[ee]>=M.depth[te]?M.depth[ee]:M.depth[te])+1,oe[2*ee+1]=oe[2*te+1]=J,M.heap[1]=J++,ae(M,oe,1),2<=M.heap_len;);M.heap[--M.heap_max]=M.heap[1],function(De,Et){var ge,He,wt,ze,br,Dn,qt=Et.dyn_tree,No=Et.max_code,Rc=Et.stat_desc.static_tree,ws=Et.stat_desc.has_stree,Do=Et.stat_desc.extra_bits,Cs=Et.stat_desc.extra_base,ln=Et.stat_desc.max_length,or=0;for(ze=0;ze<=v;ze++)De.bl_count[ze]=0;for(qt[2*De.heap[De.heap_max]+1]=0,ge=De.heap_max+1;ge<p;ge++)ln<(ze=qt[2*qt[2*(He=De.heap[ge])+1]+1]+1)&&(ze=ln,or++),qt[2*He+1]=ze,No<He||(De.bl_count[ze]++,br=0,Cs<=He&&(br=Do[He-Cs]),Dn=qt[2*He],De.opt_len+=Dn*(ze+br),ws&&(De.static_len+=Dn*(Rc[2*He+1]+br)));if(or!==0){do{for(ze=ln-1;De.bl_count[ze]===0;)ze--;De.bl_count[ze]--,De.bl_count[ze+1]+=2,De.bl_count[ln]--,or-=2}while(0<or);for(ze=ln;ze!==0;ze--)for(He=De.bl_count[ze];He!==0;)No<(wt=De.heap[--ge])||(qt[2*wt+1]!==ze&&(De.opt_len+=(ze-qt[2*wt+1])*qt[2*wt],qt[2*wt+1]=ze),He--)}}(M,Y),ie(oe,Oe,M.bl_count)}function P(M,Y,ee){var te,J,oe=-1,pe=Y[1],xe=0,ve=7,Oe=4;for(pe===0&&(ve=138,Oe=3),Y[2*(ee+1)+1]=65535,te=0;te<=ee;te++)J=pe,pe=Y[2*(te+1)+1],++xe<ve&&J===pe||(xe<Oe?M.bl_tree[2*J]+=xe:J!==0?(J!==oe&&M.bl_tree[2*J]++,M.bl_tree[2*w]++):xe<=10?M.bl_tree[2*E]++:M.bl_tree[2*C]++,oe=J,Oe=(xe=0)===pe?(ve=138,3):J===pe?(ve=6,3):(ve=7,4))}function G(M,Y,ee){var te,J,oe=-1,pe=Y[1],xe=0,ve=7,Oe=4;for(pe===0&&(ve=138,Oe=3),te=0;te<=ee;te++)if(J=pe,pe=Y[2*(te+1)+1],!(++xe<ve&&J===pe)){if(xe<Oe)for(;H(M,J,M.bl_tree),--xe!=0;);else J!==0?(J!==oe&&(H(M,J,M.bl_tree),xe--),H(M,w,M.bl_tree),R(M,xe-3,2)):xe<=10?(H(M,E,M.bl_tree),R(M,xe-3,3)):(H(M,C,M.bl_tree),R(M,xe-11,7));oe=J,Oe=(xe=0)===pe?(ve=138,3):J===pe?(ve=6,3):(ve=7,4)}}c(F);var Z=!1;function V(M,Y,ee,te){R(M,(u<<1)+(te?1:0),3),function(J,oe,pe,xe){ne(J),K(J,pe),K(J,~pe),a.arraySet(J.pending_buf,J.window,oe,pe,J.pending),J.pending+=pe}(M,Y,ee)}i._tr_init=function(M){Z||(function(){var Y,ee,te,J,oe,pe=new Array(v+1);for(J=te=0;J<d-1;J++)for($[J]=te,Y=0;Y<1<<j[J];Y++)k[te++]=J;for(k[te-1]=J,J=oe=0;J<16;J++)for(F[J]=oe,Y=0;Y<1<<S[J];Y++)T[oe++]=J;for(oe>>=7;J<h;J++)for(F[J]=oe<<7,Y=0;Y<1<<S[J]-7;Y++)T[256+oe++]=J;for(ee=0;ee<=v;ee++)pe[ee]=0;for(Y=0;Y<=143;)I[2*Y+1]=8,Y++,pe[8]++;for(;Y<=255;)I[2*Y+1]=9,Y++,pe[9]++;for(;Y<=279;)I[2*Y+1]=7,Y++,pe[7]++;for(;Y<=287;)I[2*Y+1]=8,Y++,pe[8]++;for(ie(I,f+1,pe),Y=0;Y<h;Y++)B[2*Y+1]=5,B[2*Y]=X(Y,5);W=new U(I,j,x+1,f,v),z=new U(B,S,0,h,v),L=new U(new Array(0),_,0,m,b)}(),Z=!0),M.l_desc=new D(M.dyn_ltree,W),M.d_desc=new D(M.dyn_dtree,z),M.bl_desc=new D(M.bl_tree,L),M.bi_buf=0,M.bi_valid=0,se(M)},i._tr_stored_block=V,i._tr_flush_block=function(M,Y,ee,te){var J,oe,pe=0;0<M.level?(M.strm.data_type===2&&(M.strm.data_type=function(xe){var ve,Oe=4093624447;for(ve=0;ve<=31;ve++,Oe>>>=1)if(1&Oe&&xe.dyn_ltree[2*ve]!==0)return o;if(xe.dyn_ltree[18]!==0||xe.dyn_ltree[20]!==0||xe.dyn_ltree[26]!==0)return l;for(ve=32;ve<x;ve++)if(xe.dyn_ltree[2*ve]!==0)return l;return o}(M)),he(M,M.l_desc),he(M,M.d_desc),pe=function(xe){var ve;for(P(xe,xe.dyn_ltree,xe.l_desc.max_code),P(xe,xe.dyn_dtree,xe.d_desc.max_code),he(xe,xe.bl_desc),ve=m-1;3<=ve&&xe.bl_tree[2*O[ve]+1]===0;ve--);return xe.opt_len+=3*(ve+1)+5+5+4,ve}(M),J=M.opt_len+3+7>>>3,(oe=M.static_len+3+7>>>3)<=J&&(J=oe)):J=oe=ee+5,ee+4<=J&&Y!==-1?V(M,Y,ee,te):M.strategy===4||oe===J?(R(M,2+(te?1:0),3),Q(M,I,B)):(R(M,4+(te?1:0),3),function(xe,ve,Oe,De){var Et;for(R(xe,ve-257,5),R(xe,Oe-1,5),R(xe,De-4,4),Et=0;Et<De;Et++)R(xe,xe.bl_tree[2*O[Et]+1],3);G(xe,xe.dyn_ltree,ve-1),G(xe,xe.dyn_dtree,Oe-1)}(M,M.l_desc.max_code+1,M.d_desc.max_code+1,pe+1),Q(M,M.dyn_ltree,M.dyn_dtree)),se(M),te&&ne(M)},i._tr_tally=function(M,Y,ee){return M.pending_buf[M.d_buf+2*M.last_lit]=Y>>>8&255,M.pending_buf[M.d_buf+2*M.last_lit+1]=255&Y,M.pending_buf[M.l_buf+M.last_lit]=255&ee,M.last_lit++,Y===0?M.dyn_ltree[2*ee]++:(M.matches++,Y--,M.dyn_ltree[2*(k[ee]+x+1)]++,M.dyn_dtree[2*N(Y)]++),M.last_lit===M.lit_bufsize-1},i._tr_align=function(M){R(M,2,3),H(M,g,I),function(Y){Y.bi_valid===16?(K(Y,Y.bi_buf),Y.bi_buf=0,Y.bi_valid=0):8<=Y.bi_valid&&(Y.pending_buf[Y.pending++]=255&Y.bi_buf,Y.bi_buf>>=8,Y.bi_valid-=8)}(M)}},{"../utils/common":41}],53:[function(r,n,i){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,n,i){(function(a){(function(o,l){if(!o.setImmediate){var c,u,d,x,f=1,h={},m=!1,p=o.document,v=Object.getPrototypeOf&&Object.getPrototypeOf(o);v=v&&v.setTimeout?v:o,c={}.toString.call(o.process)==="[object process]"?function(w){process.nextTick(function(){b(w)})}:function(){if(o.postMessage&&!o.importScripts){var w=!0,E=o.onmessage;return o.onmessage=function(){w=!1},o.postMessage("","*"),o.onmessage=E,w}}()?(x="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",g,!1):o.attachEvent("onmessage",g),function(w){o.postMessage(x+w,"*")}):o.MessageChannel?((d=new MessageChannel).port1.onmessage=function(w){b(w.data)},function(w){d.port2.postMessage(w)}):p&&"onreadystatechange"in p.createElement("script")?(u=p.documentElement,function(w){var E=p.createElement("script");E.onreadystatechange=function(){b(w),E.onreadystatechange=null,u.removeChild(E),E=null},u.appendChild(E)}):function(w){setTimeout(b,0,w)},v.setImmediate=function(w){typeof w!="function"&&(w=new Function(""+w));for(var E=new Array(arguments.length-1),C=0;C<E.length;C++)E[C]=arguments[C+1];var j={callback:w,args:E};return h[f]=j,c(f),f++},v.clearImmediate=y}function y(w){delete h[w]}function b(w){if(m)setTimeout(b,0,w);else{var E=h[w];if(E){m=!0;try{(function(C){var j=C.callback,S=C.args;switch(S.length){case 0:j();break;case 1:j(S[0]);break;case 2:j(S[0],S[1]);break;case 3:j(S[0],S[1],S[2]);break;default:j.apply(l,S)}})(E)}finally{y(w),m=!1}}}}
975function g(w){w.source===o&&typeof w.data=="string"&&w.data.indexOf(x)===0&&b(+w.data.slice(x.length))}})(typeof self>"u"?a===void 0?this:a:self)}).call(this,typeof Li<"u"?Li:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(OD);var v2e=OD.exports;const y2e=qe(v2e);function TD(e){const t=atob(e.replace(/\s/g,"")),r=new Uint8Array(new ArrayBuffer(t.length));for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function B0(e,t){const r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=e,n.rel="noopener",n.style.display="none",document.body.appendChild(n),n.click(),setTimeout(()=>{n.remove(),URL.revokeObjectURL(r)},4e3)}function qw(e,t){B0(e,new Blob([TD(t)],{type:"application/pdf"}))}async function b2e(e,t){const r=e.filter(o=>o==null?void 0:o.content);if(r.length===0)return{zipped:!1,count:0};if(r.length===1)return qw(r[0].filename,r[0].content),{zipped:!1,count:1};const n=new y2e,i=new Set;for(const o of r){let l=o.filename||"Datei.pdf",c=2;for(;i.has(l);)l=l.replace(/(\.pdf)?$/i,"")+`-${c++}.pdf`;i.add(l),n.file(l,TD(o.content))}const a=await n.generateAsync({type:"blob"});return B0(t,a),{zipped:!0,count:r.length}}const Bs=e=>`⬠${(e/100).toLocaleString("de-DE",{minimumFractionDigits:2,maximumFractionDigits:2})}`,s1={processed:{label:"Erstattet",cls:"bg-green-500/15 text-green-400 border-green-500/30",dotCls:"bg-green-400",icon:ut},pending:{label:"Ausstehend",cls:"bg-orange-500/15 text-orange-400 border-orange-500/30",dotCls:"bg-orange-400",icon:gr},rejected:{label:"Abgelehnt",cls:"bg-destructive/15 text-destructive border-destructive/30",dotCls:"bg-destructive",icon:Kt}},uj=["SPIRIT FESTIVAL WOCHENENDTICKET 2027","Caravan / Wohnmobile Ticket","Dusch- und Kackmaut 24 h geöffnet"],dj=["Spirit Festival 2027"];function E2e({status:e}){const t=s1[e],r=t.icon;return s.jsxs("span",{className:`inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full font-bold border ${t.cls}`,children:[s.jsx(r,{size:9,"aria-hidden":"true"}),t.label]})}function w2e({initial:e,onSave:t,onCancel:r,saving:n}){const[i,a]=A.useState((e==null?void 0:e.refund_date)??new Date().toISOString().slice(0,10)),[o,l]=A.useState((e==null?void 0:e.category)??uj[0]),[c,u]=A.useState((e==null?void 0:e.event_name)??dj[0]),[d,x]=A.useState(e?(e.amount_cents/100).toFixed(2):""),[f,h]=A.useState((e==null?void 0:e.reason)??""),[m,p]=A.useState((e==null?void 0:e.status)??"pending"),[v,y]=A.useState({});function b(){const E={};i||(E.date="Datum erforderlich"),o||(E.category="Kategorie erforderlich"),c||(E.eventName="Veranstaltung erforderlich");const C=parseFloat(d.replace(",","."));return(isNaN(C)||C<=0)&&(E.amount="Gültiger Betrag erforderlich"),y(E),Object.keys(E).length===0}async function g(E){if(E.preventDefault(),!b())return;const C=parseFloat(d.replace(",","."));await t({refund_date:i,category:o,event_name:c,amount_cents:Math.round(C*100),reason:f.trim()||null,status:m})}const w=E=>`w-full rounded-lg border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50 transition-all ${v[E]?"border-destructive":"border-border"}`;return s.jsxs("form",{onSubmit:g,className:"space-y-4",noValidate:!0,children:[s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-semibold text-foreground mb-1.5",children:"Datum *"}),s.jsx("input",{type:"date",value:i,onChange:E=>a(E.target.value),className:w("date")}),v.date&&s.jsx("p",{className:"text-[10px] text-destructive mt-1",children:v.date})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-semibold text-foreground mb-1.5",children:"Betrag (â¬) *"}),s.jsxs("div",{className:"relative",children:[s.jsx(ji,{size:13,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{type:"text",inputMode:"decimal",value:d,onChange:E=>x(E.target.value),placeholder:"0,00",className:`${w("amount")} pl-7`})]}),v.amount&&s.jsx("p",{className:"text-[10px] text-destructive mt-1",children:v.amount})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-semibold text-foreground mb-1.5",children:"Ticket-Kategorie *"}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{value:o,onChange:E=>l(E.target.value),className:w("category"),children:uj.map(E=>s.jsx("option",{value:E,children:E},E))}),s.jsx(mr,{size:13,className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-semibold text-foreground mb-1.5",children:"Veranstaltung *"}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{value:c,onChange:E=>u(E.target.value),className:w("eventName"),children:dj.map(E=>s.jsx("option",{value:E,children:E},E))}),s.jsx(mr,{size:13,className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-semibold text-foreground mb-1.5",children:"Status"}),s.jsxs("div",{className:"relative",children:[s.jsxs("select",{value:m,onChange:E=>p(E.target.value),className:w("status"),children:[s.jsx("option",{value:"pending",children:"Ausstehend"}),s.jsx("option",{value:"processed",children:"Erstattet"}),s.jsx("option",{value:"rejected",children:"Abgelehnt"})]}),s.jsx(mr,{size:13,className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"})]})]}),s.jsxs("div",{className:"sm:col-span-2",children:[s.jsx("label",{className:"block text-xs font-semibold text-foreground mb-1.5",children:"Begründung"}),s.jsx("textarea",{value:f,onChange:E=>h(E.target.value),rows:2,placeholder:"Optionale Begründung der Erstattung â¦",className:`${w("reason")} resize-none`})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[s.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 rounded-lg text-sm text-muted-foreground hover:text-foreground border border-border hover:border-border/80 transition-colors",children:"Abbrechen"}),s.jsxs("button",{type:"submit",disabled:n,className:"px-5 py-2 rounded-lg text-sm font-bold bg-primary text-primary-foreground hover:opacity-90 transition-opacity disabled:opacity-50 flex items-center gap-2",children:[n&&s.jsx(Be,{size:13,className:"animate-spin","aria-hidden":"true"}),e!=null&&e.id?"Speichern":"Erstattung anlegen"]})]})]})}function C2e(){const[e,t]=A.useState([]),[r,n]=A.useState(!0),[i,a]=A.useState(!1),[o,l]=A.useState(""),[c,u]=A.useState("all"),[d,x]=A.useState(!1),[f,h]=A.useState(null),[m,p]=A.useState(null),[v,y]=A.useState(null),[b,g]=A.useState(null),[w,E]=A.useState(null),[C,j]=A.useState(null),S=(D,N="ok")=>{y({msg:D,type:N}),setTimeout(()=>y(null),3500)};async function _(D){if(D.creditNoteId){j(D.id);try{const{data:N,error:K}=await re.functions.invoke("refund-order",{body:{mode:"download",creditNoteId:D.creditNoteId}});if(K)throw K;if(!(N!=null&&N.content))throw new Error((N==null?void 0:N.error)??"PDF konnte nicht erzeugt werden.");qw(N.filename??`Stornorechnung-${D.creditNoteNumber??"storno"}.pdf`,N.content),S("Stornorechnung heruntergeladen")}catch(N){S(N.message??"Download fehlgeschlagen","err")}j(null)}}async function O(D){if(D.creditNoteId){j(D.id);try{const{data:N,error:K}=await re.functions.invoke("refund-order",{body:{mode:"email",creditNoteId:D.creditNoteId}});if(K)throw K;if(N!=null&&N.error)throw new Error(N.error);S(`Stornorechnung an ${(N==null?void 0:N.email)??D.buyerEmail} gesendet`)}catch(N){S(N.message??"Versand fehlgeschlagen","err")}j(null)}}const I=A.useCallback(async()=>{n(!0);const[D,N]=await Promise.all([re.from("refunds").select("*").order("refund_date",{ascending:!1}),re.from("credit_notes").select("id, credit_note_number, order_number, buyer_name, buyer_email, reason, net_amount_cents, tax_amount_cents, gross_amount_cents, refund_status, issued_at, created_at").order("issued_at",{ascending:!1})]),K=(D.data??[]).map(H=>({...H,source:"manual"})),R=(N.data??[]).map(H=>({id:`cn:${H.id}`,refund_date:(H.issued_at??H.created_at??"").slice(0,10),category:H.credit_note_number,event_name:`${H.order_number} · ${H.buyer_name} (${H.buyer_email})`,amount_cents:H.gross_amount_cents??0,reason:H.reason??null,status:H.refund_status==="failed"?"rejected":H.refund_status==="pending"||H.refund_status==="queued"?"pending":"processed",created_at:H.created_at??H.issued_at,source:"system",creditNoteId:H.id,creditNoteNumber:H.credit_note_number,orderNumber:H.order_number,buyerName:H.buyer_name,buyerEmail:H.buyer_email,netCents:H.net_amount_cents??void 0,taxCents:H.tax_amount_cents??void 0,refundStatusRaw:H.refund_status}));t([...R,...K].sort((H,X)=>H.refund_date<X.refund_date?1:-1)),g(new Date),n(!1)},[]);A.useEffect(()=>{I()},[I]);const B=e.filter(D=>{const N=o.toLowerCase(),K=!N||[D.category,D.event_name,D.reason??"",D.status].some(H=>H.toLowerCase().includes(N)),R=c==="all"||D.status===c;return K&&R}),T=e.filter(D=>D.status==="processed").reduce((D,N)=>D+N.amount_cents,0),k=e.filter(D=>D.status==="pending").reduce((D,N)=>D+N.amount_cents,0),$=e.filter(D=>D.status==="pending").length,W=e.filter(D=>D.status==="rejected").length;async function z(D){a(!0);try{if(f){const{error:N}=await re.from("refunds").update(D).eq("id",f.id);if(N)throw N;S("Erstattung aktualisiert")}else{const{error:N}=await re.from("refunds").insert([D]);if(N)throw N;S("Erstattung angelegt")}x(!1),h(null),await I()}catch(N){S(N.message??"Fehler beim Speichern","err")}a(!1)}async function L(D,N){const{error:K}=await re.from("refunds").update({status:N}).eq("id",D.id);K?S("Status konnte nicht geändert werden","err"):(t(R=>R.map(H=>H.id===D.id?{...H,status:N}:H)),S(`Status: ${s1[N].label}`))}async function F(D){const{error:N}=await re.from("refunds").delete().eq("id",D);N?S("Löschen fehlgeschlagen","err"):(t(K=>K.filter(R=>R.id!==D)),S("Erstattung gelöscht")),p(null)}function U(){const D=["Datum","Kategorie","Veranstaltung","Betrag (â¬)","Grund","Status"],N=B.map(R=>[R.refund_date,R.category,R.event_name,(R.amount_cents/100).toFixed(2),R.reason??"",R.status].join(";")),K=new Blob(["\uFEFF"+[D.join(";"),...N].join(` 976`)],{type:"text/csv;charset=utf-8;"});B0(`erstattungen-${new Date().toISOString().slice(0,10)}.csv`,K)}return s.jsxs(dt,{children:[s.jsx(Hr,{}),s.jsxs("main",{id:"main-content",className:"pt-14 min-h-screen",children:[v&&s.jsxs("div",{role:"alert","aria-live":"assertive",className:`fixed top-24 right-4 z-50 flex items-center gap-2 px-4 py-3 rounded-xl shadow-lg text-sm font-medium border transition-all ${v.type==="ok"?"bg-card border-primary/30 text-primary":"bg-card border-destructive/30 text-destructive"}`,children:[v.type==="ok"?s.jsx(ut,{size:15,"aria-hidden":"true"}):s.jsx(Kt,{size:15,"aria-hidden":"true"}),v.msg]}),s.jsx("section",{className:"py-12 bg-card/50 border-b border-border","aria-label":"Erstattungen Ãberschrift",children:s.jsx("div",{className:"container mx-auto px-4 max-w-6xl",children:s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end sm:justify-between gap-4",children:[s.jsxs("div",{children:[s.jsxs(we,{to:"/dashboard",className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-primary transition-colors mb-3",children:[s.jsx(Sn,{size:12,"aria-hidden":"true"})," Dashboard"]}),s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-1",children:"Admin · Rückerstattungen"}),s.jsx("h1",{className:"font-display text-5xl md:text-7xl",children:"ERSTATTUNGEN"})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsxs("button",{onClick:()=>{h(null),x(!0)},className:"flex items-center gap-1.5 px-4 py-2 rounded-xl bg-primary text-primary-foreground text-xs font-bold hover:opacity-90 transition-opacity",children:[s.jsx(Ht,{size:13,"aria-hidden":"true"})," Neue Erstattung"]}),s.jsxs("button",{onClick:U,disabled:B.length===0,className:"flex items-center gap-1.5 px-3 py-2 rounded-xl border border-border text-xs text-muted-foreground hover:text-foreground transition-all disabled:opacity-40","aria-label":"CSV exportieren",children:[s.jsx(zr,{size:12,"aria-hidden":"true"})," CSV"]}),s.jsxs("button",{onClick:I,disabled:r,className:"flex items-center gap-1.5 px-3 py-2 rounded-xl border border-border text-xs text-muted-foreground hover:text-foreground transition-all disabled:opacity-40","aria-label":"Daten aktualisieren",children:[s.jsx(Be,{size:12,className:r?"animate-spin":"","aria-hidden":"true"}),b?b.toLocaleTimeString("de-DE"):"Ladenâ¦"]})]})]})})}),s.jsxs("div",{className:"container mx-auto px-4 max-w-6xl py-10 space-y-8",children:[s.jsx(Ce,{children:s.jsx("dl",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[{label:"Erstattet",value:Bs(T),sub:`${e.filter(D=>D.status==="processed").length} Vorgänge`,cls:"border-green-500/30",highlight:"bg-green-500/5"}
976,{label:"Ausstehend",value:Bs(k),sub:`${$} offen`,cls:$>0?"border-orange-500/30":"border-border",highlight:$>0?"bg-orange-500/5":""},{label:"Gesamt Vorgänge",value:e.length.toLocaleString("de-DE"),sub:"alle Erstattungen",cls:"border-border",highlight:""},{label:"Abgelehnt",value:W.toLocaleString("de-DE"),sub:"nicht erstattet",cls:"border-border",highlight:""}].map(({label:D,value:N,sub:K,cls:R,highlight:H})=>s.jsxs("div",{className:`relative p-5 rounded-2xl border gradient-card overflow-hidden ${R}`,children:[H&&s.jsx("div",{className:`absolute inset-0 pointer-events-none rounded-2xl ${H}`,"aria-hidden":"true"}),s.jsxs("div",{className:"relative z-10 flex flex-col gap-1.5",children:[s.jsx("dd",{className:"font-display text-2xl leading-none text-foreground",children:r?"â":N}),s.jsx("dt",{className:"text-xs font-semibold text-foreground",children:D}),s.jsx("p",{className:"text-[10px] text-muted-foreground",children:K})]})]},D))})}),!r&&$>0&&s.jsx(Ce,{children:s.jsxs("div",{role:"alert",className:"flex items-center gap-3 p-4 rounded-xl border border-orange-500/30 bg-
976orange-500/8 text-orange-400 text-sm",children:[s.jsx(bn,{size:16,className:"shrink-0","aria-hidden":"true"}),s.jsxs("span",{children:[s.jsx("strong",{children:$})," Erstattung",$!==1?"en":""," warte",$!==1?"n":"t"," auf Bearbeitung â ",Bs(k)," ausstehend."]})]})}),(d||f)&&s.jsx(Ce,{children:s.jsxs("div",{className:"rounded-2xl border border-primary/30 bg-card p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-5",children:[s.jsx("h2",{className:"font-bold text-sm text-foreground",children:f?"Erstattung bearbeiten":"Neue Erstattung anlegen"}),s.jsx("button",{onClick:()=>{x(!1),h(null)},className:"text-muted-foreground hover:text-foreground transition-colors","aria-label":"Formular schlieÃen",children:s.jsx(_t,{size:16,"aria-hidden":"true"})})]}),s.jsx(w2e,{initial:f??void 0,onSave:z,onCancel:()=>{x(!1),h(null)},saving:i})]})}),s.jsx(Ce,{children:s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(Ur,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{type:"search",value:o,onChange:D=>l(D.target.value),placeholder:"Suche nach Kategorie, Grund, Status â¦",className:"w-full pl-9 pr-8 py-2.5 rounded-xl border border-border bg-card text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50 transition-all"}),o&&s.jsx("button",{onClick:()=>l(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Suche löschen",children:s.jsx(_t,{size:13,"aria-hidden":"true"})})]}),s.jsx("div",{className:"flex gap-1",role:"group","aria-label":"Status-Filter",children:["all","pending","processed","rejected"].map(D=>s.jsx("button",{onClick:()=>u(D),"aria-pressed":c===D,className:`px-3 py-2.5 rounded-xl text-xs font-semibold transition-all ${c===D?"bg-primary text-primary-foreground":"bg-card border border-border text-muted-foreground hover:text-foreground"}`,children:D==="all"?"Alle":s1[D].label},D))})]})}),s.jsx(Ce,{children:s.jsxs("div",{className:"rounded-2xl border border-border bg-card overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border",children:[s.jsxs("p",{className:"text-xs text-muted-foreground",children:[s.jsx("span",{className:"font-semibold text-foreground",children:B.length})," Erstattung",B.length!==1?"en":"",o||c!=="all"?" (gefiltert)":""]}),s.jsx(CT,{size:13,className:"text-muted-foreground","aria-hidden":"true"})]}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm","aria-label":"Erstattungs-Verwaltung",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border text-xs text-muted-foreground",children:[s.jsx("th",{className:"text-left px-5 py-3 font-medium",children:"Datum"}),s.jsx("th",{className:"text-left px-4 py-3 font-medium",children:"Kategorie"}),s.jsx("th",{className:"text-right px-4 py-3 font-medium",children:"Betrag"}),s.jsx("th",{className:"text-left px-4 py-3 font-medium hidden md:table-cell",children:"Grund"}),s.jsx("th",{className:"text-center px-4 py-3 font-medium",children:"Status"}),s.jsx("th",{className:"text-right px-5 py-3 font-medium",children:"Aktionen"})]})}),s.jsx("tbody",{children:r?Array.from({length:5}).map((D,N)=>s.jsx("tr",{className:"border-b border-border/50",children:Array.from({length:6}).map((K,R)=>s.jsx("td",{className:"px-4 py-3.5",children:s.jsx("div",{className:"h-3 rounded bg-muted animate-pulse",style:{width:`${50+Math.random()*40}%`}})},R))},N)):B.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:6,className:"text-center py-12 text-muted-foreground text-xs",children:o||c!=="all"?"Keine Treffer â Filter anpassen.":"Keine Erstattungen vorhanden."})}):B.map(D=>{const N=w===D.id;return s.jsxs(A.Fragment,{children:[s.jsxs("tr",{className:"border-b border-border/40 last:border-0 hover:bg-muted/20 transition-colors group",children:[s.jsx("td",{className:"px-5 py-3.5 text-xs text-muted-foreground whitespace-nowrap",children:new Date(D.refund_date).toLocaleDateString("de-DE")}),s.jsxs("td",{className:"px-4 py-3.5",children:[s.jsx("span",{className:"text-xs font-medium text-foreground",children:D.category}),s.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 max-w-[220px] truncate",children:D.event_name})]}),s.jsxs("td",{className:"px-4 py-3.5 text-right font-bold text-destructive text-xs whitespace-nowrap",children:["-",Bs(D.amount_cents)]}),s.jsx("td",{className:"px-4 py-3.5 text-xs text-muted-foreground hidden md:table-cell max-w-[260px]",children:D.reason?s.jsxs("button",{type:"button",onClick:()=>E(N?null:D.id),className:"flex items-center gap-1.5 text-left text-xs text-muted-foreground hover:text-foreground transition-colors max-w-full","aria-expanded":N,"aria-label":N?"Grund einklappen":"Vollständigen Erstattungsgrund anzeigen",children:[s.jsx("span",{className:N?"whitespace-normal":"line-clamp-2",children:D.reason}),s.jsx(mr,{size:13,className:`shrink-0 transition-transform ${N?"rotate-180":""}`,"aria-hidden":"true"})]}):"â"}),s.jsx("td",{className:"px-4 py-3.5 text-center",children:s.jsx(E2e,{status:D.status})}),s.jsx("td",{className:"px-5 py-3.5",children:D.source==="system"?s.jsxs("div",{className:"flex items-center justify-end gap-1",children:[s.jsx("button",{type:"button",onClick:()=>_(D),disabled:C===D.id,title:"Stornorechnung herunterladen","aria-label":"Stornorechnung herunterladen",className:"p-1.5 rounded-lg text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors disabled:opacity-40",children:C===D.id?s.jsx(Be,{size:13,className:"animate-spin","aria-hidden":"true"}):s.jsx(zr,{size:13,"aria-hidden":"true"})}),s.jsx("button",{type:"button",onClick:()=>O(D),disabled:C===D.id,title:"Stornorechnung erneut versenden","aria-label":"Stornorechnung erneut versenden",className:"p-1.5 rounded-lg text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors disabled:opacity-40",children:s.jsx(aa,{size:13,"aria-hidden":"true"})})]}):s.jsxs("div",{className:"flex items-center justify-end gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[D.status==="pending"&&s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",onClick:()=>L(D,"processed"),title:"Als erstattet markieren","aria-label":"Als erstattet markieren",className:"p-1.5 rounded-lg text-green-400 hover:bg-green-500/15 transition-colors",children:s.jsx(ut,{size:14,"aria-hidden":"true"})}),s.jsx("button",{type:"button",onClick:()=>L(D,"rejected"),title:"Ablehnen","aria-label":"Ablehnen",className:"p-1.5 rounded-lg text-destructive hover:bg-destructive/15 transition-colors",children:s.jsx(Kt,{size:14,"aria-hidden":"true"})})]}),D.status!=="pending"&&s.jsx("button",{type:"button",onClick:()=>L(D,"pending"),title:"Zurück auf ausstehend","aria-label":"Zurück auf ausstehend setzen",className:"p-1.5 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:s.jsx(aa,{size:13,"aria-hidden":"true"})}),s.jsx("button",{type:"button",onClick:()=>{h(D),x(!1)},title:"Bearbeiten","aria-label":"Erstattung bearbeiten",className:"p-1.5 rounded-lg text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors",children:s.jsx(ss,{size:13,"aria-hidden":"true"})}),m===D.id?s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"text-[10px] text-destructive font-bold",children:"Sicher?"}),s.jsx("button",{type:"button",onClick:()=>F(D.id),className:"px-2 py-0.5 text-[10px] rounded bg-destructive text-destructive-foreground font-bold",children:"Ja"}),s.jsx("button",{type:"button",onClick:()=>p(null),className:"px-2 py-0.5 text-[10px] rounded border border-border text-muted-foreground",children:"Nein"})]}):s.jsx("button",{type:"button",onClick:()=>p(D.id),title:"Löschen","aria-label":"Erstattung löschen",className:"p-1.5 rounded-lg text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-colors",children:s.jsx(Vt,{size:13,"aria-hidden":"true"})})]})})]},D.id),N&&s.jsx("tr",{className:"border-b border-border/40 bg-muted/10",children:s.jsx("td",{colSpan:6,className:"px-5 py-4",children:s.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4 text-xs",children:[s.jsxs("div",{className:"lg:col-span-2",children:[s.jsx("span",{className:"block text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:"Vollständiger Grund"}),s.jsx("p",{className:"text-foreground whitespace-pre-wrap",children:D.reason??"Kein Grund hinterlegt."})]}),D.source==="system"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx("span",{className:"block text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:"Käufer"}),s.jsx("p",{className:"text-foreground",children:D.buyerName}),s.jsx("p",{className:"text-muted-foreground break-all",children:D.buyerEmail})]}),s.jsxs("div",{children:[s.jsx("span",{className:"block text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:"Aufschlüsselung"}),s.jsxs("p",{className:"text-foreground",children:["Netto: ",Bs(D.netCents??0)]}),s.jsxs("p",{className:"text-muted-foreground",children:["USt: ",Bs(D.taxCents??0)," · ",D.refundStatusRaw]})]})]})]})})},`${D.id}-details`)]},D.id)})}),!r&&B.length>0&&s.jsx("tfoot",{children:s.jsxs("tr",{className:"border-t border-border bg-muted/20",children:[s.jsx("td",{colSpan:2,className:"px-5 py-2.5 text-xs font-bold text-foreground",children:"Erstattet gesamt"}),s.jsxs("td",{className:"px-4 py-2.5 text-right text-xs font-bold text-destructive",children:["-",Bs(B.filter(D=>D.status==="processed").reduce((D,N)=>D+N.amount_cents,0))]}),s.jsx("td",{colSpan:3})]})})]})})]})})]})]})]})}const dl={pending:{label:"Ausstehend",cls:"bg-orange-500/15 text-orange-400 border-orange-500/30",icon:gr},approved:{label:"Genehmigt",cls:"bg-primary/15 text-primary border-primary/30",icon:ut},rejected:{label:"Abgelehnt",cls:"bg-destructive/15 text-destructive border-destructive/30",icon:Kt},draft:{label:"Entwurf",cls:"bg-muted text-muted-foreground border-border",icon:h0}},A2e={submitted:"Eingereicht",approved:"Genehmigt",rejected:"Abgelehnt",updated:"Bearbeitet",reverted:"Status zurückgesetzt",deleted:"Gelöscht"};function j2e({status:e}){const t=dl[e]??dl.draft,r=t.icon;return s.jsxs("span",{className:`inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full font-bold border ${t.cls}`,children:[s.jsx(r,{size:9,"aria-hidden":"true"}),t.label]})}function k2e(){const[e,t]=A.useState([]),[r,n]=A.useState({}),[i,a]=A.useState(!0),[o,l]=A.useState(null),[c,u]=A.useState(null),[d,x]=A.useState(null),[f,h]=A.useState(null),[m,p]=A.useState(null),[v,y]=A.useState(""),[b,g]=A.useState(""),[w,E]=A.useState("all"),[C,j]=A.useState(null),[S,_]=A.useState(null),[O,I]=A.useState(null);A.useEffect(()=>{re.auth.getUser().then(({data:N})=>{var K;return I(((K=N.user)==null?void 0:K.id)??null)})},[]);const B=(N,K="ok")=>{j({msg:N,type:K}),setTimeout(()=>j(null),3500)},T=A.useCallback(async()=>{a(!0);const{data:N,error:K}=await re.from("events").select("*").order("created_at",{ascending:!1});K||(t(N??[]),_(new Date)),a(!1)},[]);A.useEffect(()=>{T()},[T]);async function k(N){if(r[N])return;const{data:K}=await re.from("event_audit_trail").select("*").eq("event_id",N).order("created_at",{ascending:!1});n(R=>({...R,[N]:K??[]}))}const $=e.filter(N=>{const K=b.toLowerCase(),R=!K||[N.title,N.organizer_name,N.organizer_email,N.location,N.genre??""].some(X=>X.toLowerCase().includes(K)),H=w==="all"||N.status===w;return R&&H}
976),W={pending:e.filter(N=>N.status==="pending").length,approved:e.filter(N=>N.status==="approved").length,rejected:e.filter(N=>N.status==="rejected").length,draft:e.filter(N=>N.status==="draft").length};async function z(N,K,R,H,X){await re.from("event_audit_trail").insert([{event_id:N,action:K,previous_status:R,new_status:H,changed_by:O,notes:X??null}]),n(ie=>{const se={...ie};return delete se[N],se})}async function L(N){l(N.id);const{error:K}=await re.from("events").update({status:"approved",rejection_reason:null}).eq("id",N.id);K?B("Fehler beim Genehmigen","err"):(await z(N.id,"approved",N.status,"approved","Event genehmigt"),t(R=>R.map(H=>H.id===N.id?{...H,status:"approved",rejection_reason:null}:H)),B("Event genehmigt â")),l(null)}async function F(N){l(N.id);const K=v.trim()||null,{error:R}=await re.from("events").update({status:"rejected",rejection_reason:K}).eq("id",N.id);R?B("Fehler beim Ablehnen","err"):(await z(N.id,"rejected",N.status,"rejected",K??"Kein Grund angegeben"),t(H=>H.map(X=>X.id===N.id?{...X,status:"rejected",rejection_reason:K}:X)),B("Event abgelehnt"),p(null),y("")),l(null)}async function U(N){l(N.id);const{error:K}=await re.from("events").update({status:"pending",rejection_reason:null}).eq("id",N.id);K?B("Fehler beim Zurücksetzen","err"):(await z(N.id,"reverted",N.status,"pending","Status zurückgesetzt auf Ausstehend"),t(R=>R.map(H=>H.id===N.id?{...H,status:"pending",rejection_reason:null}:H)),B("Status zurückgesetzt")),l(null)}async function D(N){const{error:K}=await re.from("events").delete().eq("id",N);K?B("Löschen fehlgeschlagen","err"):(t(R=>R.filter(H=>H.id!==N)),B("Event gelöscht")),h(null)}return s.jsxs(dt,{children:[s.jsx(Hr,{}),s.jsxs("main",{id:"main-content",className:"pt-14 min-h-screen",children:[C&&s.jsxs("div",{role:"alert","aria-live":"assertive",className:`fixed top-24 right-4 z-50 flex items-center gap-2 px-4 py-3 rounded-xl shadow-lg text-sm font-medium border transition-all ${C.type==="ok"?"bg-card border-primary/30 text-primary":"bg-card border-destructive/30 text-destructive"}`,children:[C.type==="ok"?s.jsx(ut,{size:15,"aria-hidden":"true"}):s.jsx(Kt,{size:15,"aria-hidden":"true"}),C.msg]}),s.jsx("section",{className:"py-12 bg-card/50 border-b border-border",children:s.jsx("div",{className:"container mx-auto px-4 max-w-6xl",children:s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end sm:justify-between gap-4",children:[s.jsxs("div",{children:[s.jsxs(we,{to:"/dashboard",className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-primary transition-colors mb-3",children:[s.jsx(Sn,{size:12,"aria-hidden":"true"})," Dashboard"]}),s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-1",children:"Admin · Genehmigungsworkflow"}),s.jsx("h1",{className:"font-display text-5xl md:text-7xl",children:"EVENTS"})]}),s.jsxs("button",{onClick:T,disabled:i,className:"flex items-center gap-1.5 px-3 py-2 rounded-xl border border-border text-xs text-muted-foreground hover:text-foreground transition-all disabled:opacity-40 self-start sm:self-end",children:[s.jsx(Be,{size:12,className:i?"animate-spin":"","aria-hidden":"true"}),S?S.toLocaleTimeString("de-DE"):"Ladenâ¦"]})]})})}),s.jsxs("div",{className:"container mx-auto px-4 max-w-6xl py-10 space-y-8",children:[s.jsx(Ce,{children:s.jsx("dl",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:["pending","approved","rejected","draft"].map(N=>{const K=dl[N],R=K.icon;return s.jsx("button",{onClick:()=>E(w===N?"all":N),"aria-pressed":w===N,className:`relative p-4 rounded-2xl border gradient-card text-left transition-all hover:border-primary/30 ${w===N?"border-primary/40 ring-1 ring-primary/20":"border-border"}`,children:s.jsxs("div",{className:"relative flex flex-col gap-1.5",children:[s.jsx(R,{size:16,className:"text-primary","aria-hidden":"true"}),s.jsx("dd",{className:"font-display text-2xl text-foreground",children:W[N]}),s.jsx("dt",{className:"text-[10px] text-muted-foreground font-medium",children:K.label})]})},N)})})}),!i&&W.pending>0&&s.jsx(Ce,{children:s.jsxs("div",{role:"alert",className:"flex items-center gap-3 p-4 rounded-xl border border-orange-500/30 bg-
976orange-500/8 text-orange-400 text-sm",children:[s.jsx(bn,{size:16,className:"shrink-0","aria-hidden":"true"}),s.jsxs("span",{children:[s.jsx("strong",{children:W.pending})," Event",W.pending!==1?"s":""," warte",W.pending!==1?"n":"t"," auf Genehmigung."]})]})}),s.jsx(Ce,{children:s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(Ur,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{type:"search",value:b,onChange:N=>g(N.target.value),placeholder:"Suche nach Titel, Veranstalter, Ort â¦",className:"w-full pl-9 pr-8 py-2.5 rounded-xl border border-border bg-card text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50 transition-all"}),b&&s.jsx("button",{onClick:()=>g(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Suche löschen",children:s.jsx(_t,{size:13,"aria-hidden":"true"})})]}),s.jsx("div",{className:"flex gap-1",role:"group","aria-label":"Status-Filter",children:["all","pending","approved","rejected","draft"].map(N=>s.jsx("button",{onClick:()=>E(N),"aria-pressed":w===N,className:`px-3 py-2.5 rounded-xl text-xs font-semibold transition-all ${w===N?"bg-primary text-primary-foreground":"bg-card border border-border text-muted-foreground hover:text-foreground"}`,children:N==="all"?"Alle":dl[N].label},N))})]})}),s.jsx(Ce,{children:s.jsx("div",{className:"space-y-3",children:i?Array.from({length:4}).map((N,K)=>s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-5",children:[s.jsx("div",{className:"h-4 w-1/3 rounded bg-muted animate-pulse mb-2"}),s.jsx("div",{className:"h-3 w-1/2 rounded bg-muted animate-pulse"})]},K)):$.length===0?s.jsx("div",{className:"text-center py-16 text-muted-foreground text-sm",children:b||w!=="all"?"Keine Treffer â Filter anpassen.":"Keine Events vorhanden."}):$.map(N=>s.jsxs("div",{className:"rounded-2xl border border-border bg-card overflow-hidden",children:[s.jsxs("div",{className:"flex items-start gap-4 p-5",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-1",children:[s.jsx("h3",{className:"font-bold text-foreground text-sm",children:N.title}),s.jsx(j2e,{status:N.status}),N.genre&&s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-primary/10 text-primary font-semibold",children:N.genre})]}),s.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-muted-foreground mt-1.5",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Lr,{size:10,"aria-hidden":"true"}),new Date(N.date_start).toLocaleDateString("de-DE"),N.date_end&&` â ${new Date(N.date_end).toLocaleDateString("de-DE")}`,N.time_start&&` · ${N.time_start}`]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(_r,{size:10,"aria-hidden":"true"}),N.location]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(id,{size:10,"aria-hidden":"true"}),N.organizer_name]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx($t,{size:10,"aria-hidden":"true"}),N.organizer_email]}),N.expected_attendance&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Je,{size:10,"aria-hidden":"true"}),N.expected_attendance.toLocaleString("de-DE")," Besucher"]})]}),N.rejection_reason&&s.jsxs("p",{className:"mt-2 text-[11px] text-destructive italic",children:["Ablehnungsgrund: ",N.rejection_reason]})]}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0 flex-wrap justify-end",children:[N.status==="pending"&&s.jsxs(s.Fragment,{children:[s.jsxs("button",{onClick:()=>L(N),disabled:o===N.id,"aria-label":"Genehmigen",title:"Genehmigen",className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-primary/15 text-primary text-xs font-bold hover:bg-primary/25 transition-colors disabled:opacity-50",children:[o===N.id?s.jsx(Be,{size:11,className:"animate-spin","aria-hidden":"true"}):s.jsx(ut,{size:11,"aria-hidden":"true"}),"Genehmigen"]}),s.jsxs("button",{onClick:()=>{p(N.id),y("")},disabled:o===N.id,"aria-label":"Ablehnen",title:"Ablehnen",className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-destructive/15 text-destructive text-xs font-bold hover:bg-destructive/25 transition-colors disabled:opacity-50",children:[s.jsx(Kt,{size:11,"aria-hidden":"true"})," Ablehnen"]}
976)]}),N.status!=="pending"&&s.jsx("button",{onClick:()=>U(N),disabled:o===N.id,"aria-label":"Zurücksetzen",title:"Zurück auf Ausstehend",className:"p-2 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors disabled:opacity-50",children:s.jsx(aa,{size:13,"aria-hidden":"true"})}),s.jsx("button",{onClick:()=>u(c===N.id?null:N.id),"aria-expanded":c===N.id,"aria-label":"Details anzeigen",className:"p-2 rounded-lg text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors",children:s.jsx(ki,{size:13,"aria-hidden":"true"})}),s.jsx("button",{onClick:()=>{d===N.id?x(null):(x(N.id),k(N.id))},"aria-expanded":d===N.id,"aria-label":"Audit-Trail",title:"Audit-Trail anzeigen",className:"p-2 rounded-lg text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors",children:s.jsx(x9,{size:13,"aria-hidden":"true"})}),f===N.id?s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"text-[10px] text-destructive font-bold",children:"Sicher?"}),s.jsx("button",{onClick:()=>D(N.id),className:"px-2 py-0.5 text-[10px] rounded bg-destructive text-destructive-foreground font-bold hover:opacity-80",children:"Ja"}),s.jsx("button",{onClick:()=>h(null),className:"px-2 py-0.5 text-[10px] rounded border border-border text-muted-foreground font-bold hover:text-foreground",children:"Nein"})]}):s.jsx("button",{onClick:()=>h(N.id),"aria-label":"Event löschen",className:"p-2 rounded-lg text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-colors",children:s.jsx(Vt,{size:13,"aria-hidden":"true"})})]})]}),m===N.id&&s.jsxs("div",{className:"border-t border-border px-5 py-4 bg-destructive/5",children:[s.jsx("p",{className:"text-xs font-semibold text-foreground mb-2",children:"Ablehnungsgrund (optional)"}),s.jsx("textarea",{value:v,onChange:K=>y(K.target.value),rows:2,placeholder:"Begründung für den Veranstalter â¦",className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-destructive/40 resize-none mb-3"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("button",{onClick:()=>F(N),disabled:o===N.id,className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-destructive text-destructive-foreground text-xs font-bold hover:opacity-90 disabled:opacity-50",children:[o===N.id&&s.jsx(Be,{size:11,className:"animate-spin","aria-hidden":"true"}),"Ablehnen bestätigen"]}),s.jsx("button",{onClick:()=>p(null),className:"px-4 py-2 rounded-lg border border-border text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Abbrechen"})]})]}),c===N.id&&s.jsx("div",{className:"border-t border-border px-5 py-4 bg-muted/20 text-xs text-muted-foreground",children:s.jsxs("div",{className:"grid sm:grid-cols-2 gap-x-8 gap-y-2",children:[N.description&&s.jsxs("div",{className:"sm:col-span-2",children:[s.jsx("span",{className:"font-semibold text-foreground",children:"Beschreibung: "}),N.description]}),N.address&&s.jsxs("div",{children:[s.jsx("span",{className:"font-semibold text-foreground",children:"Adresse: "}),N.address]}),N.time_start&&s.jsxs("div",{children:[s.jsx("span",{className:"font-semibold text-foreground",children:"Beginn: "}),N.time_start,N.time_end?` â ${N.time_end}`:""," Uhr"]}),s.jsxs("div",{children:[s.jsx("span",{className:"font-semibold text-foreground",children:"Eingereicht: "}),new Date(N.created_at).toLocaleString("de-DE")]}),s.jsxs("div",{children:[s.jsx("span",{className:"font-semibold text-foreground",children:"Zuletzt aktualisiert: "}),new Date(N.updated_at).toLocaleString("de-DE")]}),s.jsxs("div",{children:[s.jsx("span",{className:"font-semibold text-foreground",children:"Event-ID: "}),s.jsx("span",{className:"font-mono",children:N.id})]})]})}),d===N.id&&s.jsxs("div",{className:"border-t border-border px-5 py-4 bg-card",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx(x9,{size:13,className:"text-primary","aria-hidden":"true"}),s.jsx("p",{className:"text-xs font-bold text-foreground",children:"Audit-Trail"})]}),r[N.id]?r[N.id].length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:"Keine Einträge."}):s.jsx("ol",{className:"relative border-l border-border ml-2 space-y-4","aria-label":"Audit-Verlauf",children:r[N.id].map(K=>{var R,H;return s.jsxs("li",{className:"pl-5 relative",children:[s.jsx("span",{className:"absolute -left-[5px] top-1 w-2.5 h-2.5 rounded-full bg-primary border-2 border-background","aria-hidden":"true"}),s.jsxs("p",{className:"text-[11px] font-bold text-foreground",children:[A2e[K.action]??K.action,K.previous_status&&K.new_status&&s.jsxs("span",{className:"font-normal text-muted-foreground",children:[" ","· ",((R=dl[K.previous_status])==null?void 0:R.label)??K.previous_status," â ",((H=dl[K.new_status])==null?void 0:H.label)??K.new_status]})]}),K.notes&&s.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 italic",children:K.notes}),s.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:new Date(K.created_at).toLocaleStr
976ing("de-DE")})]},K.id)})}):s.jsx("p",{className:"text-xs text-muted-foreground animate-pulse",children:"Lädt â¦"})]})]},N.id))})})]})]})]})}function _2e(){const[e,t]=A.useState([]),[r,n]=A.useState(!0),[i,a]=A.useState(null),[o,l]=A.useState(""),[c,u]=A.useState(new Set),[d,x]=A.useState({}),[f,h]=A.useState(null),m=A.useCallback(async()=>{n(!0),a(null);const{data:g,error:w}=await re.from("admin_users_view").select("*").order("created_at",{ascending:!1});w?a(w.message):t(g??[]),n(!1)},[]);A.useEffect(()=>{m(),re.auth.getUser().then(({data:g})=>{g.user&&h(g.user.id)})},[m]);async function p(g){if(u(w=>new Set(w).add(g.id)),x(w=>({...w,[g.id]:""})),g.is_admin){const{error:w}=await re.from("user_roles").delete().eq("user_id",g.id).eq("role","admin");w?x(E=>({...E,[g.id]:"Fehler: "+w.message})):(x(E=>({...E,[g.id]:"Admin-Rolle entzogen."})),t(E=>E.map(C=>C.id===g.id?{...C,is_admin:!1}:C)))}else{const{error:w}=await re.from("user_roles").insert({user_id:g.id,role:"admin"});w?x(E=>({...E,[g.id]:"Fehler: "+w.message})):(x(E=>({...E,[g.id]:"Admin-Rolle vergeben."})),t(E=>E.map(C=>C.id===g.id?{...C,is_admin:!0}:C)))}u(w=>{const E=new Set(w);return E.delete(g.id),E}),setTimeout(()=>x(w=>({...w,[g.id]:""})),3e3)}async function v(g){if(confirm(`Nutzer "${g.display_name??g.email}" wirklich endgültig löschen? Dies kann nicht rückgängig gemacht werden.`)){u(w=>new Set(w).add(g.id)),x(w=>({...w,[g.id]:""}));try{const{data:w,error:E}=await re.functions.invoke("delete-user",{body:{user_id:g.id}});if(E)throw E;if(w!=null&&w.error)throw new Error(w.error);x(C=>({...C,[g.id]:"Nutzer gelöscht."})),t(C=>C.filter(j=>j.id!==g.id))}catch(w){x(E=>({...E,[g.id]:"Fehler: "+(w.message||"Löschen fehlgeschlagen")}))}u(w=>{const E=new Set(w);return E.delete(g.id),E}),setTimeout(()=>x(w=>({...w,[g.id]:""})),3e3)}}const y=e.filter(g=>{var E,C;const w=o.toLowerCase();return((E=g.email)==null?void 0:E.toLowerCase().includes(w))||((C=g.display_name)==null?void 0:C.toLowerCase().includes(w))}),b=e.filter(g=>g.is_admin).length;return s.jsx("section",{"aria-labelledby":"roles-heading",className:"py-14 border-t border-border",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-5xl",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-8",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-1",children:"Admin · Benutzerverwaltung"}),s.jsx("h2",{className:"font-display text-4xl md:text-5xl",id:"roles-heading",children:"NUTZER"})]}),s.jsxs("button",{onClick:m,disabled:r,className:"flex items-center gap-1.5 px-3 py-2 rounded-xl border border-border text-xs text-muted-foreground hover:text-foreground hover:border-primary/40 transition-all disabled:opacity-50 self-start","aria-label":"Benutzerliste neu laden",children:[s.jsx(Be,{size:13,className:r?"animate-spin":"","aria-hidden":"true"}),"Aktualisieren"]})]}),s.jsx("dl",{className:"grid grid-cols-2 sm:grid-cols-3 gap-4 mb-8",children:[{label:"Nutzer gesamt",value:e.length,icon:Je},{label:"Admins",value:b,icon:Km},{label:"Reguläre Nutzer",value:e.length-b,icon:Hm}].map(({label:g,value:w,icon:E})=>s.jsxs("div",{className:"p-5 rounded-2xl border border-border gradient-card flex flex-col gap-2",children:[s.jsx(E,{size:18,className:"text-primary","aria-hidden":"true"}),s.jsx("dd",{className:"font-display text-3xl text-foreground",children:w}),s.jsx("dt",{className:"text-xs text-muted-foreground",children:g})]},g))}),s.jsxs("div",{className:"mb-6 flex items-start gap-3 px-5 py-3 rounded-xl bg-destructive/10 border border-destructive/20 text-xs text-destructive",children:[s.jsx(bn,{size:14,className:"shrink-0 mt-0.5","aria-hidden":"true"}),"Das Löschen eines Nutzers ist endgültig und entfernt alle zugehörigen Daten (Profil, Rollen, etc.)."]}),s.jsxs("div",{className:"relative mb-4",children:[s.jsx(Ur,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{type:"search",value:o,onChange:g=>l(g.target.value),placeholder:"Nutzer suchen (E-Mail oder Name) â¦",className:"w-full bg-background border border-border rounded-xl pl-9 pr-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50","aria-label":"Nutzer durchsuchen"})]}),i&&s.jsxs("div",{role:"alert",className:"py-8 text-center text-destructive text-sm",children:["Fehler: ",i]}),r&&!i&&s.jsx("div",{className:"py-10 text-center text-muted-foreground text-sm animate-pulse",children:"Nutzer werden geladen â¦"}),!r&&!i&&s.jsx("div",{className:"rounded-2xl border border-border bg-card overflow-hidden",children:y.length===0?s.jsx("div",{className:"py-12 text-center text-muted-foreground text-sm",children:"Keine Nutzer gefunden."}):s.jsxs("table",{className:"w-full text-sm","aria-label":"Nutzerliste",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border text-xs text-muted-foreground",children:[s.jsx("th",{className:"text-left px-5 py-3 font-medium",children:"Nutzer"}),s.jsx("th",{className:"text-left px-4 py-3 font-medium hidden sm:table-cell",children:"Registriert"}),s.jsx("th",{className:"text-center px-4 py-3 font-medium",children:"Rolle"}),s.jsx("th",{className:"text-center px-4 py-3 font-medium",children:"Aktionen"})]})}),s.jsx("tbody",{children:y.map(g=>{const w=g.id===f;return s.jsxs("tr",{className:"border-b border-border/50 last:border-0 hover:bg-muted/20 transition-colors",children:[s.jsx("td",{className:"px-5 py-3",children:s.jsxs("div",{className:"flex items-center gap-3",children:[g.avatar_url?s.jsx("img",{src:g.avatar_url,alt:"",className:"w-8 h-8 rounded-full object-cover border border-border shrink-0"}):s.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 border border-border flex items-center justify-center shrink-0",children:s.jsx(Hm,{size:16,className:"text-primary","aria-hidden":"true"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsxs("p",{className:"font-medium text-foreground truncate",children:[g.display_name??"â",g.is_admin&&s.jsx(Km,{size:11,className:"inline ml-1.5 text-primary","aria-label":"Admin"}),w&&s.jsx("span",{className:"text-[10px] text-muted-foreground ml-1.5",children:"(Du)"})]}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:g.email??"â"})]})]})}),s.jsx("td",{className:"px-4 py-3 text-xs text-muted-foreground hidden sm:table-cell",children:new Date(g.created_at).toLocaleDateString("de-DE")}),s.jsxs("td",{className:"px-4 py-3 text-center",children:[s.jsx("span",{className:`inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full font-bold ${g.is_admin?"bg-primary/15 text-primary":"bg-muted text-muted-foreground"}`,children:g.is_admin?s.jsxs(s.Fragment,{children:[s.jsx(Km,{size:9,"aria-hidden":"true"}),"Admin"]}):s.jsxs(s.Fragment,{children:[s.jsx(Hm,{size:9,"aria-hidden":"true"}),"Nutzer"]})}),d[g.id]&&s.jsx("p",{className:"text-[10px] text-primary mt-0.5",children:d[g.id]})]}),s.jsx("td",{className:"px-4 py-3 text-center",children:s.jsxs("div",{className:"flex items-center justify-center gap-1",children:[s.jsx("button",{onClick:()=>p(g),disabled:c.has(g.id),className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-bold transition-all disabled:opacity-50 ${g.is_admin?"bg-destructive/10 text-destructive hover:bg-destructive/20":"bg-primary/10 text-primary hover:bg-primary/20"}`,"aria-label":g.is_admin?"Admin-Rolle entziehen":"Admin machen",children:c.has(g.id)?s.jsx(Be,{size:11,className:"animate-spin","aria-hidden":"true"}):g.is_admin?s.jsxs(s.Fragment,{children:[s.jsx(RT,{size:11,"aria-hidden":"true"}),"Entziehen"]}):s.jsxs(s.Fragment,{children:[s.jsx(ha,{size:11,"aria-hidden":"true"}),"Admin"]})}),!w&&s.jsx("button",{onClick:()=>v(g),disabled:c.has(g.id),className:"inline-flex items-center gap-1 px-2.5 py-1.5 rounded-lg text-xs font-bold bg-destructive/10 text-destructive hover:bg-destructive/20 transition-all disabled:opacity-50","aria-label":`Nutzer ${g.display_name} löschen`,children:s.jsx(Vt,{size:11,"aria-hidden":"true"})})]})})]},g.id)})})]})})]})})}const xj=[{value:"admin",label:"Admin (Vollzugriff)"},{value:"moderator",label:"Moderator (Eingeschränkt)"},{value:"user",label:"Nutzer (Basis)"}],S2e=["#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#ec4899","#f43f5e"];function B2e(){const[e,t]=A.useState([]),[r,n]=A.useState([]),[i,a]=A.useState([]),[o,l]=A.useState(!0),[c,u]=A.useState(!1),[d,x]=A.useState(null),[f,h]=A.useState(null),[m,p]=A.useState(!1),[v,y]=A.useState(""),[b,g]=A.useState(""),[w,E]=A.useState("#6366f1"),[C,j]=A.useState("user"),[S,_]=A.useState(new Set),O=A.useCallback(async()=>
976{l(!0);const[L,F,U]=await Promise.all([re.from("custom_roles").select("*").order("created_at"),re.from("permissions").select("*").order("sort_order"),re.from("role_permissions").select("role_id, permission_id")]);L.data&&t(L.data),F.data&&n(F.data),U.data&&a(U.data),l(!1)},[]);A.useEffect(()=>{O()},[O]);const I=r.reduce((L,F)=>{var U;return(L[U=F.category]??(L[U]=[])).push(F),L},{});function B(){y(""),g(""),E("#6366f1"),j("user"),_(new Set),x(null),u(!1)}function T(L){y(L.name),g(L.description??""),E(L.color),j(L.base_role),_(new Set(i.filter(F=>F.role_id===L.id).map(F=>F.permission_id))),x(L.id),u(!0)}async function k(){if(v.trim()){p(!0);try{const{data:{user:L}}=await re.auth.getUser();let F=d;if(d)await re.from("custom_roles").update({name:v.trim(),description:b.trim()||null,color:w,base_role:C}).eq("id",d);else{const{data:U,error:D}=await re.from("custom_roles").insert({name:v.trim(),description:b.trim()||null,color:w,base_role:C,created_by:L==null?void 0:L.id}).select("id").single();if(D)throw D;F=U.id}if(F&&(await re.from("role_permissions").delete().eq("role_id",F),S.size>0)){const U=Array.from(S).map(D=>({role_id:F,permission_id:D}));await re.from("role_permissions").insert(U)}B(),await O()}catch(L){console.error("Save role error:",L)}p(!1)}}async function $(L){confirm("Rolle wirklich löschen? Alle Zuweisungen werden entfernt.")&&(await re.from("custom_roles").delete().eq("id",L),await O())}function W(L){_(F=>{const U=new Set(F);return U.has(L)?U.delete(L):U.add(L),U})}function z(L){const F=I[L]??[],U=F.every(D=>S.has(D.id));_(D=>{const N=new Set(D);return F.forEach(K=>U?N.delete(K.id):N.add(K.id)),N})}return o?s.jsx("div",{className:"py-10 text-center text-muted-foreground text-sm animate-pulse",children:"Rollen werden geladen â¦"}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-display text-2xl",children:"BENUTZERDEFINIERTE ROLLEN"}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[e.length," Rolle",e.length!==1?"n":""," definiert"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:O,className:"p-2 rounded-lg border border-border text-muted-foreground hover:text-foreground transition-colors","aria-label":"Aktualisieren",children:s.jsx(Be,{size:13})}),s.jsxs("button",{onClick:()=>{B(),u(!0)},className:"flex items-center gap-1.5 px-3 py-2 rounded-xl bg-primary text-primary-foreground text-xs font-bold hover:bg-primary/90 transition-colors",children:[s.jsx(Ht,{size:13})," Neue Rolle"]})]})]}),c&&s.jsxs("div",{className:"rounded-2xl border border-primary/30 bg-card p-6 space-y-5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h4",{className:"font-display text-xl",children:d?"ROLLE BEARBEITEN":"NEUE ROLLE"}),s.jsx("button",{onClick:B,className:"p-1 text-muted-foreground hover:text-foreground",children:s.jsx(_t,{size:16})})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Rollenname *"}),s.jsx("input",{value:v,onChange:L=>y(L.target.value),placeholder:"z.B. Türsteher, Kassenwart â¦",className:"w-full bg-background border border-border rounded-xl px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Basis-Zugriffsebene"}),s.jsx("select",{value:C,onChange:L=>j(L.target.value),className:"w-full bg-background border border-border rounded-xl px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50",children:xj.map(L=>s.jsx("option",{value:L.value,children:L.label},L.value))})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Beschreibung"}),s.jsx("input",{value:b,onChange:L=>g(L.target.value),placeholder:"Kurze Beschreibung der Rolle â¦",className:"w-full bg-background border border-border rounded-xl px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50"})]}),s.jsxs("div",{children:[s.jsxs("label",{className:"text-xs text-muted-foreground mb-2 block flex items-center gap-1.5",children:[s.jsx(TT,{size:12})," Farbe"]}),s.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:S2e.map(L=>s.jsx("button",{onClick:()=>E(L),className:`w-7 h-7 rounded-full border-2 transition-all ${w===L?"border-foreground scale-110":"border-transparent"}`,style:{background:L},"aria-label":`Farbe ${L}`},L))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-muted-foreground mb-3 block",children:"Berechtigungen"}),Object.entries(I).map(([L,F])=>{const U=F.every(D=>S.has(D.id));return s.jsxs("div",{className:"mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("button",{onClick:()=>z(L),className:`text-[10px] px-2 py-0.5 rounded-full font-bold transition-colors ${U?"bg-primary/20 text-primary":"bg-muted text-muted-foreground hover:text-foreground"}`,children:U?"Alle abwählen":"Alle wählen"}),s.jsx("span",{className:"text-xs font-bold text-foreground uppercase tracking-wider",children:L})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2",children:F.map(D=>{const N=S.has(D.id);return s.jsxs("button",{onClick:()=>W(D.id),className:`flex items-center gap-2 px-3 py-2 rounded-xl border text-xs text-left transition-all ${N?"border-primary/40 bg-primary/10 text-foreground":"border-border bg-card text-muted-foreground hover:border-primary/20"}`,children:[s.jsx("div",{className:`w-4 h-4 rounded flex items-center justify-center border shrink-0 ${N?"bg-primary border-primary":"border-border"}
976`,children:N&&s.jsx(ti,{size:10,className:"text-primary-foreground"})}),s.jsxs("div",{children:[s.jsx("span",{className:"font-medium",children:D.label}),D.description&&s.jsx("span",{className:"text-[10px] text-muted-foreground block",children:D.description})]})]},D.id)})})]},L)})]}),s.jsxs("div",{className:"flex items-center gap-3 pt-2",children:[s.jsxs("button",{onClick:k,disabled:m||!v.trim(),className:"flex items-center gap-1.5 px-4 py-2.5 rounded-xl bg-primary text-primary-foreground text-xs font-bold hover:bg-primary/90 transition-colors disabled:opacity-50",children:[m?s.jsx(Be,{size:13,className:"animate-spin"}):s.jsx(ti,{size:13}),d?"Speichern":"Rolle erstellen"]}),s.jsx("button",{onClick:B,className:"px-4 py-2.5 rounded-xl border border-border text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Abbrechen"})]})]}),e.length===0&&!c?s.jsx("div",{className:"py-12 text-center text-muted-foreground text-sm border border-dashed border-border rounded-2xl",children:"Noch keine benutzerdefinierten Rollen erstellt."}):s.jsx("div",{className:"space-y-3",children:e.map(L=>{var N;const F=i.filter(K=>K.role_id===L.id),U=F.map(K=>{var R;return(R=r.find(H=>H.id===K.permission_id))==null?void 0:R.label}).filter(Boolean),D=f===L.id;return s.jsxs("div",{className:"rounded-2xl border border-border bg-card overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4",children:[s.jsx("div",{className:"w-3 h-3 rounded-full shrink-0",style:{background:L.color}}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-bold text-sm text-foreground",children:L.name}),s.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-muted text-muted-foreground font-medium",children:(N=xj.find(K=>K.value===L.base_role))==null?void 0:N.label.split(" ")[0]})]}),L.description&&s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:L.description}),s.jsxs("p",{className:"text-[10px] text-muted-foreground mt-1",children:[F.length," Berechtigung",F.length!==1?"en":""]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>h(D?null:L.id),className:"p-2 rounded-lg text-muted-foreground hover:text-foreground transition-colors","aria-label":"Details",children:D?s.jsx(na,{size:14}):s.jsx(mr,{size:14})}),s.jsx("button",{onClick:()=>T(L),className:"p-2 rounded-lg text-muted-foreground hover:text-primary transition-colors","aria-label":"Bearbeiten",children:s.jsx(ss,{size:13})}),s.jsx("button",{onClick:()=>$(L.id),className:"p-2 rounded-lg text-muted-foreground hover:text-destructive transition-colors","aria-label":"Löschen",children:s.jsx(Vt,{size:13})})]})]}),D&&U.length>0&&s.jsx("div",{className:"px-5 pb-4 pt-0 flex flex-wrap gap-1.5",children:U.map(K=>s.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full border border-border bg-muted/50 text-muted-foreground",children:K},K))})]},L.id)})})]})}function N2e(){const[e,t]=A.useState([]),[r,n]=A.useState([]),[i,a]=A.useState(!0),[o,l]=A.useState(!1),[c,u]=A.useState(null),[d,x]=A.useState(new Set),[f,h]=A.useState(""),[m,p]=A.useState(""),[v,y]=A.useState(""),b=A.useCallback(async()=>{a(!0);const[j,S]=await Promise.all([re.from("custom_roles").select("id, name, color").order("name"),re.from("user_invitations").select("*").order("created_at",{ascending:!1}).limit(50)]);j.data&&t(j.data),S.data&&n(S.data),a(!1)},[]);A.useEffect(()=>{b()},[b]);async function g(j){if(j.preventDefault(),!!f.trim()){l(!0),u(null);try{const{data:S,error:_}=await re.functions.invoke("invite-user",{body:{email:f.trim(),role_id:v||null,display_name:m.trim()||null}});if(_)throw _;if(S!=null&&S.error)throw new Error(S.error);u({ok:!0,msg:`Einladung an ${f} gesendet!`}),h(""),p(""),y(""),await b()}catch(S){u({ok:!1,msg:S.message||"Fehler beim Senden"})}l(!1),setTimeout(()=>u(null),5e3)}}async function w(j){const S=j.status==="pending"?"zurücknehmen":"löschen";if(confirm(`Einladung an ${j.email} wirklich ${S}?`)){x(_=>new Set(_).add(j.id));try{const{error:_}=await re.from("user_invitations").delete().eq("id",j.id);if(_)throw _;n(O=>O.filter(I=>
976I.id!==j.id))}catch(_){console.error("Revoke error:",_),alert("Fehler: "+(_.message||"Löschen fehlgeschlagen"))}x(_=>{const O=new Set(_);return O.delete(j.id),O})}}const E=j=>{switch(j){case"pending":return s.jsx(gr,{size:12,className:"text-yellow-500"});case"accepted":return s.jsx(ut,{size:12,className:"text-green-500"});case"expired":return s.jsx(Kt,{size:12,className:"text-destructive"});default:return s.jsx(gr,{size:12,className:"text-muted-foreground"})}},C=j=>{switch(j){case"pending":return"Ausstehend";case"accepted":return"Angenommen";case"expired":return"Abgelaufen";default:return j}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(_4,{size:16,className:"text-primary"}),s.jsx("h3",{className:"font-display text-xl",children:"NUTZER EINLADEN"})]}),s.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:"Der eingeladene Nutzer erhält eine gebrandete E-Mail mit einem Link zum Aktivieren seines Kontos."}),s.jsxs("form",{onSubmit:g,className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"E-Mail-Adresse *"}),s.jsx("input",{type:"email",value:f,onChange:j=>h(j.target.value),placeholder:"[email protected]",required:!0,className:"w-full bg-background border border-border rounded-xl px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Name (optional)"}),s.jsx("input",{type:"text",value:m,onChange:j=>p(j.target.value),placeholder:"Max Mustermann",className:"w-full bg-background border border-border rounded-xl px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Rolle zuweisen"}),s.jsxs("select",{value:v,onChange:j=>y(j.target.value),className:"w-full bg-background border border-border rounded-xl px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50",children:[s.jsx("option",{value:"",children:"Keine Rolle (Standard-Nutzer)"}),e.map(j=>s.jsx("option",{value:j.id,children:j.name},j.id))]})]}),c&&s.jsxs("div",{className:`flex items-center gap-2 px-4 py-2.5 rounded-xl text-xs ${c.ok?"bg-green-500/10 border border-green-500/20 text-green-400":"bg-destructive/10 border border-destructive/20 text-destructive"}`,children:[c.ok?s.jsx(ti,{size:13}):s.jsx(bn,{size:13}),c.msg]}),s.jsxs("button",{type:"submit",disabled:o||!f.trim(),className:"flex items-center gap-1.5 px-4 py-2.5 rounded-xl bg-primary text-primary-foreground text-xs font-bold hover:bg-primary/90 transition-colors disabled:opacity-50",children:[o?s.jsx(Be,{size:13,className:"animate-spin"}):s.jsx(os,{size:13}),"Einladung senden"]})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"font-display text-xl",children:"EINLADUNGEN"}),s.jsx("button",{onClick:b,className:"p-2 rounded-lg border border-border text-muted-foreground hover:text-foreground transition-colors","aria-label":"Aktualisieren",children:s.jsx(Be,{size:13})})]}),i?s.jsx("div",{className:"py-8 text-center text-muted-foreground text-sm animate-pulse",children:"Laden â¦"}):r.length===0?s.jsx("div",{className:"py-10 text-center text-muted-foreground text-sm border border-dashed border-border rounded-2xl",children:"Noch keine Einladungen verschickt."}):s.jsx("div",{className:"rounded-2xl border border-border bg-card overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm","aria-label":"Einladungen",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border text-xs text-muted-foreground",children:[s.jsx("th",{className:"text-left px-5 py-3 font-medium",children:"E-Mail"}),s.jsx("th",{className:"text-left px-4 py-3 font-medium hidden sm:table-cell",children:"Rolle"}),s.jsx("th",{className:"text-center px-4 py-3 font-medium",children:"Status"}),s.jsx("th",{className:"text-left px-4 py-3 font-medium hidden sm:table-cell",children:"Datum"}),s.jsx("th",{className:"text-center px-4 py-3 font-medium",children:"Aktion"})]})}),s.jsx("tbody",{children:r.map(j=>{const S=e.find(O=>O.id===j.role_id),_=j.status==="pending";return s.jsxs("tr",{className:"border-b border-border/50 last:border-0 hover:bg-muted/20 transition-colors",children:[s.jsx("td",{className:"px-5 py-3 text-foreground",children:j.email}),s.jsx("td",{className:"px-4 py-3 hidden sm:table-cell",children:S?s.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs",children:[s.jsx("span",{className:"w-2 h-2 rounded-full",style:{background:S.color}}),S.name]}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"â"})}),s.jsx("td",{className:"px-4 py-3 text-center",children:s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-bold",children:[E(j.status),C(j.status)]})}),s.jsx("td",{className:"px-4 py-3 text-xs text-muted-foreground hidden sm:table-cell",children:new Date(j.created_at).toLocaleDateString("de-DE")}),s.jsx("td",{className:"px-4 py-3 text-center",children:s.jsx("button",{onClick:()=>w(j),disabled:d.has(j.id),className:`inline-flex items-center gap-1 px-2.5 py-1.5 rounded-lg text-xs font-bold transition-all disabled:opacity-50 ${_?"bg-yellow-500/10 text-yellow-500 hover:bg-yellow-500/20":"bg-destructive/10 text-destructive hover:bg-destructive/20"}`,"aria-label":_?"Einladung zurücknehmen":"Einladung löschen",children:d.has(j.id)?s.jsx(Be,{size:11,className:"animate-spin"}):_?s.jsxs(s.Fragment,{children:[s.jsx(UT,{size:11}),"Zurücknehmen"]}):s.jsxs(s.Fragment,{children:[s.jsx(Vt,{size:11}),"Löschen"]})})})]},j.id)})})]})})]})]})}const D2e=[{key:"roles",label:"Rollen",icon:dE},{key:"users",label:"Nutzer",icon:Je},{key:"invite",label:"Einladen",icon:_4}];function F2e(){const[e,t]=A.useState("roles");return s.jsxs(s.Fragment,{children:[s.jsx(Hr,{}),s.jsxs("main",{id:"main-content",className:"pt-14 min-h-screen",children:[s.jsx("section",{className:"py-12 bg-card/50 border-b border-border",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-5xl",children:[s.jsxs(we,{to:"/dashboard",className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-primary transition-colors mb-4",children:[s.jsx(Sn,{size:12,"aria-hidden":"true"})," Dashboard"]}),s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-1",children:"Admin · Zugriffskontrolle"}),s.jsxs("h1",{className:"font-display text-5xl md:text-7xl leading-none",children:["ROLLEN &",s.jsx("br",{}),"RECHTE"]}),s.jsx("p",{className:"text-muted-foreground mt-4 max-w-lg text-sm leading-relaxed",children:"Erstelle benutzerdefinierte Rollen mit individuellen Berechtigungen und lade neue Teammitglieder ein."})]})}),s.jsx(Ce,{children:s.jsx("div",{className:"container mx-auto px-4 max-w-5xl pt-8",children:s.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-xl border border-primary/20 bg-primary/5 text-sm",children:[s.jsx(ha,{size:16,className:"text-primary shrink-0 mt-0.5","aria-hidden":"true"}),s.jsxs("div",{className:"space-y-1 text-muted-foreground text-xs leading-relaxed",children:[s.jsx("p",{className:"font-bold text-foreground text-sm",children:"Sicherheitsarchitektur"}),s.jsx("p",{children:"Rollen werden in der Datenbank gespeichert und serverseitig über RLS-Policies geprüft. Neue Nutzer erhalten eine Einladungsmail und können erst nach Aktivierung auf das System zugreifen."})]})]})})}),s.jsxs("div",{className:"container mx-auto px-4 max-w-5xl pt-8",children:[s.jsx("div",{className:"flex items-center gap-1 border-b border-border mb-8",children:D2e.map(({key:r,label:n,icon:i})=>s.jsxs("button",{onClick:()=>t(r),className:`flex items-center gap-1.5 px-4 py-3 text-xs font-bold border-b-2 transition-all -mb-px ${e===r?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"}`,children:[s.jsx(i,{size:14}),n]},r))}),e==="roles"&&s.jsx(B2e,{}),e==="users"&&s.jsx(_2e,{}),e==="invite"&&s.jsx(N2e,{})]}),s.jsx("div",{className:"h-20"})]})]})}function P2e(e){return e==="google"?s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold px-2 py-0.5 rounded-full bg-primary/10 text-primary border border-primary/20",children:[s.jsx(cp,{size:10,"aria-hidden":"true"})," Google"]}):s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold px-2 py-0.5 rounded-full bg-muted text-muted-foreground border border-border",children:[s.jsx($t,{size:10,"aria-hidden":"true"})," E-Mail"]})}function O2e(e){return e?s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold px-2 py-0.5 rounded-full bg-accent/20 text-accent-foreground border border-accent/30",children:[s.jsx(ut,{size:10,"aria-hidden":"true"})," Erfolg"]}):s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold px-2 py-0.5 rounded-full bg-destructive/10 text-destructive border border-destructive/20",children:[s.jsx(Kt,{size:10,"aria-hidden":"true"})," Fehlgeschlagen"]})}
976function T2e(e){return new Date(e).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function $2e(){const[e,t]=A.useState([]),[r,n]=A.useState(!0),[i,a]=A.useState(null),[o,l]=A.useState(""),[c,u]=A.useState(!1),d=A.useCallback(async(m=!1)=>{m?u(!0):n(!0),a(null);const{data:p,error:v}=await re.from("admin_login_audit").select("*").order("created_at",{ascending:!1}).limit(200);v?a("Audit-Logs konnten nicht geladen werden: "+v.message):t(p??[]),n(!1),u(!1)},[]);A.useEffect(()=>{d()},[d]);const x=e.filter(m=>{const p=o.toLowerCase();return!p||m.email.toLowerCase().includes(p)||m.method.includes(p)}),f=e.filter(m=>m.success).length,h=e.length-f;return s.jsxs(dt,{children:[s.jsx(Hr,{}),s.jsxs("main",{id:"main-content",className:"pt-14 min-h-screen",children:[s.jsx("section",{className:"py-12 bg-card/50 border-b border-border",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-5xl",children:[s.jsxs(we,{to:"/dashboard",className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-primary transition-colors mb-4",children:[s.jsx(Sn,{size:12,"aria-hidden":"true"})," Dashboard"]}),s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-1",children:"Admin · Sicherheit"}),s.jsxs("h1",{className:"font-display text-5xl md:text-7xl leading-none",children:["AUDIT",s.jsx("br",{}),"LOG"]}),s.jsx("p",{className:"text-muted-foreground mt-4 max-w-lg text-sm leading-relaxed",children:"Vollständige Protokollierung aller Admin-Anmeldeversuche â Methode, Zeitstempel und Ergebnis."})]})}),s.jsx(Ce,{children:s.jsx("div",{className:"container mx-auto px-4 max-w-5xl pt-8 grid grid-cols-3 gap-3",children:[{label:"Gesamt",value:e.length,icon:gr,color:"text-foreground"},{label:"Erfolgreich",value:f,icon:ut,color:"text-green-400"},{label:"Fehlgeschlagen",value:h,icon:Kt,color:"text-destructive"}].map(({label:m,value:p,icon:v,color:y})=>s.jsxs("div",{className:"rounded-xl border border-border bg-card p-4 flex flex-col gap-1",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[s.jsx(v,{size:12,className:y,"aria-hidden":"true"})," ",m]}),s.jsx("p",{className:`font-display text-3xl ${y}`,children:p})]},m))})}),s.jsx(Ce,{children:s.jsx("div",{className:"container mx-auto px-4 max-w-5xl pt-6",children:s.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-xl border border-primary/20 bg-primary/5 text-sm",children:[s.jsx(ha,{size:16,className:"text-primary shrink-0 mt-0.5","aria-hidden":"true"}),s.jsxs("div",{className:"space-y-0.5 text-xs text-muted-foreground leading-relaxed",children:[s.jsx("p",{className:"font-bold text-foreground",children:"Ãber dieses Protokoll"}),s.jsx("p",{children:"Jeder Admin-Login (E-Mail und Google SSO) wird serverseitig in dieser Tabelle festgehalten. Nur Admins können die Logs lesen. Die Daten werden nicht verändert oder gelöscht."})]})]})})}),s.jsxs("div",{className:"container mx-auto px-4 max-w-5xl pt-6 flex items-center gap-3",children:[s.jsxs("div",{className:"relative flex-1 max-w-xs",children:[s.jsx(Ur,{size:13,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{value:o,onChange:m=>l(m.target.value),placeholder:"E-Mail oder Methode â¦",className:"w-full bg-background border border-border rounded-xl pl-8 pr-8 py-2 text-xs focus:outline-none focus:ring-2 focus:ring-primary/50","aria-label":"Logs filtern"}),o&&s.jsx("button",{onClick:()=>l(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Filter zurücksetzen",children:s.jsx(_t,{size:12,"aria-hidden":"true"})})]}),s.jsxs("button",{onClick:()=>d(!0),disabled:c,className:"flex items-center gap-1.5 px-3 py-2 rounded-xl border border-border text-xs text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50","aria-label":"Neu laden",children:[s.jsx(Be,{size:12,className:c?"animate-spin":"","aria-hidden":"true"}),"Aktualisieren"]})]}),s.jsx("div",{className:"container mx-auto px-4 max-w-5xl pt-4 pb-16",children:r?s.jsxs("div",{className:"flex items-center justify-center py-20 text-muted-foreground text-sm gap-2",children:[s.jsx(Be,{size:15,className:"animate-spin","aria-hidden":"true"})," Lade Logs â¦"]}):i?s.jsx("div",{role:"alert",className:"p-4 rounded-xl bg-destructive/10 border border-destructive/30 text-destructive text-sm",children:i}):x.length===0?s.jsx("div",{className:"py-20 text-center text-muted-foreground text-sm",children:o?"Keine Einträge für diesen Filter.":"Noch keine Login-Protokolle vorhanden."}):s.jsxs("div",{className:"rounded-xl border border-border overflow-hidden",children:[s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border bg-muted/40",children:[s.jsx("th",{className:"px-4 py-3 text-left font-semibold text-muted-foreground",children:"Zeitstempel"}),s.jsx("th",{className:"px-4 py-3 text-left font-semibold text-muted-foreground",children:"E-Mail"}),s.jsx("th",{className:"px-4 py-3 text-left font-semibold text-muted-foreground",children:"Methode"}),s.jsx("th",{className:"px-4 py-3 text-left font-semibold text-muted-foreground",children:"Status"}),s.jsx("th",{className:"px-4 py-3 text-left font-semibold text-muted-foreground hidden md:table-cell",children:"User-Agent"})]})}),s.jsx("tbody",{children:x.map((m,p)=>s.jsxs("tr",{className:`border-b border-border last:border-0 ${p%2===0?"bg-card":"bg-background"}`,children:[s.jsx("td",{className:"px-4 py-3 text-muted-foreground font-mono whitespace-nowrap",children:T2e(m.created_at)}),s.jsx("td",{className:"px-4 py-3 text-foreground font-medium",children:m.email}),s.jsx("td",{className:"px-4 py-3",children:P2e(m.method)}),s.jsx("td",{className:"px-4 py-3",children:O2e(m.success)}),s.jsx("td",{className:"px-4 py-3 text-muted-foreground truncate max-w-xs hidden md:table-cell",children:m.user_agent?m.user_agent.slice(0,60)+(m.user_agent.length>60?"â¦":""):"â"})]},m.id))})]}),s.jsxs("div",{className:"px-4 py-2 border-t border-border bg-muted/30 text-xs text-muted-foreground",children:[x.length," Einträge",o?` (gefiltert von ${e.length})`:""]})]})})]})]})}
976function I2e(e){return new Date(e).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})}function M2e(){const[e,t]=A.useState([]),[r,n]=A.useState(!0),[i,a]=A.useState(null),[o,l]=A.useState(""),[c,u]=A.useState(!1),[d,x]=A.useState(!1),[f,h]=A.useState(""),[m,p]=A.useState(""),[v,y]=A.useState(""),[b,g]=A.useState(!1),[w,E]=A.useState(!1),[C,j]=A.useState(null),[S,_]=A.useState(null),[O,I]=A.useState(""),[B,T]=A.useState(""),[k,$]=A.useState(!1),[W,z]=A.useState(!1),[L,F]=A.useState(null),U=A.useCallback(async(X=!1)=>{X?u(!0):n(!0),a(null);const{data:ie,error:se}=await re.from("admin_secrets").select("id, name, description, created_by, created_at, updated_at").order("name");se?a("Fehler beim Laden der Secrets: "+se.message):t(ie??[]),n(!1),u(!1)},[]);A.useEffect(()=>{U()},[U]);async function D(X){if(X.preventDefault(),j(null),!f.trim()||!v.trim()){j("Name und Wert sind Pflichtfelder.");return}E(!0);const{data:{user:ie}}=await re.auth.getUser();if(!ie){j("Nicht authentifiziert."),E(!1);return}const{error:se}=await re.from("admin_secrets").insert({name:f.trim(),description:m.trim()||null,value_enc:new TextEncoder().encode(v).toString(),created_by:ie.id});se?j(se.message.includes("unique")?"Ein Secret mit diesem Namen existiert bereits.":se.message):(h(""),p(""),y(""),x(!1),await U(!0)),E(!1)}async function N(X){F(X),await re.from("admin_secrets").delete().eq("id",X),F(null),await U(!0)}function K(X){_(X.id),I(X.description??""),T(""),$(!1)}async function R(X){z(!0);const ie={description:O||null};B.trim()&&(ie.value_enc=new TextEncoder().encode(B).toString()),await re.from("admin_secrets").update(ie).eq("id",X),_(null),z(!1),await U(!0)}const H=e.filter(X=>{const ie=o.toLowerCase();return!ie||X.name.toLowerCase().includes(ie)||(X.description??"").toLowerCase().includes(ie)});return s.jsxs(dt,{children:[s.jsx(Hr,{}),s.jsxs("main",{id:"main-content",className:"pt-14 min-h-screen",children:[s.jsx("section",{className:"py-12 bg-card/50 border-b border-border",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-5xl",children:[s.jsxs(we,{to:"/dashboard",className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-primary transition-colors mb-4",children:[s.jsx(Sn,{size:12,"aria-hidden":"true"})," Dashboard"]}),s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-1",children:"Admin · Sicherheit"}),s.jsxs("h1",{className:"font-display text-5xl md:text-7xl leading-none",children:["SECRETS",s.jsx("br",{}),"VAULT"]}),s.jsx("p",{className:"text-muted-foreground mt-4 max-w-lg text-sm leading-relaxed",children:"Sicher verwaltete Zugangsdaten und API-Schlüssel â ausschlieÃlich für Admins zugänglich, durch Row-Level-Security geschützt."})]})}),s.jsx(Ce,{children:s.jsx("div",{className:"container mx-auto px-4 max-w-5xl pt-8",children:s.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-xl border border-primary/20 bg-primary/5",children:[s.jsx(ha,{size:16,className:"text-primary shrink-0 mt-0.5","aria-hidden":"true"}),s.jsxs("div",{className:"space-y-1 text-xs text-muted-foreground leading-relaxed",children:[s.jsx("p",{className:"font-bold text-foreground text-sm",children:"Sicherheitsarchitektur"}),s.jsxs("p",{children:["Secrets werden in der ",s.jsx("code",{className:"text-primary bg-primary/10 px-1 rounded",children:"admin_secrets"}),"-Tabelle gespeichert, die ausschlieÃlich über die serverseitige ",s.jsx("code",{className:"text-primary bg-primary/10 px-1 rounded",children:"has_role()"}),"-Funktion zugänglich ist. Werte werden niemals im Klartext übertragen â nur Metadaten (Name, Beschreibung) werden in der Tabellenliste angezeigt."]}),s.jsx("p",{children:"Für produktive API-Schlüssel empfehlen wir das native Lovable Cloud Secrets-Management (serverseitig, nur für Edge Functions)."})]})]})})}),s.jsxs("div",{className:"container mx-auto px-4 max-w-5xl pt-6 flex items-center gap-3 flex-wrap",children:[s.jsxs("div",{className:"relative flex-1 max-w-xs",children:[s.jsx(Ur,{size:13,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{value:o,onChange:X=>l(X.target.value),placeholder:"Name oder Beschreibung â¦",className:"w-full bg-background border border-border rounded-xl pl-8 pr-8 py-2 text-xs focus:outline-none focus:ring-2 focus:ring-primary/50","aria-label":"Secrets filtern"}),o&&s.jsx("button",{onClick:()=>l(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Filter zurücksetzen",children:s.jsx(_t,{size:12,"aria-hidden":"true"})})]}),s.jsxs("button",{onClick:()=>
976U(!0),disabled:c,className:"flex items-center gap-1.5 px-3 py-2 rounded-xl border border-border text-xs text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50",children:[s.jsx(Be,{size:12,className:c?"animate-spin":"","aria-hidden":"true"}),"Aktualisieren"]}),s.jsxs("button",{onClick:()=>{x(!0),j(null)},className:"flex items-center gap-1.5 px-4 py-2 rounded-xl bg-primary text-primary-foreground text-xs font-bold hover:opacity-90 transition-opacity",children:[s.jsx(Ht,{size:12,"aria-hidden":"true"})," Secret hinzufügen"]})]}),d&&s.jsx(Ce,{children:s.jsx("div",{className:"container mx-auto px-4 max-w-5xl pt-4",children:s.jsxs("form",{onSubmit:D,className:"rounded-xl border border-primary/30 bg-card p-5 space-y-3",children:[s.jsxs("p",{className:"font-semibold text-sm flex items-center gap-2",children:[s.jsx(ty,{size:14,className:"text-primary","aria-hidden":"true"}),"Neues Secret"]}),C&&s.jsx("div",{role:"alert",className:"text-xs text-destructive bg-destructive/10 border border-destructive/30 rounded-lg px-3 py-2",children:C}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsxs("label",{className:"block text-xs text-muted-foreground mb-1",children:["Name ",s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsx("input",{value:f,onChange:X=>h(X.target.value),placeholder:"z. B. STRIPE_API_KEY",className:"w-full bg-background border border-border rounded-xl px-3 py-2 text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/50",autoFocus:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-muted-foreground mb-1",children:"Beschreibung"}),s.jsx("input",{value:m,onChange:X=>p(X.target.value),placeholder:"Wofür wird dieser Schlüssel verwendet?",className:"w-full bg-background border border-border rounded-xl px-3 py-2 text-xs focus:outline-none focus:ring-2 focus:ring-primary/50"})]})]}),s.jsxs("div",{children:[s.jsxs("label",{className:"block text-xs text-muted-foreground mb-1",children:["Wert / Secret ",s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:b?"text":"password",value:v,onChange:X=>y(X.target.value),placeholder:"sk_live_â¦",className:"w-full bg-background border border-border rounded-xl pl-3 pr-10 py-2 text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/50"}),s.jsx("button",{type:"button",onClick:()=>g(X=>!X),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":b?"Wert verbergen":"Wert anzeigen",children:b?s.jsx(uo,{size:13}):s.jsx(ki,{size:13})})]})]}),s.jsxs("div",{className:"flex gap-2 pt-1",children:[s.jsxs("button",{type:"submit",disabled:w,className:"flex items-center gap-1.5 px-4 py-2 rounded-xl bg-primary text-primary-foreground text-xs font-bold hover:opacity-90 disabled:opacity-50",children:[w?s.jsx(Be,{size:11,className:"animate-spin","aria-hidden":"true"}):s.jsx(ti,{size:11,"aria-hidden":"true"}),"Speichern"]}),s.jsxs("button",{type:"button",onClick:()=>{x(!1),j(null),h(""),p(""),y("")},className:"flex items-center gap-1.5 px-4 py-2 rounded-xl border border-border text-xs text-muted-foreground hover:text-foreground",children:[s.jsx(Qv,{size:11,"aria-hidden":"true"})," Abbrechen"]})]})]})})}),s.jsx("div",{className:"container mx-auto px-4 max-w-5xl pt-4 pb-16",children:r?s.jsxs("div",{className:"flex items-center justify-center py-20 text-muted-foreground text-sm gap-2",children:[s.jsx(Be,{size:15,className:"animate-spin","aria-hidden":"true"})," Lade Secrets â¦"]}):i?s.jsx("div",{role:"alert",className:"p-4 rounded-xl bg-destructive/10 border border-destructive/30 text-destructive text-sm",children:i}):H.length===0?s.jsx("div",{className:"py-20 text-center text-muted-foreground text-sm",children:o?"Keine Secrets für diesen Filter.":"Noch keine Secrets gespeichert. Füge deinen ersten Schlüssel hinzu."}):s.jsxs("div",{className:"rounded-xl border border-border overflow-hidden",children:[s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border bg-muted/40",children:[s.jsx("th",{className:"px-4 py-3 text-left font-semibold text-muted-foreground",children:"Name"}),s.jsx("th",{className:"px-4 py-3 text-left font-semibold text-muted-foreground",children:"Beschreibung"}),s.jsx("th",{className:"px-4 py-3 text-left font-semibold text-muted-foreground hidden md:table-cell",children:"Wert"}),s.jsx("th",{className:"px-4 py-3 text-left font-semibold text-muted-foreground hidden sm:table-cell",children:"Aktualisiert"}),s.jsx("th",{className:"px-4 py-3 text-right font-semibold text-muted-foreground",children:"Aktionen"})]})}),s.jsx("tbody",{children:H.map((X,ie)=>s.jsxs("tr",{className:`border-b border-border last:border-0 ${ie%2===0?"bg-card":"bg-background"}`,children:[s.jsx("td",{className:"px-4 py-3 font-mono font-semibold text-foreground",children:X.name}),s.jsx("td",{className:"px-4 py-3 text-muted-foreground",children:S===X.id?s.jsx("input",{value:O,onChange:se=>I(se.target.value),className:"w-full bg-background border border-border rounded-lg px-2 py-1 text-xs focus:outline-none focus:ring-2 focus:ring-primary/50",placeholder:"Beschreibung â¦"}):X.description??s.jsx("span",{className:"italic text-muted-foreground
976/50",children:"keine"})}),s.jsx("td",{className:"px-4 py-3 hidden md:table-cell",children:S===X.id?s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:k?"text":"password",value:B,onChange:se=>T(se.target.value),placeholder:"Neuer Wert (leer = unverändert)",className:"w-full bg-background border border-border rounded-lg pl-2 pr-8 py-1 text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/50"}),s.jsx("button",{type:"button",onClick:()=>$(se=>!se),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Wert ein-/ausblenden",children:k?s.jsx(uo,{size:11}):s.jsx(ki,{size:11})})]}):s.jsx("span",{className:"font-mono tracking-widest text-muted-foreground select-none",children:"â¢â¢â¢â¢â¢â¢â¢â¢"})}),s.jsx("td",{className:"px-4 py-3 text-muted-foreground hidden sm:table-cell whitespace-nowrap",children:I2e(X.updated_at)}),s.jsx("td",{className:"px-4 py-3 text-right",children:s.jsx("div",{className:"flex items-center justify-end ga
976p-1.5",children:S===X.id?s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>R(X.id),disabled:W,className:"p-1.5 rounded-lg bg-primary/10 text-primary hover:bg-primary/20 transition-colors disabled:opacity-50","aria-label":"Speichern",children:W?s.jsx(Be,{size:12,className:"animate-spin"}):s.jsx(ti,{size:12})}),s.jsx("button",{onClick:()=>_(null),className:"p-1.5 rounded-lg border border-border text-muted-foreground hover:text-foreground transition-colors","aria-label":"Abbrechen",children:s.jsx(Qv,{size:12})})]}):s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>K(X),className:"p-1.5 rounded-lg border border-border text-muted-foreground hover:text-foreground transition-colors","aria-label":"Bearbeiten",children:s.jsx(ss,{size:12})}),s.jsx("button",{onClick:()=>N(X.id),disabled:L===X.id,className:"p-1.5 rounded-lg border border-destructive/30 text-destructive hover:bg-destructive/10 transition-colors disabled:opacity-50","aria-label":"Löschen",children:L===X.id?s.jsx(Be,{size:12,className:"animate-spin"}):s.jsx(Vt,{size:12})})]})})})]},X.id))})]}),s.jsxs("div",{className:"px-4 py-2 border-t border-border bg-muted/30 text-xs text-muted-foreground",children:[H.length," Secret",H.length!==1?"s":"",o?` (gefiltert von ${e.length})`:""]})]})})]})]})}var $D={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(typeof self<"u"?self:Li,function(){return function(r){var n={};function i(a){if(n[a])return n[a].exports;var o=n[a]={i:a,l:!1,exports:{}};return r[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=r,i.c=n,i.d=function(a,o,l){i.o(a,o)||Object.defineProperty(a,o,{configurable:!1,enumerable:!0,get:l})},i.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(o,"a",o),o},i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)},i.p="",i(i.s=3)}([function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function o(l,c){this.width=c,this.height=l.length/c,this.data=l}return o.createEmpty=function(l,c){return new o(new Uint8ClampedArray(l*c),l)},o.prototype.get=function(l,c){return l<0||l>=this.width||c<0||c>=this.height?!1:!!this.data[c*this.width+l]},o.prototype.set=function(l,c,u){this.data[c*this.width+l]=u?1:0},o.prototype.setRegion=function(l,c,u,d,x){for(var f=c;f<c+d;f++)for(var h=l;h<l+u;h++)this.set(h,f,!!x)},o}();n.BitMatrix=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(2);function o(c,u){return c^u}n.addOrSubtractGF=o;var l=function(){function c(u,d,x){this.primitive=u,this.size=d,this.generatorBase=x,this.expTable=new Array(this.size),this.logTable=new Array(this.size);for(var f=1,h=0;h<this.size;h++)this.expTable[h]=f,f=f*2,f>=this.size&&(f=(f^this.primitive)&this.size-1);for(var h=0;h<this.size-1;h++)this.logTable[this.expTable[h]]=h;this.zero=new a.default(this,Uint8ClampedArray.from([0])),this.one=new a.default(this,Uint8ClampedArray.from([1]))}return c.prototype.multiply=function(u,d){return u===0||d===0?0:this.expTable[(this.logTable[u]+this.logTable[d])%(this.size-1)]},c.prototype.inverse=function(u){if(u===0)throw new Error("Can't invert 0");return this.expTable[this.size-this.logTable[u]-1]},c.prototype.buildMonomial=function(u,d){if(u<0)throw new Error("Invalid monomial degree less than 0");if(d===0)return this.zero;var x=new Uint8ClampedArray(u+1);return x[0]=d,new a.default(this,x)},c.prototype.log=function(u){if(u===0)throw new Error("Can't take log(0)");return this.logTable[u]},c.prototype.exp=function(u){return this.expTable[u]},c}();n.default=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(1),o=function(){function l(c,u){if(u.length===0)throw new Error("No coefficients.");this.field=c;var d=u.length;if(d>1&&u[0]===0){for(var x=1;x<d&&u[x]===0;)x++;if(x===d)this.coefficients=c.zero.coefficients;else{this.coefficients=new Uint8ClampedArray(d-x);for(var f=0;f<this.coefficients.length;f++)this.coefficients[f]=u[x+f]}}else this.coefficients=u}return l.prototype.degree=function(){return this.coefficients.length-1},l.prototype.isZero=function(){return this.coefficients[0]===0},l.prototype.getCoefficient=function(c){return this.coefficients[this.coefficients.length-1-c]},l.prototype.addOrSubtract=function(c){var u;if(this.isZero())return c;if(c.isZero())return this;var d=this.coefficients,x=c.coefficients;d.length>x.length&&(u=[x,d],d=u[0],x=u[1]);for(var f=new Uint8ClampedArray(x.length),h=x.length-d.length,m=0;m<h;m++)f[m]=x[m];for(var m=h;m<x.length;m++)f[m]=a.addOrSubtractGF(d[m-h],x[m]);return new l(this.field,f)},l.prototype.multiply=function(c){if(c===0)return this.field.zero;if(c===1)return this;for(var u=this.coefficients.length,d=new Uint8ClampedArray(u),x=0;x<u;x++)d[x]=this.field.multiply(this.coefficients[x],c);return new l(this.field,d)},l.prototype.multiplyPoly=function(c){if(this.isZero()||c.isZero())return this.field.zero;for(var u=this.coefficients,d=u.length,x=c.coefficients,f=x.length,h=new Uint8ClampedArray(d+f-1),m=0;m<d;m++)for(var p=u[m],v=0;v<f;
976v++)h[m+v]=a.addOrSubtractGF(h[m+v],this.field.multiply(p,x[v]));return new l(this.field,h)},l.prototype.multiplyByMonomial=function(c,u){if(c<0)throw new Error("Invalid degree less than 0");if(u===0)return this.field.zero;for(var d=this.coefficients.length,x=new Uint8ClampedArray(d+c),f=0;f<d;f++)x[f]=this.field.multiply(this.coefficients[f],u);return new l(this.field,x)},l.prototype.evaluateAt=function(c){var u=0;if(c===0)return this.getCoefficient(0);var d=this.coefficients.length;if(c===1)return this.coefficients.forEach(function(f){u=a.addOrSubtractGF(u,f)}),u;u=this.coefficients[0];for(var x=1;x<d;x++)u=a.addOrSubtractGF(this.field.multiply(c,u),this.coefficients[x]);return u},l}();n.default=o},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(4),o=i(5),l=i(11),c=i(12);function u(f){var h=c.locate(f);if(!h)return null;for(var m=0,p=h;m<p.length;m++){var v=p[m],y=l.extract(f,v),b=o.decode(y.matrix);if(b)return{binaryData:b.bytes,data:b.text,chunks:b.chunks,version:b.version,location:{topRightCorner:y.mappingFunction(v.dimension,0),topLeftCorner:y.mappingFunction(0,0),bottomRightCorner:y.mappingFunction(v.dimension,v.dimension),bottomLeftCorner:y.mappingFunction(0,v.dimension),topRightFinderPattern:v.topRight,topLeftFinderPattern:v.topLeft,bottomLeftFinderPattern:v.bottomLeft,bottomRightAlignmentPattern:v.alignmentPattern}}}return null}var d={inversionAttempts:"attemptBoth"};function x(f,h,m,p){p===void 0&&(p={});var v=d;Object.keys(v||{}).forEach(function(j){v[j]=p[j]||v[j]});var y=v.inversionAttempts==="attemptBoth"||v.inversionAttempts==="invertFirst",b=v.inversionAttempts==="onlyInvert"||v.inversionAttempts==="invertFirst",g=a.binarize(f,h,m,y),w=g.binarized,E=g.inverted,C=u(b?E:w);return!C&&(v.inversionAttempts==="attemptBoth"||v.inversionAttempts==="invertFirst")&&(C=u(b?w:E)),C}x.default=x,n.default=x},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(0),o=8,l=24;function c(x,f,h){return x<f?f:x>h?h:x}var u=function(){function x(f,h){this.width=f,this.data=new Uint8ClampedArray(f*h)}return x.prototype.get=function(f,h){return this.data[h*this.width+f]},x.prototype.set=function(f,h,m){this.data[h*this.width+f]=m},x}();function d(x,f,h,m){if(x.length!==f*h*4)throw new Error("Malformed data passed to binarizer.");for(var p=new u(f,h),v=0;v<f;v++)for(var y=0;y<h;y++){var b=x[(y*f+v)*4+0],g=x[(y*f+v)*4+1],w=x[(y*f+v)*4+2];p.set(v,y,.2126*b+.7152*g+.0722*w)}for(var E=Math.ceil(f/o),C=Math.ceil(h/o),j=new u(E,C),S=0;S<C;S++)for(var _=0;_<E;_++){for(var O=0,I=1/0,B=0,y=0;y<o;y++)for(var v=0;v<o;v++){var T=p.get(_*o+v,S*o+y);O+=T,I=Math.min(I,T),B=Math.max(B,T)}var k=O/Math.pow(o,2);if(B-I<=l&&(k=I/2,S>0&&_>0)){var $=(j.get(_,S-1)+2*j.get(_-1,S)+j.get(_-1,S-1))/4;I<$&&(k=$)}j.set(_,S,k)}var W=a.BitMatrix.createEmpty(f,h),z=null;m&&(z=a.BitMatrix.createEmpty(f,h));for(var S=0;S<C;S++)for(var _=0;_<E;_++){for(var L=c(_,2,E-3),F=c(S,2,C-3),O=0,U=-2;U<=2;U++)for(var D=-2;D<=2;D++)O+=j.get(L+U,F+D);for(var N=O/25,U=0;U<o;U++)for(var D=0;D<o;D++){var v=_*o+U,y=S*o+D,K=p.get(v,y);W.set(v,y,K<=N),m&&z.set(v,y,!(K<=N))}}return m?{binarized:W,inverted:z}:{binarized:W}}n.binarize=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(0),o=i(6),l=i(9),c=i(10);function u(w,E){for(var C=w^E,j=0;C;)j++,C&=C-1;return j}function d(w,E){return E<<1|w}var x=[{bits:21522,formatInfo:{errorCorrectionLevel:1,dataMask:0}},{bits:20773,formatInfo:{errorCorrectionLevel:1,dataMask:1}},{bits:24188,formatInfo:{errorCorrectionLevel:1,dataMask:2}},{bits:23371,formatInfo:{errorCorrectionLevel:1,dataMask:3}},{bits:17913,formatInfo:{errorCorrectionLevel:1,dataMask:4}},{bits:16590,formatInfo:{errorCorrectionLevel:1,dataMask:5}},{bits:20375,formatInfo:{errorCorrectionLevel:1,dataMask:6}},{bits:19104,formatInfo:{errorCorrectionLevel:1,dataMask:7}},{bits:30660,formatInfo:{errorCorrectionLevel:0,dataMask:0}},{bits:29427,formatInfo:{errorCorrectionLevel:0,dataMask:1}},{bits:32170,formatInfo:{errorCorrectionLevel:0,dataMask:2}},{bits:30877,formatInfo:{errorCorrectionLevel:0,dataMask:3}},{bits:26159,formatInfo:{errorCorrectionLevel:0,dataMask:4}},{bits:25368,formatInfo:{errorCorrectionLevel:0,dataMask:5}},{bits:27713,formatInfo:{errorCorrectionLevel:0,dataMask:6}},{bits:26998,formatInfo:{errorCorrectionLevel:0,dataMask:7}},{bits:5769,formatInfo:{errorCorrectionLevel:3,dataMask:0}},{bits:5054,formatInfo:{errorCorrectionLevel:3,dataMask:1}},{bits:7399,formatInfo:{errorCorrectionLevel:3,dataMask:2}},{bits:6608,formatInfo:{errorCorrectionLevel:3,dataMask:3}},{bits:1890,formatInfo:{errorCorrectionLevel:3,dataMask:4}},{bits:597,formatInfo:{errorCorrectionLevel:3,dataMask:5}},{bits:3340,formatInfo:{errorCorrectionLevel:3,dataMask:6}},{bits:2107,formatInfo:{errorCorrectionLevel:3,dataMask:7}},{bits:13663,formatInfo:{errorCorrectionLevel:2,dataMask:0}},{bits:12392,formatInfo:{errorCorrectionLevel:2,dataMask:1}},{bits:16177,formatInfo:{errorCorrectionLevel:2,dataMask:2}},{bits:14854,formatInfo:{errorCorrectionLevel:2,dataMask:3}},{bits:9396,formatInfo:{errorCorrectionLevel:2,dataMask:4}},{bits:8579,formatInfo:{errorCorrectionLevel:2,dataMask:5}},{bits:11994,formatInfo:{errorCorrectionLevel:2,dataMask:6}},{bits:11245,formatInfo:{errorCorrectionLevel:2,dataMask:7}}],f=[function(w){return(w.y+w.x)%2===0},function(w){return w.y%2===0},function(w){return w.x%3===0},function(w){return(w.y+w.x)%3===0},function(w){return(Math.floor(w.y/2)+Math.floor(w.x/3))%2===0},function(w){return w.x*w.y%2+w.x*w.y%3===0},function(w){return(w.y*w.x%2+w.y*w.x%3)%2===0},function(w){return((w.y+w.x)%2+w.y*w.x%3)%2===0}];function h(w){var E=17+4*w.versionNumber,C=a.BitMatrix.createEmpty(E,E);C.setRegion(0,0,9,9,!0),C.setRegion(E-8,0,8,9,!0),C.setRegion(0,E-8,9,8,!0);for(var j=0,S=w.alignmentPatternCenters;j<S.length;j++)for(var _=S[j],O=0,I=w.alignmentPatternCenters;O<I.length;O++){var B=I[O];_===6&&B===6||_===6&&B===E-7||_===E-7&&B===6||C.setRegion(_-2,B-2,5,5,!0)}return C.setRegion(6,9,1,E-17,!0),C.setRegion(9,6,E-17,1,!0),w.versionNumber>6&&(C.setRegion(E-11,0,3,6,!0),C.setRegion(0,E-11,6,3,!0)),C}function m(w,E,C){for(var j=f[C.dataMask],S=w.height,_=h(E),O=[],I=0,B=0,T=!0,k=S-1;k>0;k-=2){k===6&&k--;for(var $=0;$<S;$++)for(var W=T?S-1-$:$,z=0;z<2;z++){var L=k-z;if(!_.get(L,W)){B++;var F=w.get(L,W);j({y:W,x:L})&&(F=!F),I=d(F,I),B===8&&(O.push(I),B=0,I=0)}}T=!T}return O}function p(w){var E=w.height,C=Math.floor((E-17)/4);if(C<=6)return c.VERSIONS[C-1];for(var j=0,S=5;S>=0;S--)for(var _=E-9;_>=E-11;_--)j=d(w.get(_,S),j);for(var O=0,_=5;_>=0;_--)for(var S=E-9;S>=E-11;S--)O=d(w.get(_,S),O);for(var I=1/0,B,T=0,k=c.VERSIONS;T<k.length;T++){var $=k[T];if($.infoBits===j||$.infoBits===O)return $;var W=u(j,$.infoBits);
976W<I&&(B=$,I=W),W=u(O,$.infoBits),W<I&&(B=$,I=W)}if(I<=3)return B}function v(w){for(var E=0,C=0;C<=8;C++)C!==6&&(E=d(w.get(C,8),E));for(var j=7;j>=0;j--)j!==6&&(E=d(w.get(8,j),E));for(var S=w.height,_=0,j=S-1;j>=S-7;j--)_=d(w.get(8,j),_);for(var C=S-8;C<S;C++)_=d(w.get(C,8),_);for(var O=1/0,I=null,B=0,T=x;B<T.length;B++){var k=T[B],$=k.bits,W=k.formatInfo;if($===E||$===_)return W;var z=u(E,$);z<O&&(I=W,O=z),E!==_&&(z=u(_,$),z<O&&(I=W,O=z))}return O<=3?I:null}function y(w,E,C){var j=E.errorCorrectionLevels[C],S=[],_=0;if(j.ecBlocks.forEach(function(F){for(var U=0;U<F.numBlocks;U++)S.push({numDataCodewords:F.dataCodewordsPerBlock,codewords:[]}),_+=F.dataCodewordsPerBlock+j.ecCodewordsPerBlock}),w.length<_)return null;w=w.slice(0,_);for(var O=j.ecBlocks[0].dataCodewordsPerBlock,I=0;I<O;I++)for(var B=0,T=S;B<T.length;B++){var k=T[B];k.codewords.push(w.shift())}if(j.ecBlocks.length>1)for(var $=j.ecBlocks[0].numBlocks,W=j.ecBlocks[1].numBlocks,I=0;I<W;I++)S[$+I].codewords.push(w.shift());for(;w.length>0;)for(var z=0,L=S;z<L.length;z++){var k=L[z];k.codewords.push(w.shift())}return S}function b(w){var E=p(w);if(!E)return null;var C=v(w);if(!C)return null;var j=m(w,E,C),S=y(j,E,C.errorCorrectionLevel);if(!S)return null;for(var _=S.reduce(function(z,L){return z+L.numDataCodewords}
976,0),O=new Uint8ClampedArray(_),I=0,B=0,T=S;B<T.length;B++){var k=T[B],$=l.decode(k.codewords,k.codewords.length-k.numDataCodewords);if(!$)return null;for(var W=0;W<k.numDataCodewords;W++)O[I++]=$[W]}try{return o.decode(O,E.versionNumber)}catch{return null}}function g(w){if(w==null)return null;var E=b(w);if(E)return E;for(var C=0;C<w.width;C++)for(var j=C+1;j<w.height;j++)w.get(C,j)!==w.get(j,C)&&(w.set(C,j,!w.get(C,j)),w.set(j,C,!w.get(j,C)));return b(w)}n.decode=g},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(7),o=i(8),l;(function(p){p.Numeric="numeric",p.Alphanumeric="alphanumeric",p.Byte="byte",p.Kanji="kanji",p.ECI="eci"})(l=n.Mode||(n.Mode={}));var c;(function(p){p[p.Terminator=0]="Terminator",p[p.Numeric=1]="Numeric",p[p.Alphanumeric=2]="Alphanumeric",p[p.Byte=4]="Byte",p[p.Kanji=8]="Kanji",p[p.ECI=7]="ECI"})(c||(c={}));function u(p,v){for(var y=[],b="",g=[10,12,14][v],w=p.readBits(g);w>=3;){var E=p.readBits(10);if(E>=1e3)throw new Error("Invalid numeric value above 999");var C=Math.floor(E/100),j=Math.floor(E/10)%10,S=E%10;y.push(48+C,48+j,48+S),b+=C.toString()+j.toString()+S.toString(),w-=3}if(w===2){var E=p.readBits(7);if(E>=100)throw new Error("Invalid numeric value above 99");var C=Math.floor(E/10),j=E%10;y.push(48+C,48+j),b+=C.toString()+j.toString()}else if(w===1){var E=p.readBits(4);if(E>=10)throw new Error("Invalid numeric value above 9");y.push(48+E),b+=E.toString()}return{bytes:y,text:b}}var d=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function x(p,v){for(var y=[],b="",g=[9,11,13][v],w=p.readBits(g);w>=2;){var E=p.readBits(11),C=Math.floor(E/45),j=E%45;y.push(d[C].charCodeAt(0),d[j].charCodeAt(0)),b+=d[C]+d[j],w-=2}if(w===1){var C=p.readBits(6);y.push(d[C].charCodeAt(0)),b+=d[C]}return{bytes:y,text:b}}function f(p,v){for(var y=[],b="",g=[8,16,16][v],w=p.readBits(g),E=0;E<w;E++){var C=p.readBits(8);y.push(C)}try{b+=decodeURIComponent(y.map(function(j){return"%"+("0"+j.toString(16)).substr(-2)}).join(""))}catch{}return{bytes:y,text:b}}function h(p,v){for(var y=[],b="",g=[8,10,12][v],w=p.readBits(g),E=0;E<w;E++){var C=p.readBits(13),j=Math.floor(C/192)<<8|C%192;j<7936?j+=33088:j+=49472,y.push(j>>8,j&255),b+=String.fromCharCode(o.shiftJISTable[j])}return{bytes:y,text:b}}function m(p,v){for(var y,b,g,w,E=new a.BitStream(p),C=v<=9?0:v<=26?1:2,j={text:"",bytes:[],chunks:[],version:v};E.available()>=4;){var S=E.readBits(4);if(S===c.Terminator)return j;if(S===c.ECI)E.readBits(1)===0?j.chunks.push({type:l.ECI,assignmentNumber:E.readBits(7)}):E.readBits(1)===0?j.chunks.push({type:l.ECI,assignmentNumber:E.readBits(14)}):E.readBits(1)===0?j.chunks.push({type:l.ECI,assignmentNumber:E.readBits(21)}):j.chunks.push({type:l.ECI,assignmentNumber:-1});else if(S===c.Numeric){var _=u(E,C);j.text+=_.text,(y=j.bytes).push.apply(y,_.bytes),j.chunks.push({type:l.Numeric,text:_.text})}else if(S===c.Alphanumeric){var O=x(E,C);j.text+=O.text,(b=j.bytes).push.apply(b,O.bytes),j.chunks.push({type:l.Alphanumeric,text:O.text})}else if(S===c.Byte){var I=f(E,C);j.text+=I.text,(g=j.bytes).push.apply(g,I.bytes),j.chunks.push({type:l.Byte,bytes:I.bytes,text:I.text})}else if(S===c.Kanji){var B=h(E,C);j.text+=B.text,(w=j.bytes).push.apply(w,B.bytes),j.chunks.push({type:l.Kanji,bytes:B.bytes,text:B.text})}}if(E.available()===0||E.readBits(E.available())===0)return j}n.decode=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function o(l){this.byteOffset=0,this.bitOffset=0,this.bytes=l}return o.prototype.readBits=function(l){if(l<1||l>32||l>this.available())throw new Error("Cannot read "+l.toString()+" bits");var c=0;if(this.bitOffset>0){var u=8-this.bitOffset,d=l<u?l:u,x=u-d,f=255>>8-d<<x;c=(this.bytes[this.byteOffset]&f)>>x,l-=d,this.bitOffset+=d,this.bitOffset===8&&(this.bitOffset=0,this.byteOffset++)}if(l>0){for(;l>=8;)c=c<<8|this.bytes[this.byteOffset]&255,this.byteOffset++,l-=8;if(l>0){var x=8-l,f=255>>x<<x;c=c<<l|(this.bytes[this.byteOffset]&f)>>x,this.bitOffset+=l}}return c},o.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},o}();n.BitStream=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n
vendor: 83,516 bytes, line 976
976.shiftJISTable={32:32,33:33,34:34,35:35,36:36,37:37,38:38,39:39,40:40,41:41,42:42,43:43,44:44,45:45,46:46,47:47,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,56:56,57:57,58:58,59:59,60:60,61:61,62:62,63:63,64:64,65:65,66:66,67:67,68:68,69:69,70:70,71:71,72:72,73:73,74:74,75:75,76:76,77:77,78:78,79:79,80:80,81:81,82:82,83:83,84:84,85:85,86:86,87:87,88:88,89:89,90:90,91:91,92:165,93:93,94:94,95:95,96:96,97:97,98:98,99:99,100:100,101:101,102:102,103:103,104:104,105:105,106:106,107:107,108:108,109:109,110:110,111:111,112:112,113:113,114:114,115:115,116:116,117:117,118:118,119:119,120:120,121:121,122:122,123:123,124:124,125:125,126:8254,33088:12288,33089:12289,33090:12290,33091:65292,33092:65294,33093:12539,33094:65306,33095:65307,33096:65311,33097:65281,33098:12443,33099:12444,33100:180,33101:65344,33102:168,33103:65342,33104:65507,33105:65343,33106:12541,33107:12542,33108:12445,33109:12446,33110:12291,33111:20189,33112:12293,33113:12294,33114:12295,33115:12540,33116:8213,33117:8208,33118:65295,33119:92,33120:12316,33121:8214,33122:65372,33123:8230,33124:8229,33125:8216,33126:8217,33127:8220,33128:8221,33129:65288,33130:65289,33131:12308,33132:12309,33133:65339,33134:65341,33135:65371,33136:65373,33137:12296,33138:12297,33139:12298,33140:12299,33141:12300,33142:12301,33143:12302,33144:12303,33145:12304,33146:12305,33147:65291,33148:8722,33149:177,33150:215,33152:247,33153:65309,33154:8800,33155:65308,33156:65310,33157:8806,33158:8807,33159:8734,33160:8756,33161:9794,33162:9792,33163:176,33164:8242,33165:8243,33166:8451,33167:65509,33168:65284,33169:162,33170:163,33171:65285,33172:65283,33173:65286,33174:65290,33175:65312,33176:167,33177:9734,33178:9733,33179:9675,33180:9679,33181:9678,33182:9671,33183:9670,33184:9633,33185:9632,33186:9651,33187:9650,33188:9661,33189:9660,33190:8251,33191:12306,33192:8594,33193:8592,33194:8593,33195:8595,33196:12307,33208:8712,33209:8715,33210:8838,33211:8839,33212:8834,33213:8835,33214:8746,33215:8745,33224:8743,33225:8744,33226:172,33227:8658,33228:8660,33229:8704,33230:8707,33242:8736,33243:8869,33244:8978,33245:8706,33246:8711,33247:8801,33248:8786,33249:8810,33250:8811,33251:8730,33252:8765,33253:8733,33254:8757,33255:8747,33256:8748,33264:8491,33265:8240,33266:9839,33267:9837,33268:9834,33269:8224,33270:8225,33271:182,33276:9711,33359:65296,33360:65297,33361:65298,33362:65299,33363:65300,33364:65301,33365:65302,33366:65303,33367:65304,33368:65305,33376:65313,33377:65314,33378:65315,33379:65316,33380:65317,33381:65318,33382:65319,33383:65320,33384:65321,33385:65322,33386:65323,33387:65324,33388:65325,33389:65326,33390:65327,33391:65328,33392:65329,33393:65330,33394:65331,33395:65332,33396:65333,33397:65334,33398:65335,33399:65336,33400:65337,33401:65338,33409:65345,33410:65346,33411:65347,33412:65348,33413:65349,33414:65350,33415:65351,33416:65352,33417:65353,33418:65354,33419:65355,33420:65356,33421:65357,33422:65358,33423:65359,33424:65360,33425:65361,33426:65362,33427:65363,33428:65364,33429:65365,33430:65366,33431:65367,33432:65368,33433:65369,33434:65370,33439:12353,33440:12354,33441:12355,33442:12356,33443:12357,33444:12358,33445:12359,33446:12360,33447:12361,33448:12362,33449:12363,33450:12364,33451:12365,33452:12366,33453:12367,33454:12368,33455:12369,33456:12370,33457:12371,33458:12372,33459:12373,33460:12374,33461:12375,33462:12376,33463:12377,33464:12378,33465:12379,33466:12380,33467:12381,33468:12382,33469:12383,33470:12384,33471:12385,33472:12386,33473:12387,33474:12388,33475:12389,33476:12390,33477:12391,33478:12392,33479:12393,33480:12394,33481:12395,33482:12396,33483:12397,33484:12398,33485:12399,33486:12400,33487:12401,33488:12402,33489:12403,33490:12404,33491:12405,33492:12406,33493:12407,33494:12408,33495:12409,33496:12410,33497:12411,33498:12412,33499:12413,33500:12414,33501:12415,33502:12416,33503:12417,33504:12418,33505:12419,33506:12420,33507:12421,33508:12422,33509:12423,33510:12424,33511:12425,33512:12426,33513:12427,33514:12428,33515:12429,33516:12430,33517:12431,33518:12432,33519:12433,33520:12434,33521:12435,33600:12449,33601:12450,33602:12451,33603:12452,33604:12453,33605:12454,33606:12455,33607:12456,33608:12457,33609:12458,33610:12459,33611:12460,33612:12461,33613:12462,33614:12463,33615:12464,33616:12465,33617:12466,33618:12467,33619:12468,33620:12469,33621:12470,33622:12471,33623:12472,33624:12473,33625:12474,33626:12475,33627:12476,33628:12477,33629:12478,33630:12479,33631:12480,33632:12481,33633:12482,33634:12483,33635:12484,33636:12485,33637:12486,33638:12487,33639:12488,33640:12489,33641:12490,33642:12491,33643:12492,33644:12493,33645:12494,33646:12495,33647:12496,33648:12497,33649:12498,33650:12499,33651:12500,33652:12501,33653:12502,33654:12503,33655:12504,33656:12505,33657:12506,33658:12507,33659:12508,33660:12509,33661:12510,33662:12511,33664:12512,33665:12513,33666:12514,33667:12515,33668:12516,33669:12517,33670:12518,33671:12519,33672:12520,33673:12521,33674:12522,33675:12523,33676:12524,33677:12525,33678:12526,33679:12527,33680:12528,33681:12529,33682:12530,33683:12531,33684:12532,33685:12533,33686:12534,33695:913,33696:914,33697:915,33698:916,33699:917,33700:918,33701:919,33702:920,33703:921,33704:922,33705:923,33706:924,33707:925,33708:926,33709:927,33710:928,33711:929,33712:931,33713:932,33714:933,33715:934,33716:935,33717:936,33718:937,33727:945,33728:946,33729:947,33730:948,33731:949,33732:950,33733:951,33734:952,33735:953,33736:954,33737:955,33738:956,33739:957,33740:958,33741:959,33742:960,33743:961,33744:963,33745:964,33746:965,33747:966,33748:967,33749:968,33750:969,33856:1040,33857:1041,33858:1042,33859:1043,33860:1044,33861:1045,33862:1025,33863:1046,33864:1047,33865:1048,33866:1049,33867:1050,33868:1051,33869:1052,33870:1053,33871:1054,33872:1055,33873:1056,33874:1057,33875:1058,33876:1059,33877:1060,33878:1061,33879:1062,33880:1063,33881:1064,33882:1065,33883:1066,33884:1067,33885:1068,33886:1069,33887:1070,33888:1071,33904:1072,33905:1073,33906:1074,33907:1075,33908:1076,33909:1077,33910:1105,33911:1078,33912:1079,33913:1080,33914:1081,33915:1082,33916:1083,33917:1084,33918:1085,33920:1086,33921:1087,33922:1088,33923:1089,33924:1090,33925:1091,33926:1092,33927:1093,33928:1094,33929:1095,33930:1096,33931:1097,33932:1098,33933:1099,33934:1100,33935:1101,33936:1102,33937:1103,33951:9472,33952:9474,33953:9484,33954:9488,33955:9496,33956:9492,33957:9500,33958:9516,33959:9508,33960:9524,33961:9532,33962:9473,33963:9475,33964:9487,33965:9491,33966:9499,33967:9495,33968:9507,33969:9523,33970:9515,33971:9531,33972:9547,33973:9504,33974:9519,33975:9512,33976:9527,33977:9535,33978:9501,33979:9520,33980:9509,33981:9528,33982:9538,34975:20124,34976:21782,34977:23043,34978:38463,34979:21696,34980:24859,34981:25384,34982:23030,34983:36898,34984:33909,34985:33564,34986:31312,34987:24746,34988:25569,34989:28197,34990:26093,34991:33894,34992:33446,34993:39925,34994:26771,34995:22311,34996:26017,34997:25201,34998:23451,34999:22992,35e3:34427,35001:39156,35002:32098,35003:32190,35004:39822,35005:25110,35006:31903,35007:34999,35008:23433,35009:24245,35010:25353,35011:26263,35012:26696,35013:38343,35014:38797,35015:26447,35016:20197,35017:20234,35018:20301,35019:20381,35020:20553,35021:22258,35022:22839,35023:22996,35024:23041,35025:23561,35026:24799,35027:24847,35028:24944,35029:26131,35030:26885,35031:28858,35032:30031,35033:30064,35034:31227,35035:32173,35036:32239,35037:32963,35038:33806,35039:34915,35040:35586,35041:36949,35042:36986,35043:21307,35044:20117,35045:20133,35046:22495,35047:32946,35048:37057,35049:30959,35050:19968,35051:22769,35052:28322,35053:36920,35054:31282,35055:33576,35056:33419,35057:39983,35058:20801,35059:21360,35060:21693,35061:21729,35062:22240,35063:23035,35064:24341,35065:39154,35066:28139,35067:32996,35068:34093,35136:38498,35137:38512,35138:38560,35139:38907,35140:21515,35141:21491,35142:23431,35143:28879,35144:32701,35145:36802,35146:38632,35147:21359,35148:40284,35149:31418,35150:19985,35151:30867,35152:33276,35153:28198,35154:22040,35155:21764,35156:27421,35157:34074,35158:39995,35159:23013,35160:21417,35161:28006,35162:29916,35163:38287,35164:22082,35165:20113,35166:36939,35167:38642,35168:33615,35169:39180,35170:21473,35171:21942,35172:23344,35173:24433,35174:26144,35175:26355,35176:26628,35177:27704,35178:27891,35179:27945,35180:29787,35181:30408,35182:31310,35183:38964,35184:33521,35185:34907,35186:35424,35187:37613,35188:28082,35189:30123,35190:30410,35191:39365,35192:24742,35193:35585,35194:36234,35195:38322,35196:27022,35197:21421,35198:20870,35200:22290,35201:22576,35202:22852,35203:23476,35204:24310,35205:24616,35206:25513,35207:25588,35208:27839,35209:28436,35210:28814,35211:28948,35212:29017,35213:29141,35214:29503,35215:32257,35216:33398,35217:33489,35218:34199,35219:36960,35220:37467,35221:40219,35222:22633,35223:26044,35224:27738,35225:29989,35226:20985,35227:22830,35228:22885,35229:24448,35230:24540,35231:25276,35232:26106,35233:27178,35234:27431,35235:27572,35236:29579,35237:32705,35238:35158,35239:40236,35240:40206,35241:40644,35242:23713,35243:27798,35244:33659,35245:20740,35246:23627,35247:25014,35248:33222,35249:26742,35250:29281,35251:20057,35252:20474,35253:21368,35254:24681,35255:28201,35256:31311,35257:38899,35258:19979,35259:21270,35260:20206,35261:20309,35262:20285,35263:20385,35264:20339,35265:21152,35266:21487,35267:22025,35268:22799,35269:23233,35270:23478,35271:23521,35272:31185,35273:26247,35274:26524,35275:26550,35276:27468,35277:27827,35278:28779,35279:29634,35280:31117,35281:31166,35282:31292,35283:31623,35284:33457,35285:33499,35286:33540,35287:33655,35288:33775,35289:33747,35290:34662,35291:35506,35292:22057,35293:36008,35294:36838,35295:36942,35296:38686,35297:34442,35298:20420,35299:23784,35300:25105,35301:29273,35302:30011,35303:33253,35304:33469,35305:34558,35306:36032,35307:38597,35308:39187,35309:39381,35310:20171,35311:20250,35312:35299,35313:22238,35314:22602,35315:22730,35316:24315,35317:24555,35318:24618,35319:24724,35320:24674,35321:25040,35322:25106,35323:25296,35324:25913,35392:39745,35393:26214,35394:26800,35395:28023,35396:28784,35397:30028,35398:30342,35399:32117,35400:33445,35401:34809,35402:38283,35403:38542,35404:35997,35405:20977,35406:21182,35407:22806,35408:21683,35409:23475,35410:23830,35411:24936,35412:27010,35413:28079,35414:30861,35415:33995,35416:34903,35417:35442,35418:37799,35419:39608,35420:28012,35421:39336,35422:34521,35423:22435,35424:26623,35425:34510,35426:37390,35427:21123,35428:22151,35429:21508,35430:24275,35431:25313,35432:25785,35433:26684,35434:26680,35435:27579,35436:29554,35437:30906,35438:31339,35439:35226,35440:35282,35441:36203,35442:36611,35443:37101,35444:38307,35445:38548,35446:38761,35447:23398,35448:23731,35449:27005,35450:38989,35451:38990,35452:25499,35453:31520,35454:27179,35456:27263,35457:26806,35458:39949,35459:28511,35460:21106,35461:21917,35462:24688,35463:25324,35464:27963,35465:28167,35466:28369,35467:33883,35468:35088,35469:36676,35470:19988,35471:39993,35472:21494,35473:26907,35474:27194,35475:38788,35476:26666,35477:20828,35478:31427,35479:33970,35480:37340,35481:37772,35482:22107,35483:40232,35484:26658,35485:33541,35486:33841,35487:31909,35488:21e3,35489:33477,35490:29926,35491:20094,35492:20355,35493:20896,35494:23506,35495:21002,35496:21208,35497:21223,35498:24059,35499:21914,35500:22570,35501:23014,35502:23436,35503:23448,35504:23515,35505:24178,35506:24185,35507:24739,35508:24863,35509:24931,35510:25022,35511:25563,35512:25954,35513:26577,35514:26707,35515:26874,35516:27454,35517:27475,35518:27735,35519:28450,35520:28567,35521:28485,35522:29872,35523:29976,35524:30435,35525:30475,35526:31487,35527:31649,35528:31777,35529:32233,35530:32566,35531:32752,35532:32925,35533:33382,35534:33694,35535:35251,35536:35532,35537:36011,35538:36996,35539:37969,35540:38291,35541:38289,35542:38306,35543:38501,35544:38867,35545:39208,35546:33304,35547:20024,35548:21547,35549:23736,35550:24012,35551:29609,35552:30284,35553:30524,35554:23721,35555:32747,35556:36107,35557:38593,35558:38929,35559:38996,35560:39e3,35561:20225,35562:20238,35563:21361,35564:21916,35565:22120,35566:22522,35567:22855,35568:23305,35569:23492,35570:23696,35571:24076,35572:24190,35573:24524,35574:25582,35575:26426,35576:26071,35577:26082,35578:26399,35579:26827,35580:26820,35648:27231,35649:24112,35650:27589,35651:27671,35652:27773,35653:30079,35654:31048,35655:23395,35656:31232,35657:32e3,35658:24509,35659:35215,35660:35352,35661:36020,35662:36215,35663:36556,35664:36637,35665:39138,35666:39438,35667:39740,35668:20096,35669:20605,35670:20736,35671:22931,35672:23452,35673:25135,35674:25216,35675:25836,35676:27450,35677:29344,35678:30097,35679:31047,35680:32681,35681:34811,35682:35516,35683:35696,35684:25516,35685:33738,35686:38816,35687:21513,35688:21507,35689:21931,35690:26708,35691:27224,35692:35440,35693:30759,35694:26485,35695:40653,35696:21364,35697:23458,35698:33050,35699:34384,35700:36870,35701:19992,35702:20037,35703:20167,35704:20241,35705:21450,35706:21560,35707:23470,35708:24339,35709:24613,35710:25937,35712:26429,35713:27714,35714:27762,35715:27875,35716:28792,35717:29699,35718:31350,35719:31406,35720:31496,35721:32026,35722:31998,35723:32102,35724:26087,35725:29275,35726:21435,35727:23621,35728:24040,35729:25298,35730:25312,35731:25369,35732:28192,35733:34394,35734:35377,35735:36317,35736:37624,35737:28417,35738:31142,35739:39770,35740:20136,35741:20139,35742:20140,35743:20379,35744:20384,35745:20689,35746:20807,35747:31478,35748:20849,35749:20982,35750:21332,35751:21281,35752:21375,35753:21483,35754:21932,35755:22659,35756:23777,35757:24375,35758:24394,35759:24623,35760:24656,35761:24685,35762:25375,35763:25945,35764:27211,35765:27841,35766:29378,35767:29421,35768:30703,35769:33016,35770:33029,35771:33288,35772:34126,35773:37111,35774:37857,35775:38911,35776:39255,35777:39514,35778:20208,35779:20957,35780:23597,35781:26241,35782:26989,35783:23616,35784:26354,35785:26997,35786:29577,35787:26704,35788:31873,35789:20677,35790:21220,35791:22343,35792:24062,35793:37670,35794:26020,35795:27427,35796:27453,35797:29748,35798:31105,35799:31165,35800:31563,35801:32202,35802:33465,35803:33740,35804:34943,35805:35167,35806:35641,35807:36817,35808:37329,35809:21535,35810:37504,35811:20061,35812:20534,35813:21477,35814:21306,35815:29399,35816:29590,35817:30697,35818:33510,35819:36527,35820:39366,35821:39368,35822:39378,35823:20855,35824:24858,35825:34398,35826:21936,35827:31354,35828:20598,35829:23507,35830:36935,35831:38533,35832:20018,35833:27355,35834:37351,35835:23633,35836:23624,35904:25496,35905:31391,35906:27795,35907:38772,35908:36705,35909:31402,35910:29066,35911:38536,35912:31874,35913:26647,35914:32368,35915:26705,35916:37740,35917:21234,35918:21531,35919:34219,35920:35347,35921:32676,35922:36557,35923:37089,35924:21350,35925:34952,35926:31041,35927:20418,35928:20670,35929:21009,35930:20804,35931:21843,35932:22317,35933:29674,35934:22411,35935:22865,35936:24418,35937:24452,35938:24693,35939:24950,35940:24935,35941:25001,35942:25522,35943:25658,35944:25964,35945:26223,35946:26690,35947:28179,35948:30054,35949:31293,35950:31995,35951:32076,35952:32153,35953:32331,35954:32619,35955:33550,35956:33610,35957:34509,35958:35336,35959:35427,35960:35686,35961:36605,35962:38938,35963:40335,35964:33464,35965:36814,35966:39912,35968:21127,35969:25119,35970:25731,35971:28608,35972:38553,35973:26689,35974:20625,35975:27424,35976:27770,35977:28500,35978:31348,35979:32080,35980:34880,35981:35363,35982:26376,35983:20214,35984:20537,35985:20518,35986:20581,35987:20860,35988:21048,35989:21091,35990:21927,35991:22287,35992:22533,35993:23244,35994:24314,35995:25010,35996:25080,35997:25331,35998:25458,35999:26908,36e3:27177,36001:29309,36002:29356,36003:29486,36004:30740,36005:30831,36006:32121,36007:30476,36008:32937,36009:35211,36010:35609,36011:36066,36012:36562,36013:36963,36014:37749,36015:38522,36016:38997,36017:39443,36018:40568,36019:20803,36020:21407,36021:21427,36022:24187,36023:24358,36024:28187,36025:28304,36026:29572,36027:29694,36028:32067,36029:33335,36030:35328,36031:35578,36032:38480,36033:20046,36034:20491,36035:21476,36036:21628,36037:22266,36038:22993,36039:23396,36040:24049,36041:24235,36042:24359,36043:25144,36044:25925,36045:26543,36046:28246,36047:29392,36048:31946,36049:34996,36050:32929,36051:32993,36052:33776,36053:34382,36054:35463,36055:36328,36056:37431,36057:38599,36058:39015,36059:40723,36060:20116,36061:20114,36062:20237,36063:21320,36064:21577,36065:21566,36066:23087,36067:24460,36068:24481,36069:24735,36070:26791,36071:27278,36072:29786,36073:30849,36074:35486,36075:35492,36076:35703,36077:37264,36078:20062,36079:39881,36080:20132,36081:20348,36082:20399,36083:20505,36084:20502,36085:20809,36086:20844,36087:21151,36088:21177,36089:21246,36090:21402,36091:21475,36092:21521,36160:21518,36161:21897,36162:22353,36163:22434,36164:22909,36165:23380,36166:23389,36167:23439,36168:24037,36169:24039,36170:24055,36171:24184,36172:24195,36173:24218,36174:24247,36175:24344,36176:24658,36177:24908,36178:25239,36179:25304,36180:25511,36181:25915,36182:26114,36183:26179,36184:26356,36185:26477,36186:26657,36187:26775,36188:27083,36189:27743,36190:27946,36191:28009,36192:28207,36193:28317,36194:30002,36195:30343,36196:30828,36197:31295,36198:31968,36199:32005,36200:32024,36201:32094,36202:32177,36203:32789,36204:32771,36205:32943,36206:32945,36207:33108,36208:33167,36209:33322,36210:33618,36211:34892,36212:34913,36213:35611,36214:36002,36215:36092,36216:37066,36217:37237,36218:37489,36219:30783,36220:37628,36221:38308,36222:38477,36224:38917,36225:39321,36226:39640,36227:40251,36228:21083,36229:21163,36230:21495,36231:21512,36232:22741,36233:25335,36234:28640,36235:35946,36236:36703,36237:40633,36238:20811,36239:21051,36240:21578,36241:22269,36242:31296,36243:37239,36244:40288,36245:40658,36246:29508,36247:28425,36248:33136,36249:29969,36250:24573,36251:24794,36252:39592,36253:29403,36254:36796,36255:27492,36256:38915,36257:20170,36258:22256,36259:22372,36260:22718,36261:23130,36262:24680,36263:25031,36264:26127,36265:26118,36266:26681,36267:26801,36268:28151,36269:30165,36270:32058,36271:33390,36272:39746,36273:20123,36274:20304,36275:21449,36276:21766,36277:23919,36278:24038,36279:24046,36280:26619,36281:27801,36282:29811,36283:30722,36284:35408,36285:37782,36286:35039,36287:22352,36288:24231,36289:25387,36290:20661,36291:20652,36292:20877,36293:26368,36294:21705,36295:22622,36296:22971,36297:23472,36298:24425,36299:25165,36300:25505,36301:26685,36302:27507,36303:28168,36304:28797,36305:37319,36306:29312,36307:30741,36308:30758,36309:31085,36310:25998,36311:32048,36312:33756,36313:35009,36314:36617,36315:38555,36316:21092,36317:22312,36318:26448,36319:32618,36320:36001,36321:20916,36322:22338,36323:38442,36324:22586,36325:27018,36326:32948,36327:21682,36328:23822,36329:22524,36330:30869,36331:40442,36332:20316,36333:21066,36334:21643,36335:25662,36336:26152,36337:26388,36338:26613,36339:31364,36340:31574,36341:32034,36342:37679,36343:26716,36344:39853,36345:31545,36346:21273,36347:20874,36348:21047,36416:23519,36417:25334,36418:25774,36419:25830,36420:26413,36421:27578,36422:34217,36423:38609,36424:30352,36425:39894,36426:25420,36427:37638,36428:39851,36429:30399,36430:26194,36431:19977,36432:20632,36433:21442,36434:23665,36435:24808,36436:25746,36437:25955,36438:26719,36439:29158,36440:29642,36441:29987,36442:31639,36443:32386,36444:34453,36445:35715,36446:36059,36447:37240,36448:39184,36449:26028,36450:26283,36451:27531,36452:20181,36453:20180,36454:20282,36455:20351,36456:21050,36457:21496,36458:21490,36459:21987,36460:22235,36461:22763,36462:22987,36463:22985,36464:23039,36465:23376,36466:23629,36467:24066,36468:24107,36469:24535,36470:24605,36471:25351,36472:25903,36473:23388,36474:26031,36475:26045,36476:26088,36477:26525,36478:27490,36480:27515,36481:27663,36482:29509,36483:31049,36484:31169,36485:31992,36486:32025,36487:32043,36488:32930,36489:33026,36490:33267,36491:35222,36492:35422,36493:35433,36494:35430,36495:35468,36496:35566,36497:36039,36498:36060,36499:38604,36500:39164,36501:27503,36502:20107,36503:20284,36504:20365,36505:20816,36506:23383,36507:23546,36508:24904,36509:25345,36510:26178,36511:27425,36512:28363,36513:27835,36514:29246,36515:29885,36516:30164,36517:30913,36518:31034,36519:32780,36520:32819,36521:33258,36522:33940,36523:36766,36524:27728,36525:40575,36526:24335,36527:35672,36528:40235,36529:31482,36530:36600,36531:23437,36532:38635,36533:19971,36534:21489,36535:22519,36536:22833,36537:23241,36538:23460,36539:24713,36540:28287,36541:28422,36542:30142,36543:36074,36544:23455,36545:34048,36546:31712,36547:20594,36548:26612,36549:33437,36550:23649,36551:34122,36552:32286,36553:33294,36554:20889,36555:23556,36556:25448,36557:36198,36558:26012,36559:29038,36560:31038,36561:32023,36562:32773,36563:35613,36564:36554,36565:36974,36566:34503,36567:37034,36568:20511,36569:21242,36570:23610,36571:26451,36572:28796,36573:29237,36574:37196,36575:37320,36576:37675,36577:33509,36578:23490,36579:24369,36580:24825,36581:20027,36582:21462,36583:23432,36584:25163,36585:26417,36586:27530,36587:29417,36588:29664,36589:31278,36590:33131,36591:36259,36592:37202,36593:39318,36594:20754,36595:21463,36596:21610,36597:23551,36598:25480,36599:27193,36600:32172,36601:38656,36602:22234,36603:21454,36604:21608,36672:23447,36673:23601,36674:24030,36675:20462,36676:24833,36677:25342,36678:27954,36679:31168,36680:31179,36681:32066,36682:32333,36683:32722,36684:33261,36685:33311,36686:33936,36687:34886,36688:35186,36689:35728,36690:36468,36691:36655,36692:36913,36693:37195,36694:37228,36695:38598,36696:37276,36697:20160,36698:20303,36699:20805,36700:21313,36701:24467,36702:25102,36703:26580,36704:27713,36705:28171,36706:29539,36707:32294,36708:37325,36709:37507,36710:21460,36711:22809,36712:23487,36713:28113,36714:31069,36715:32302,36716:31899,36717:22654,36718:29087,36719:20986,36720:34899,36721:36848,36722:20426,36723:23803,36724:26149,36725:30636,36726:31459,36727:33308,36728:39423,36729:20934,36730:24490,36731:26092,36732:26991,36733:27529,36734:28147,36736:28310,36737:28516,36738:30462,36739:32020,36740:24033,36741:36981,36742:37255,36743:38918,36744:20966,36745:21021,36746:25152,36747:26257,36748:26329,36749:28186,36750:24246,36751:32210,36752:32626,36753:26360,36754:34223,36755:34295,36756:35576,36757:21161,36758:21465,36759:22899,36760:24207,36761:24464,36762:24661,36763:37604,36764:38500,36765:20663,36766:20767,36767:21213,36768:21280,36769:21319,36770:21484,36771:21736,36772:21830,36773:21809,36774:22039,36775:22888,36776:22974,36777:23100,36778:23477,36779:23558,36780:23567,36781:23569,36782:23578,36783:24196,36784:24202,36785:24288,36786:24432,36787:25215,36788:25220,36789:25307,36790:25484,36791:25463,36792:26119,36793:26124,36794:26157,36795:26230,36796:26494,36797:26786,36798:27167,36799:27189,36800:27836,36801:28040,36802:28169,36803:28248,36804:28988,36805:28966,36806:29031,36807:30151,36808:30465,36809:30813,36810:30977,36811:31077,36812:31216,36813:31456,36814:31505,36815:31911,36816:32057,36817:32918,36818:33750,36819:33931,36820:34121,36821:34909,36822:35059,36823:35359,36824:35388,36825:35412,36826:35443,36827:35937,36828:36062,36829:37284,36830:37478,36831:37758,36832:37912,36833:38556,36834:38808,36835:19978,36836:19976,36837:19998,36838:20055,36839:20887,36840:21104,36841:22478,36842:22580,36843:22732,36844:23330,36845:24120,36846:24773,36847:25854,36848:26465,36849:26454,36850:27972,36851:29366,36852:30067,36853:31331,36854:33976,36855:35698,36856:37304,36857:37664,36858:22065,36859:22516,36860:39166,36928:25325,36929:26893,36930:27542,36931:29165,36932:32340,36933:32887,36934:33394,36935:35302,36936:39135,36937:34645,36938:36785,36939:23611,36940:20280,36941:20449,36942:20405,36943:21767,36944:23072,36945:23517,36946:23529,36947:24515,36948:24910,36949:25391,36950:26032,36951:26187,36952:26862,36953:27035,36954:28024,36955:28145,36956:30003,36957:30137,36958:30495,36959:31070,36960:31206,36961:32051,36962:33251,36963:33455,36964:34218,36965:35242,36966:35386,36967:36523,36968:36763,36969:36914,36970:37341,36971:38663,36972:20154,36973:20161,36974:20995,36975:22645,36976:22764,36977:23563,36978:29978,36979:23613,36980:33102,36981:35338,36982:36805,36983:38499,36984:38765,36985:31525,36986:35535,36987:38920,36988:37218,36989:22259,36990:21416,36992:36887,36993:21561,36994:22402,36995:24101,36996:25512,36997:27700,36998:28810,36999:30561,37e3:31883,37001:32736,37002:34928,37003:36930,37004:37204,37005:37648,37006:37656,37007:38543,37008:29790,37009:39620,37010:23815,37011:23913,37012:25968,37013:26530,37014:36264,37015:38619,37016:25454,37017:26441,37018:26905,37019:33733,37020:38935,37021:38592,37022:35070,37023:28548,37024:25722,37025:23544,37026:19990,37027:28716,37028:30045,37029:26159,37030:20932,37031:21046,37032:21218,37033:22995,37034:24449,37035:24615,37036:25104,37037:25919,37038:25972,37039:26143,37040:26228,37041:26866,37042:26646,37043:27491,37044:28165,37045:29298,37046:29983,37047:30427,37048:31934,37049:32854,37050:22768,37051:35069,37052:35199,37053:35488,37054:35475,37055:35531,37056:36893,37057:37266,37058:38738,37059:38745,37060:25993,37061:31246,37062:33030,37063:38587,37064:24109,37065:24796,37066:25114,37067:26021,37068:26132,37069:26512,37070:30707,37071:31309,37072:31821,37073:32318,37074:33034,37075:36012,37076:36196,37077:36321,37078:36447,37079:30889,37080:20999,37081:25305,37082:25509,37083:25666,37084:25240,37085:35373,37086:31363,37087:31680,37088:35500,37089:38634,37090:32118,37091:33292,37092:34633,37093:20185,37094:20808,37095:21315,37096:21344,37097:23459,37098:23554,37099:23574,37100:24029,37101:25126,37102:25159,37103:25776,37104:26643,37105:26676,37106:27849,37107:27973,37108:27927,37109:26579,37110:28508,37111:29006,37112:29053,37113:26059,37114:31359,37115:31661,37116:32218,37184:32330,37185:32680,37186:33146,37187:33307,37188:33337,37189:34214,37190:35438,37191:36046,37192:36341,37193:36984,37194:36983,37195:37549,37196:37521,37197:38275,37198:39854,37199:21069,37200:21892,37201:28472,37202:28982,37203:20840,37204:31109,37205:32341,37206:33203,37207:31950,37208:22092,37209:22609,37210:23720,37211:25514,37212:26366,37213:26365,37214:26970,37215:29401,37216:30095,37217:30094,37218:30990,37219:31062,37220:31199,37221:31895,37222:32032,37223:32068,37224:34311,37225:35380,37226:38459,37227:36961,37228:40736,37229:20711,37230:21109,37231:21452,37232:21474,37233:20489,37234:21930,37235:22766,37236:22863,37237:29245,37238:23435,37239:23652,37240:21277,37241:24803,37242:24819,37243:25436,37244:25475,37245:25407,37246:25531,37248:25805,37249:26089,37250:26361,37251:24035,37252:27085,37253:27133,37254:28437,37255:29157,37256:20105,37257:30185,37258:30456,37259:31379,37260:31967,37261:32207,37262:32156,37263:32865,37264:33609,37265:33624,37266:33900,37267:33980,37268:34299,37269:35013,37270:36208,37271:36865,37272:36973,37273:37783,37274:38684,37275:39442,37276:20687,37277:22679,37278:24974,37279:33235,37280:34101,37281:36104,37282:36896,37283:20419,37284:20596,37285:21063,37286:21363,37287:24687,37288:25417,37289:26463,37290:28204,37291:36275,37292:36895,37293:20439,37294:23646,37295:36042,37296:26063,37297:32154,37298:21330,37299:34966,37300:20854,37301:25539,37302:23384,37303:23403,37304:23562,37305:25613,37306:26449,37307:36956,37308:20182,37309:22810,37310:22826,37311:27760,37312:35409,37313:21822,37314:22549,37315:22949,37316:24816,37317:25171,37318:26561,37319:33333,37320:26965,37321:38464,37322:39364,37323:39464,37324:20307,37325:22534,37326:23550,37327:32784,37328:23729,37329:24111,37330:24453,37331:24608,37332:24907,37333:25140,37334:26367,37335:27888,37336:28382,37337:32974,37338:33151,37339:33492,37340:34955,37341:36024,37342:36864,37343:36910,37344:38538,37345:40667,37346:39899,37347:20195,37348:21488,37349:22823,37350:31532,37351:37261,37352:38988,37353:40441,37354:28381,37355:28711,37356:21331,37357:21828,37358:23429,37359:25176,37360:25246,37361:25299,37362:27810,37363:28655,37364:29730,37365:35351,37366:37944,37367:28609,37368:35582,37369:33592,37370:20967,37371:34552,37372:21482,37440:21481,37441:20294,37442:36948,37443:36784,37444:22890,37445:33073,37446:24061,37447:31466,37448:36799,37449:26842,37450:35895,37451:29432,37452:40008,37453:27197,37454:35504,37455:20025,37456:21336,37457:22022,37458:22374,37459:25285,37460:25506,37461:26086,37462:27470,37463:28129,37464:28251,37465:28845,37466:30701,37467:31471,37468:31658,37469:32187,37470:32829,37471:32966,37472:34507,37473:35477,37474:37723,37475:22243,37476:22727,37477:24382,37478:26029,37479:26262,37480:27264,37481:27573,37482:30007,37483:35527,37484:20516,37485:30693,37486:22320,37487:24347,37488:24677,37489:26234,37490:27744,37491:30196,37492:31258,37493:32622,37494:33268,37495:34584,37496:36933,37497:39347,37498:31689,37499:30044,37500:31481,37501:31569,37502:33988,37504:36880,37505:31209,37506:31378,37507:33590,37508:23265,37509:30528,37510:20013,37511:20210,37512:23449,37513:24544,37514:25277,37515:26172,37516:26609,37517:27880,37518:34411,37519:34935,37520:35387,37521:37198,37522:37619,37523:39376,37524:27159,37525:28710,37526:29482,37527:33511,37528:33879,37529:36015,37530:19969,37531:20806,37532:20939,37533:21899,37534:23541,37535:24086,37536:24115,37537:24193,37538:24340,37539:24373,37540:24427,37541:24500,37542:25074,37543:25361,37544:26274,37545:26397,37546:28526,37547:29266,37548:30010,37549:30522,37550:32884,37551:33081,37552:33144,37553:34678,37554:35519,37555:35548,37556:36229,37557:36339,37558:37530,37559:38263,37560:38914,37561:40165,37562:21189,37563:25431,37564:30452,37565:26389,37566:27784,37567:29645,37568:36035,37569:37806,37570:38515,37571:27941,37572:22684,37573:26894,37574:27084,37575:36861,37576:37786,37577:30171,37578:36890,37579:22618,37580:26626,37581:25524,37582:27131,37583:20291,37584:28460,37585:26584,37586:36795,37587:34086,37588:32180,37589:37716,37590:26943,37591:28528,37592:22378,37593:22775,37594:23340,37595:32044,37596:29226,37597:21514,37598:37347,37599:40372,37600:20141,37601:20302,37602:20572,37603:20597,37604:21059,37605:35998,37606:21576,37607:22564,37608:23450,37609:24093,37610:24213,37611:24237,37612:24311,37613:24351,37614:24716,37615:25269,37616:25402,37617:25552,37618:26799,37619:27712,37620:30855,37621:31118,37622:31243,37623:32224,37624:33351,37625:35330,37626:35558,37627:36420,37628:36883,37696:37048,37697:37165,37698:37336,37699:40718,37700:27877,37701:25688,37702:25826,37703:25973,37704:28404,37705:30340,37706:31515,37707:36969,37708:37841,37709:28346,37710:21746,37711:24505,37712:25764,37713:36685,37714:36845,37715:37444,37716:20856,37717:22635,37718:22825,37719:23637,37720:24215,37721:28155,37722:32399,37723:29980,37724:36028,37725:36578,37726:39003,37727:28857,37728:20253,37729:27583,37730:28593,37731:3e4,37732:38651,37733:20814,37734:21520,37735:22581,37736:22615,37737:22956,37738:23648,37739:24466,37740:26007,37741:26460,37742:28193,37743:30331,37744:33759,37745:36077,37746:36884,37747:37117,37748:37709,37749:30757,37750:30778,37751:21162,37752:24230,37753:22303,37754:22900,37755:24594,37756:20498,37757:20826,37758:20908,37760:20941,37761:20992,37762:21776,37763:22612,37764:22616,37765:22871,37766:23445,37767:23798,37768:23947,37769:24764,37770:25237,37771:25645,37772:26481,37773:26691,37774:26812,37775:26847,37776:30423,37777:28120,37778:28271,37779:28059,37780:28783,37781:29128,37782:24403,37783:30168,37784:31095,37785:31561,37786:31572,37787:31570,37788:31958,37789:32113,37790:21040,37791:33891,37792:34153,37793:34276,37794:35342,37795:35588,37796:35910,37797:36367,37798:36867,37799:36879,37800:37913,37801:38518,37802:38957,37803:39472,37804:38360,37805:20685,37806:21205,37807:21516,37808:22530,37809:23566,37810:24999,37811:25758,37812:27934,37813:30643,37814:31461,37815:33012,37816:33796,37817:36947,37818:37509,37819:23776,37820:40199,37821:21311,37822:24471,37823:24499,37824:28060,37825:29305,37826:30563,37827:31167,37828:31716,37829:27602,37830:29420,37831:35501,37832:26627,37833:27233,37834:20984,37835:31361,37836:26932,37837:23626,37838:40182,37839:33515,37840:23493,37841:37193,37842:28702,37843:22136,37844:23663,37845:24775,37846:25958,37847:27788,37848:35930,37849:36929,37850:38931,37851:21585,37852:26311,37853:37389,37854:22856,37855:37027,37856:20869,37857:20045,37858:20970,37859:34201,37860:35598,37861:28760,37862:25466,37863:37707,37864:26978,37865:39348,37866:32260,37867:30071,37868:21335,37869:26976,37870:36575,37871:38627,37872:27741,37873:20108,37874:23612,37875:24336,37876:36841,37877:21250,37878:36049,37879:32905,37880:34425,37881:24319,37882:26085,37883:20083,37884:20837,37952:22914,37953:23615,37954:38894,37955:20219,37956:22922,37957:24525,37958:35469,37959:28641,37960:31152,37961:31074,37962:23527,37963:33905,37964:29483,37965:29105,37966:24180,37967:24565,37968:25467,37969:25754,37970:29123,37971:31896,37972:20035,37973:24316,37974:20043,37975:22492,37976:22178,37977:24745,37978:28611,37979:32013,37980:33021,37981:33075,37982:33215,37983:36786,37984:35223,37985:34468,37986:24052,37987:25226,37988:25773,37989:35207,37990:26487,37991:27874,37992:27966,37993:29750,37994:30772,37995:23110,37996:32629,37997:33453,37998:39340,37999:20467,38e3:24259,38001:25309,38002:25490,38003:25943,38004:26479,38005:30403,38006:29260,38007:32972,38008:32954,38009:36649,38010:37197,38011:20493,38012:22521,38013:23186,38014:26757,38016:26995,38017:29028,38018:29437,38019:36023,38020:22770,38021:36064,38022:38506,38023:36889,38024:34687,38025:31204,38026:30695,38027:33833,38028:20271,38029:21093,38030:21338,38031:25293,38032:26575,38033:27850,38034:30333,38035:31636,38036:31893,38037:33334,38038:34180,38039:36843,38040:26333,38041:28448,38042:29190,38043:32283,38044:33707,38045:39361,38046:40614,38047:20989,38048:31665,38049:30834,38050:31672,38051:32903,38052:31560,38053:27368,38054:24161,38055:32908,38056:30033,38057:30048,38058:20843,38059:37474,38060:28300,38061:30330,38062:37271,38063:39658,38064:20240,38065:32624,38066:25244,38067:31567,38068:38309,38069:40169,38070:22138,38071:22617,38072:34532,38073:38588,38074:20276,38075:21028,38076:21322,38077:21453,38078:21467,38079:24070,38080:25644,38081:26001,38082:26495,38083:27710,38084:27726,38085:29256,38086:29359,38087:29677,38088:30036,38089:32321,38090:33324,38091:34281,38092:36009,38093:31684,38094:37318,38095:29033,38096:38930,38097:39151,38098:25405,38099:26217,38100:30058,38101:30436,38102:30928,38103:34115,38104:34542,38105:21290,38106:21329,38107:21542,38108:22915,38109:24199,38110:24444,38111:24754,38112:25161,38113:25209,38114:25259,38115:26e3,38116:27604,38117:27852,38118:30130,38119:30382,38120:30865,38121:31192,38122:32203,38123:32631,38124:32933,38125:34987,38126:35513,38127:36027,38128:36991,38129:38750,38130:39131,38131:27147,38132:31800,38133:20633,38134:23614,38135:24494,38136:26503,38137:27608,38138:29749,38139:30473,38140:32654,38208:40763,38209:26570,38210:31255,38211:21305,38212:30091,38213:39661,38214:24422,38215:33181,38216:33777,38217:32920,38218:24380,38219:24517,38220:30050,38221:31558,38222:36924,38223:26727,38224:23019,38225:23195,38226:32016,38227:30334,38228:35628,38229:20469,38230:24426,38231:27161,38232:27703,38233:28418,38234:29922,38235:31080,38236:34920,38237:35413,38238:35961,38239:24287,38240:25551,38241:30149,38242:31186,38243:33495,38244:37672,38245:37618,38246:33948,38247:34541,38248:39981,38249:21697,38250:24428,38251:25996,38252:27996,38253:28693,38254:36007,38255:36051,38256:38971,38257:25935,38258:29942,38259:19981,38260:20184,38261:22496,38262:22827,38263:23142,38264:23500,38265:20904,38266:24067,38267:24220,38268:24598,38269:25206,38270:25975,38272:26023,38273:26222,38274:28014,38275:29238,38276:31526,38277:33104,38278:33178,38279:33433,38280:35676,38281:36e3,38282:36070,38283:36212,38284:38428,38285:38468,38286:20398,38287:25771,38288:27494,38289:33310,38290:33889,38291:34154,38292:37096,38293:23553,38294:26963,38295:39080,38296:33914,38297:34135,38298:20239,38299:21103,38300:24489,38301:24133,38302:26381,38303:31119,38304:33145,38305:35079,38306:35206,38307:28149,38308:24343,38309:25173,38310:27832,38311:20175,38312:29289,38313:39826,38314:20998,38315:21563,38316:22132,38317:22707,38318:24996,38319:25198,38320:28954,38321:22894,38322:31881,38323:31966,38324:32027,38325:38640,38326:25991,38327:32862,38328:19993,38329:20341,38330:20853,38331:22592,38332:24163,38333:24179,38334:24330,38335:26564,38336:20006,38337:34109,38338:38281,38339:38491,38340:31859,38341:38913,38342:20731,38343:22721,38344:30294,38345:30887,38346:21029,38347:30629,38348:34065,38349:31622,38350:20559,38351:22793,38352:29255,38353:31687,38354:32232,38355:36794,38356:36820,38357:36941,38358:20415,38359:21193,38360:23081,38361:24321,38362:38829,38363:20445,38364:33303,38365:37610,38366:22275,38367:25429,38368:27497,38369:29995,38370:35036,38371:36628,38372:31298,38373:21215,38374:22675,38375:24917,38376:25098,38377:26286,38378:27597,38379:31807,38380:33769,38381:20515,38382:20472,38383:21253,38384:21574,38385:22577,38386:22857,38387:23453,38388:23792,38389:23791,38390:23849,38391:24214,38392:25265,38393:25447,38394:25918,38395:26041,38396:26379,38464:27861,38465:27873,38466:28921,38467:30770,38468:32299,38469:32990,38470:33459,38471:33804,38472:34028,38473:34562,38474:35090,38475:35370,38476:35914,38477:37030,38478:37586,38479:39165,38480:40179,38481:40300,38482:20047,38483:20129,38484:20621,38485:21078,38486:22346,38487:22952,38488:24125,38489:24536,38490:24537,38491:25151,38492:26292,38493:26395,38494:26576,38495:26834,38496:20882,38497:32033,38498:32938,38499:33192,38500:35584,38501:35980,38502:36031,38503:37502,38504:38450,38505:21536,38506:38956,38507:21271,38508:20693,38509:21340,38510:22696,38511:25778,38512:26420,38513:29287,38514:30566,38515:31302,38516:37350,38517:21187,38518:27809,38519:27526,38520:22528,38521:24140,38522:22868,38523:26412,38524:32763,38525:20961,38526:30406,38528:25705,38529:30952,38530:39764,38531:40635,38532:22475,38533:22969,38534:26151,38535:26522,38536:27598,38537:21737,38538:27097,38539:24149,38540:33180,38541:26517,38542:39850,38543:26622,38544:40018,38545:26717,38546:20134,38547:20451,38548:21448,38549:25273,38550:26411,38551:27819,38552:36804,38553:20397,38554:32365,38555:40639,38556:19975,38557:24930,38558:28288,38559:28459,38560:34067,38561:21619,38562:26410,38563:39749,38564:24051,38565:31637,38566:23724,38567:23494,38568:34588,38569:28234,38570:34001,38571:31252,38572:33032,38573:22937,38574:31885,38575:27665,38576:30496,38577:21209,38578:22818,38579:28961,38580:29279,38581:30683,38582:38695,38583:40289,38584:26891,38585:23167,38586:23064,38587:20901,38588:21517,38589:21629,38590:26126,38591:30431,38592:36855,38593:37528,38594:40180,38595:23018,38596:29277,38597:28357,38598:20813,38599:26825,38600:32191,38601:32236,38602:38754,38603:40634,38604:25720,38605:27169,38606:33538,38607:22916,38608:23391,38609:27611,38610:29467,38611:30450,38612:32178,38613:32791,38614:33945,38615:20786,38616:26408,38617:40665,38618:30446,38619:26466,38620:21247,38621:39173,38622:23588,38623:25147,38624:31870,38625:36016,38626:21839,38627:24758,38628:32011,38629:38272,38630:21249,38631:20063,38632:20918,38633:22812,38634:29242,38635:32822,38636:37326,38637:24357,38638:30690,38639:21380,38640:24441,38641:32004,38642:34220,38643:35379,38644:36493,38645:38742,38646:26611,38647:34222,38648:37971,38649:24841,38650:24840,38651:27833,38652:30290,38720:35565,38721:36664,38722:21807,38723:20305,38724:20778,38725:21191,38726:21451,38727:23461,38728:24189,38729:24736,38730:24962,38731:25558,38732:26377,38733:26586,38734:28263,38735:28044,38736:29494,38737:29495,38738:30001,38739:31056,38740:35029,38741:35480,38742:36938,38743:37009,38744:37109,38745:38596,38746:34701,38747:22805,38748:20104,38749:20313,38750:19982,38751:35465,38752:36671,38753:38928,38754:20653,38755:24188,38756:22934,38757:23481,38758:24248,38759:25562,38760:25594,38761:25793,38762:26332,38763:26954,38764:27096,38765:27915,38766:28342,38767:29076,38768:29992,38769:31407,38770:32650,38771:32768,38772:33865,38773:33993,38774:35201,38775:35617,38776:36362,38777:36965,38778:38525,38779:39178,38780:24958,38781:25233,38782:27442,38784:27779,38785:28020,38786:32716,38787:32764,38788:28096,38789:32645,38790:34746,38791:35064,38792:26469,38793:33713,38794:38972,38795:38647,38796:27931,38797:32097,38798:33853,38799:37226,38800:20081,38801:21365,38802:23888,38803:27396,38804:28651,38805:34253,38806:34349,38807:35239,38808:21033,38809:21519,38810:23653,38811:26446,38812:26792,38813:29702,38814:29827,38815:30178,38816:35023,38817:35041,38818:37324,38819:38626,38820:38520,38821:24459,38822:29575,38823:31435,38824:33870,38825:25504,38826:30053,38827:21129,38828:27969,38829:28316,38830:29705,38831:30041,38832:30827,38833:31890,38834:38534,38835:31452,38836:40845,38837:20406,38838:24942,38839:26053,38840:34396,38841:20102,38842:20142,38843:20698,38844:20001,38845:20940,38846:23534,38847:26009,38848:26753,38849:28092,38850:29471,38851:30274,38852:30637,38853:31260,38854:31975,38855:33391,38856:35538,38857:36988,38858:37327,38859:38517,38860:38936,38861:21147,38862:32209,38863:20523,38864:21400,38865:26519,38866:28107,38867:29136,38868:29747,38869:33256,38870:36650,38871:38563,38872:40023,38873:40607,38874:29792,38875:22593,38876:28057,38877:32047,38878:39006,38879:20196,38880:20278,38881:20363,38882:20919,38883:21169,38884:23994,38885:24604,38886:29618,38887:31036,38888:33491,38889:37428,38890:38583,38891:38646,38892:38666,38893:40599,38894:40802,38895:26278,38896:27508,38897:21015,38898:21155,38899:28872,38900:35010,38901:24265,38902:24651,38903:24976,38904:28451,38905:29001,38906:31806,38907:32244,38908:32879,38976:34030,38977:36899,38978:37676,38979:21570,38980:39791,38981:27347,38982:28809,38983:36034,38984:36335,38985:38706,38986:21172,38987:23105,38988:24266,38989:24324,38990:26391,38991:27004,38992:27028,38993:28010,38994:28431,38995:29282,38996:29436,38997:31725,38998:32769,38999:32894,39e3:34635,39001:37070,39002:20845,39003:40595,39004:31108,39005:32907,39006:37682,39007:35542,39008:20525,39009:21644,39010:35441,39011:27498,39012:36036,39013:33031,39014:24785,39015:26528,39016:40434,39017:20121,39018:20120,39019:39952,39020:35435,39021:34241,39022:34152,39023:26880,39024:28286,39025:30871,39026:33109,39071:24332,39072:19984,39073:19989,39074:20010,39075:20017,39076:20022,39077:20028,39078:20031,39079:20034,39080:20054,39081:20056,39082:20098,39083:20101,39084:35947,39085:20106,39086:33298,39087:24333,39088:20110,39089:20126,39090:20127,39091:20128,39092:20130,39093:20144,39094:20147,39095:20150,39096:20174,39097:20173,39098:20164,39099:20166,39100:20162,39101:20183,39102:20190,39103:20205,39104:20191,39105:20215,39106:20233,39107:20314,39108:20272,39109:20315,39110:20317,39111:20311,39112:20295,39113:20342,39114:20360,39115:20367,39116:20376,39117:20347,39118:20329,39119:20336,39120:20369,39121:20335,39122:20358,39123:20374,39124:20760,39125:20436,39126:20447,39127:20430,39128:20440,39129:20443,39130:20433,39131:20442,39132:20432,39133:20452,39134:20453,39135:20506,39136:20520,39137:20500,39138:20522,39139:20517,39140:20485,39141:20252,39142:20470,39143:20513,39144:20521,39145:20524,39146:20478,39147:20463,39148:20497,39149:20486,39150:20547,39151:20551,39152:26371,39153:20565,39154:20560,39155:20552,39156:20570,39157:20566,39158:20588,39159:20600,39160:20608,39161:20634,39162:20613,39163:20660,39164:20658,39232:20681,39233:20682,39234:20659,39235:20674,39236:20694,39237:20702,39238:20709,39239:20717,39240:20707,39241:20718,39242:20729,39243:20725,39244:20745,39245:20737,39246:20738,39247:20758,39248:20757,39249:20756,39250:20762,39251:20769,39252:20794,39253:20791,39254:20796,39255:20795,39256:20799,39257:20800,39258:20818,39259:20812,39260:20820,39261:20834,39262:31480,39263:20841,39264:20842,39265:20846,39266:20864,39267:20866,39268:22232,39269:20876,39270:20873,39271:20879,39272:20881,39273:20883,39274:20885,39275:20886,39276:20900,39277:20902,39278:20898,39279:20905,39280:20906,39281:20907,39282:20915,39283:20913,39284:20914,39285:20912,39286:20917,39287:20925,39288:20933,39289:20937,39290:20955,39291:20960,39292:34389,39293:20969,39294:20973,39296:20976,39297:20981,39298:20990,39299:20996,39300:21003,39301:21012,39302:21006,39303:21031,39304:21034,39305:21038,39306:21043,39307:21049,39308:21071,39309:21060,39310:21067,39311:21068,39312:21086,39313:21076,39314:21098,39315:21108,39316:21097,39317:21107,39318:21119,39319:21117,39320:21133,39321:21140,39322:21138,39323:21105,39324:21128,39325:21137,39326:36776,39327:36775,39328:21164,39329:21165,39330:21180,39331:21173,39332:21185,39333:21197,39334:21207,39335:21214,39336:21219,39337:21222,39338:39149,39339:21216,39340:21235,39341:21237,39342:21240,39343:21241,39344:21254,39345:21256,39346:30008,39347:21261,39348:21264,39349:21263,39350:21269,39351:21274,39352:21283,39353:21295,39354:21297,39355:21299,39356:21304,39357:21312,39358:21318,39359:21317,39360:19991,39361:21321,39362:21325,39363:20950,39364:21342,39365:21353,39366:21358,39367:22808,39368:21371,39369:21367,39370:21378,39371:21398,39372:21408,39373:21414,39374:21413,39375:21422,39376:21424,39377:21430,39378:21443,39379:31762,39380:38617,39381:21471,39382:26364,39383:29166,39384:21486,39385:21480,39386:21485,39387:21498,39388:21505,39389:21565,39390:21568,39391:21548,39392:21549,39393:21564,39394:21550,39395:21558,39396:21545,39397:21533,39398:21582,39399:21647,39400:21621,39401:21646,39402:21599,39403:21617,39404:21623,39405:21616,39406:21650,39407:21627,39408:21632,39409:21622,39410:21636,39411:21648,39412:21638,39413:21703,39414:21666,39415:21688,39416:21669,39417:21676,39418:21700,39419:21704,39420:21672,39488:21675,39489:21698,39490:21668,39491:21694,39492:21692,39493:21720,39494:21733,39495:21734,39496:21775,39497:21780,39498:21757,39499:21742,39500:21741,39501:21754,39502:21730,39503:21817,39504:21824,39505:21859,39506:21836,39507:21806,39508:21852,39509:21829,39510:21846,39511:21847,39512:21816,39513:21811,39514:21853,39515:21913,39516:21888,39517:21679,39518:21898,39519:21919,39520:21883,39521:21886,39522:21912,39523:21918,39524:21934,39525:21884,39526:21891,39527:21929,39528:21895,39529:21928,39530:21978,39531:21957,39532:21983,39533:21956,39534:21980,39535:21988,39536:21972,39537:22036,39538:22007,39539:22038,39540:22014,39541:22013,39542:22043,39543:22009,39544:22094,39545:22096,39546:29151,39547:22068,39548:22070,39549:22066,39550:22072,39552:22123,39553:22116,39554:22063,39555:22124,39556:22122,39557:22150,39558:22144,39559:22154,39560:22176,39561:22164,39562:22159,39563:22181,39564:22190,39565:22198,39566:22196,39567:22210,39568:22204,39569:22209,39570:22211,39571:22208,39572:22216,39573:22222,39574:22225,39575:22227,39576:22231,39577:22254,39578:22265,39579:22272,39580:22271,39581:22276,39582:22281,39583:22280,39584:22283,39585:22285,39586:22291,39587:22296,39588:22294,39589:21959,39590:22300,39591:22310,39592:22327,39593:22328,39594:22350,39595:22331,39596:22336,39597:22351,39598:22377,39599:22464,39600:22408,39601:22369,39602:22399,39603:22409,39604:22419,39605:22432,39606:22451,39607:22436,39608:22442,39609:22448,39610:22467,39611:22470,39612:22484,39613:22482,39614:22483,39615:22538,39616:22486,39617:22499,39618:22539,39619:22553,39620:22557,39621:22642,39622:22561,39623:22626,39624:22603,39625:22640,39626:27584,39627:22610,39628:22589,39629:22649,39630:22661,39631:22713,39632:22687,39633:22699,39634:22714,39635:22750,39636:22715,39637:22712,39638:22702,39639:22725,39640:22739,39641:22737,39642:22743,39643:22745,39644:22744,39645:22757,39646:22748,39647:22756,39648:22751,39649:22767,39650:22778,39651:22777,39652:22779,39653:22780,39654:22781,39655:22786,39656:22794,39657:22800,39658:22811,39659:26790,39660:22821,39661:22828,39662:22829,39663:22834,39664:22840,39665:22846,39666:31442,39667:22869,39668:22864,39669:22862,39670:22874,39671:22872,39672:22882,39673:22880,39674:22887,39675:22892,39676:22889,39744:22904,39745:22913,39746:22941,39747:20318,39748:20395,39749:22947,39750:22962,39751:22982,39752:23016,39753:23004,39754:22925,39755:23001,39756:23002,39757:23077,39758:23071,39759:23057,39760:23068,39761:23049,39762:23066,39763:23104,39764:23148,39765:23113,39766:23093,39767:23094,39768:23138,39769:23146,39770:23194,39771:23228,39772:23230,39773:23243,39774:23234,39775:23229,39776:23267,39777:23255,39778:23270,39779:23273,39780:23254,39781:23290,39782:23291,39783:23308,39784:23307,39785:23318,39786:23346,39787:23248,39788:23338,39789:23350,39790:23358,39791:23363,39792:23365,39793:23360,39794:23377,39795:23381,39796:23386,39797:23387,39798:23397,39799:23401,39800:23408,39801:23411,39802:23413,39803:23416,39804:25992,39805:23418,39806:23424,39808:23427,39809:23462,39810:23480,39811:23491,39812:23495,39813:23497,39814:23508,39815:23504,39816:23524,39817:23526,39818:23522,39819:23518,39820:23525,39821:23531,39822:23536,39823:23542,39824:23539,39825:23557,39826:23559,39827:23560,39828:23565,39829:23571,39830:23584,39831:23586,39832:23592,39833:23608,39834:23609,39835:23617,39836:23622,39837:23630,39838:23635,39839:23632,39840:23631,39841:23409,39842:23660,39843:23662,39844:20066,39845:23670,39846:23673,39847:23692,39848:23697,39849:23700,39850:22939,39851:23723,39852:23739,39853:23734,39854:23740,39855:23735,39856:23749,39857:23742,39858:23751,39859:23769,39860:23785,39861:23805,39862:23802,39863:23789,39864:23948,39865:23786,39866:23819,39867:23829,39868:23831,39869:23900,39870:23839,39871:23835,39872:23825,39873:23828,39874:23842,39875:23834,39876:23833,39877:23832,39878:23884,39879:23890,39880:23886,39881:23883,39882:23916,39883:23923,39884:23926,39885:23943,39886:23940,39887:23938,39888:23970,39889:23965,39890:23980,39891:23982,39892:23997,39893:23952,39894:23991,39895:23996,39896:24009,39897:24013,39898:24019,39899:24018,39900:24022,39901:24027,39902:24043,39903:24050,39904:24053,39905:24075,39906:24090,39907:24089,39908:24081,39909:24091,39910:24118,39911:24119,39912:24132,39913:24131,39914:24128,39915:24142,39916:24151,39917:24148,39918:24159,39919:24162,39920:24164,39921:24135,39922:24181,39923:24182,39924:24186,39925:40636,39926:24191,39927:24224,39928:24257,39929:24258,39930:24264,39931:24272,39932:24271,4e4:24278,40001:24291,40002:24285,40003:24282,40004:24283,40005:24290,40006:24289,40007:24296,40008:24297,40009:24300,40010:24305,40011:24307,40012:24304,40013:24308,40014:24312,40015:24318,40016:24323,40017:24329,40018:24413,40019:24412,40020:24331,40021:24337,40022:24342,40023:24361,40024:24365,40025:24376,40026:24385,40027:24392,40028:24396,40029:24398,40030:24367,40031:24401,40032:24406,40033:24407,40034:24409,40035:24417,40036:24429,40037:24435,40038:24439,40039:24451,40040:24450,40041:24447,40042:24458,40043:24456,40044:24465,40045:24455,40046:24478,40047:24473,40048:24472,40049:24480,40050:24488,40051:24493,40052:24508,40053:24534,40054:24571,40055:24548,40056:24568,40057:24561,40058:24541,40059:24755,40060:24575,40061:24609,40062:24672,40064:24601,40065:24592,40066:24617,40067:24590,40068:24625,40069:24603,40070:24597,40071:24619,40072:24614,40073:24591,40074:24634,40075:24666,40076:24641,40077:24682,40078:24695,40079:24671,40080:24650,40081:24646,40082:24653,40083:24675,40084:24643,40085:24676,40086:24642,40087:24684,40088:24683,40089:24665,40090:24705,40091:24717,40092:24807,40093:24707,40094:24730,40095:24708,40096:24731,40097:24726,40098:24727,40099:24722,40100:24743,40101:24715,40102:24801,40103:24760,40104:24800,40105:24787,40106:24756,40107:24560,40108:24765,40109:24774,40110:24757,40111:24792,40112:24909,40113:24853,40114:24838,40115:24822,40116:24823,40117:24832,40118:24820,40119:24826,40120:24835,40121:24865,40122:24827,40123:24817,40124:24845,40125:24846,40126:24903,40127:24894,40128:24872,40129:24871,40130:24906,40131:24895,40132:24892,40133:24876,40134:24884,40135:24893,40136:24898,40137:24900,40138:24947,40139:24951,40140:24920,40141:24921,40142:24922,40143:24939,40144:24948,40145:24943,40146:24933,40147:24945,40148:24927,40149:24925,40150:24915,40151:24949,40152:24985,40153:24982,40154:24967,40155:25004,40156:24980,40157:24986,40158:24970,40159:24977,40160:25003,40161:25006,40162:25036,40163:25034,40164:25033,40165:25079,40166:25032,40167:25027,40168:25030,40169:25018,40170:25035,40171:32633,40172:25037,40173:25062,40174:25059,40175:25078,40176:25082,40177:25076,40178:25087,40179:25085,40180:25084,40181:25086,40182:25088,40183:25096,40184:25097,40185:25101,40186:25100,40187:25108,40188:25115,40256:25118,40257:25121,40258:25130,40259:25134,40260:25136,40261:25138,40262:25139,40263:25153,40264:25166,40265:25182,40266:25187,40267:25179,40268:25184,40269:25192,40270:25212,40271:25218,40272:25225,40273:25214,40274:25234,40275:25235,40276:25238,40277:25300,40278:25219,40279:25236,40280:25303,40281:25297,40282:25275,40283:25295,40284:25343,40285:25286,40286:25812,40287:25288,40288:25308,40289:25292,40290:25290,40291:25282,40292:25287,40293:25243,40294:25289,40295:25356,40296:25326,40297:25329,40298:25383,40299:25346,40300:25352,40301:25327,40302:25333,40303:25424,40304:25406,40305:25421,40306:25628,40307:25423,40308:25494,40309:25486,40310:25472,40311:25515,40312:25462,40313:25507,40314:25487,40315:25481,40316:25503,40317:25525,40318:25451,40320:25449,40321:25534,40322:25577,40323:25536,40324:25542,40325:25571,40326:25545,40327:25554,40328:25590,40329:25540,40330:25622,40331:25652,40332:25606,40333:25619,40334:25638,40335:25654,40336:25885,40337:25623,40338:25640,40339:25615,40340:25703,40341:25711,40342:25718,40343:25678,40344:25898,40345:25749,40346:25747,40347:25765,40348:25769,40349:25736,40350:25788,40351:25818,40352:25810,40353:25797,40354:25799,40355:25787,40356:25816,40357:25794,40358:25841,40359:25831,40360:33289,40361:25824,40362:25825,40363:25260,40364:25827,40365:25839,40366:25900,40367:25846,40368:25844,40369:25842,40370:25850,40371:25856,40372:25853,40373:25880,40374:25884,40375:25861,40376:25892,40377:25891,40378:25899,40379:25908,40380:25909,40381:25911,40382:25910,40383:25912,40384:30027,40385:25928,40386:25942,40387:25941,40388:25933,40389:25944,40390:25950,40391:25949,40392:25970,40393:25976,40394:25986,40395:25987,40396:35722,40397:26011,40398:26015,40399:26027,40400:26039,40401:26051,40402:26054,40403:26049,40404:26052,40405:26060,40406:26066,40407:26075,40408:26073,40409:26080,40410:26081,40411:26097,40412:26482,40413:26122,40414:26115,40415:26107,40416:26483,40417:26165,40418:26166,40419:26164,40420:26140,40421:26191,40422:26180,40423:26185,40424:26177,40425:26206,40426:26205,40427:26212,40428:26215,40429:26216,40430:26207,40431:26210,40432:26224,40433:26243,40434:26248,40435:26254,40436:26249,40437:26244,40438:26264,40439:26269,40440:26305,40441:26297,40442:26313,40443:26302,40444:26300,40512:26308,40513:26296,40514:26326,40515:26330,40516:26336,40517:26175,40518:26342,40519:26345,40520:26352,40521:26357,40522:26359,40523:26383,40524:26390,40525:26398,40526:26406,40527:26407,40528:38712,40529:26414,40530:26431,40531:26422,40532:26433,40533:26424,40534:26423,40535:26438,40536:26462,40537:26464,40538:26457,40539:26467,40540:26468,40541:26505,40542:26480,40543:26537,40544:26492,40545:26474,40546:26508,40547:26507,40548:26534,40549:26529,40550:26501,40551:26551,40552:26607,40553:26548,40554:26604,40555:26547,40556:26601,40557:26552,40558:26596,40559:26590,40560:26589,40561:26594,40562:26606,40563:26553,40564:26574,40565:26566,40566:26599,40567:27292,40568:26654,40569:26694,40570:26665,40571:26688,40572:26701,40573:26674,40574:26702,40576:26803,40577:26667,40578:26713,40579:26723,40580:26743,40581:26751,40582:26783,40583:26767,40584:26797,40585:26772,40586:26781,40587:26779,40588:26755,40589:27310,40590:26809,40591:26740,40592:26805,40593:26784,40594:26810,40595:26895,40596:26765,40597:26750,40598:26881,40599:26826,40600:26888,40601:26840,40602:26914,40603:26918,40604:26849,40605:26892,40606:26829,40607:26836,40608:26855,40609:26837,40610:26934,40611:26898,40612:26884,40613:26839,40614:26851,40615:26917,40616:26873,40617:26848,40618:26863,40619:26920,40620:26922,40621:26906,40622:26915,40623:26913,40624:26822,40625:27001,40626:26999,40627:26972,40628:27e3,40629:26987,40630:26964,40631:27006,40632:26990,40633:26937,40634:26996,40635:26941,40636:26969,40637:26928,40638:26977,40639:26974,40640:26973,40641:27009,40642:26986,40643:27058,40644:27054,40645:27088,40646:27071,40647:27073,40648:27091,40649:27070,40650:27086,40651:23528,40652:27082,40653:27101,40654:27067,40655:27075,40656:27047,40657:27182,40658:27025,40659:27040,40660:27036,40661:27029,40662:27060,40663:27102,40664:27112,40665:27138,40666:27163,40667:27135,40668:27402,40669:27129,40670:27122,40671:27111,40672:27141,40673:27057,40674:27166,40675:27117,40676:27156,40677:27115,40678:27146,40679:27154,40680:27329,40681:27171,40682:27155,40683:27204,40684:27148,40685:27250,40686:27190,40687:27256,40688:27207,40689:27234,40690:27225,40691:27238,40692:27208,40693:27192,40694:27170,40695:27280,40696:27277,40697:27296,40698:27268,40699:27298,40700:27299,40768:27287,40769:34327,40770:27323,40771:27331,40772:27330,40773:27320,40774:27315,40775:27308,40776:27358,40777:27345,40778:27359,40779:27306,40780:27354,40781:27370,40782:27387,40783:27397,40784:34326,40785:27386,40786:27410,40787:27414,40788:39729,40789:27423,40790:27448,40791:27447,40792:30428,40793:27449,40794:39150,40795:27463,40796:27459,40797:27465,40798:27472,40799:27481,40800:27476,40801:27483,40802:27487,40803:27489,40804:27512,40805:27513,40806:27519,40807:27520,40808:27524,40809:27523,40810:27533,40811:27544,40812:27541,40813:27550,40814:27556,40815:27562,40816:27563,40817:27567,40818:27570,40819:27569,40820:27571,40821:27575,40822:27580,40823:27590,40824:27595,40825:27603,40826:27615,40827:27628,40828:27627,40829:27635,40830:27631,40832:40638,40833:27656,40834:27667,40835:27668,40836:27675,40837:27684,40838:27683,40839:27742,40840:27733,40841:27746,40842:27754,40843:27778,40844:27789,40845:27802,40846:27777,40847:27803,40848:27774,40849:27752,40850:27763,40851:27794,40852:27792,40853:27844,40854:27889,40855:27859,40856:27837,40857:27863,40858:27845,40859:27869,40860:27822,40861:27825,40862:27838,40863:27834,40864:27867,40865:27887,40866:27865,40867:27882,40868:27935,40869:34893,40870:27958,40871:27947,40872:27965,40873:27960,40874:27929,40875:27957,40876:27955,40877:27922,40878:27916,40879:28003,40880:28051,40881:28004,40882:27994,40883:28025,40884:27993,40885:28046,40886:28053,40887:28644,40888:28037,40889:28153,40890:28181,40891:28170,40892:28085,40893:28103,40894:28134,40895:28088,40896:28102,40897:28140,40898:28126,40899:28108,40900:28136,40901:28114,40902:28101,40903:28154,40904:28121,40905:28132,40906:28117,40907:28138,40908:28142,40909:28205,40910:28270,40911:28206,40912:28185,40913:28274,40914:28255,40915:28222,40916:28195,40917:28267,40918:28203,40919:28278,40920:28237,40921:28191,40922:28227,40923:28218,40924:28238,40925:28196,40926:28415,40927:28189,40928:28216,40929:28290,40930:28330,40931:28312,40932:28361,40933:28343,40934:28371,40935:28349,40936:28335,40937:28356,40938:28338,40939:28372,40940:28373,40941:28303,40942:28325,40943:28354,40944:28319,40945:28481,40946:28433,40947:28748,40948:28396,40949:28408,40950:28414,40951:28479,40952:28402,40953:28465,40954:28399,40955:28466,40956:28364,161:65377,162:65378,163:65379,164:65380,165:65381,166:65382,167:65383,168:65384,169:65385,170:65386,171:65387,172:65388,173:65389,174:65390,175:65391,176:65392,177:65393,178:65394,179:65395,180:65396,181:65397,182:65398,183:65399,184:65400,185:65401,186:65402,187:65403,188:65404,189:65405,190:65406,191:65407,192:65408,193:65409,194:65410,195:65411,196:65412,197:65413,198:65414,199:65415,200:65416,201:65417,202:65418,203:65419,204:65420,205:65421,206:65422,207:65423,208:65424,209:65425,210:65426,211:65427,212:65428,213:65429,214:65430,215:65431,216:65432,217:65433,218:65434,219:65435,220:65436,221:65437,222:65438,223:65439,57408:28478,57409:28435,57410:28407,57411:28550,57412:28538,57413:28536,57414:28545,57415:28544,57416:28527,57417:28507,57418:28659,57419:28525,57420:28546,57421:28540,57422:28504,57423:28558,57424:28561,57425:28610,57426:28518,57427:28595,57428:28579,57429:28577,57430:28580,57431:28601,57432:28614,57433:28586,57434:28639,57435:28629,57436:28652,57437:28628,57438:28632,57439:28657,57440:28654,57441:28635,57442:28681,57443:28683,57444:28666,57445:28689,57446:28673,57447:28687,57448:28670,57449:28699,57450:28698,57451:28532,57452:28701,57453:28696,57454:28703,57455:28720,57456:28734,57457:28722,57458:28753,57459:28771,57460:28825,57461:28818,57462:28847,57463:28913,57464:28844,57465:28856,57466:28851,57467:28846,57468:28895,57469:28875,57470:28893,57472:28889,57473:28937,57474:28925,57475:28956,57476:28953,57477:29029,57478:29013,57479:29064,57480:29030,57481:29026,57482:29004,57483:29014,57484:29036,57485:29071,57486:29179,57487:29060,57488:29077,57489:29096,57490:29100,57491:29143,57492:29113,57493:29118,57494:29138,57495:29129,57496:29140,57497:29134,57498:29152,57499:29164,57500:29159,57501:29173,57502:29180,57503:29177,57504:29183,57505:29197,57506:29200,57507:29211,57508:29224,57509:29229,57510:29228,57511:29232,57512:29234,57513:29243,57514:29244,57515:29247,57516:29248,57517:29254,57518:29259,57519:29272,57520:29300,57521:29310,57522:29314,57523:29313,57524:29319,57525:29330,57526:29334,57527:29346,57528:29351,57529:29369,57530:29362,57531:29379,57532:29382,57533:29380,57534:29390,57535:29394,57536:29410,57537:29408,57538:29409,57539:29433,57540:29431,57541:20495,57542:29463,57543:29450,57544:29468,57545:29462,57546:29469,57547:29492,57548:29487,57549:29481,57550:29477,57551:29502,57552:29518,57553:29519,57554:40664,57555:29527,57556:29546,57557:29544,57558:29552,57559:29560,57560:29557,57561:29563,57562:29562,57563:29640,57564:29619,57565:29646,57566:29627,57567:29632,57568:29669,57569:29678,57570:29662,57571:29858,57572:29701,57573:29807,57574:29733,57575:29688,57576:29746,57577:29754,57578:29781,57579:29759,57580:29791,57581:29785,57582:29761,57583:29788,57584:29801,57585:29808,57586:29795,57587:29802,57588:29814,57589:29822,57590:29835,57591:29854,57592:29863,57593:29898,57594:29903,57595:29908,57596:29681,57664:29920,57665:29923,57666:29927,57667:29929,57668:29934,57669:29938,57670:29936,57671:29937,57672:29944,57673:29943,57674:29956,57675:29955,57676:29957,57677:29964,57678:29966,57679:29965,57680:29973,57681:29971,57682:29982,57683:29990,57684:29996,57685:30012,57686:30020,57687:30029,57688:30026,57689:30025,57690:30043,57691:30022,57692:30042,57693:30057,57694:30052,57695:30055,57696:30059,57697:30061,57698:30072,57699:30070,57700:30086,57701:30087,57702:30068,57703:30090,57704:30089,57705:30082,57706:30100,57707:30106,57708:30109,57709:30117,57710:30115,57711:30146,57712:30131,57713:30147,57714:30133,57715:30141,57716:30136,57717:30140,57718:30129,57719:30157,57720:30154,57721:30162,57722:30169,57723:30179,57724:30174,57725:30206,57726:30207,57728:30204,57729:30209,57730:30192,57731:30202,57732:30194,57733:30195,57734:30219,57735:30221,57736:30217,57737:30239,57738:30247,57739:30240,57740:30241,57741:30242,57742:30244,57743:30260,57744:30256,57745:30267,57746:30279,57747:30280,57748:30278,57749:30300,57750:30296,57751:30305,57752:30306,57753:30312,57754:30313,57755:30314,57756:30311,57757:30316,57758:30320,57759:30322,57760:30326,57761:30328,57762:30332,57763:30336,57764:30339,57765:30344,57766:30347,57767:30350,57768:30358,57769:30355,57770:30361,57771:30362,57772:30384,57773:30388,57774:30392,57775:30393,57776:30394,57777:30402,57778:30413,57779:30422,57780:30418,57781:30430,57782:30433,57783:30437,57784:30439,57785:30442,57786:34351,57787:30459,57788:30472,57789:30471,57790:30468,57791:30505,57792:30500,57793:30494,57794:30501,57795:30502,57796:30491,57797:30519,57798:30520,57799:30535,57800:30554,57801:30568,57802:30571,57803:30555,57804:30565,57805:30591,57806:30590,57807:30585,57808:30606,57809:30603,57810:30609,57811:30624,57812:30622,57813:30640,57814:30646,57815:30649,57816:30655,57817:30652,57818:30653,57819:30651,57820:30663,57821:30669,57822:30679,57823:30682,57824:30684,57825:30691,57826:30702,57827:30716,57828:30732,57829:30738,57830:31014,57831:30752,57832:31018,57833:30789,57834:30862,57835:30836,57836:30854,57837:30844,57838:30874,57839:30860,57840:30883,57841:30901,57842:30890,57843:30895,57844:30929,57845:30918,57846:30923,57847:30932,57848:30910,57849:30908,57850:30917,57851:30922,57852:30956,57920:30951,57921:30938,57922:30973,57923:30964,57924:30983,57925:30994,57926:30993,57927:31001,57928:31020,57929:31019,57930:31040,57931:31072,57932:31063,57933:31071,57934:31066,57935:31061,57936:31059,57937:31098,57938:31103,57939:31114,57940:31133,57941:31143,57942:40779,57943:31146,57944:31150,57945:31155,57946:31161,57947:31162,57948:31177,57949:31189,57950:31207,57951:31212,57952:31201,57953:31203,57954:31240,57955:31245,57956:31256,57957:31257,57958:31264,57959:31263,57960:31104,57961:31281,57962:31291,57963:31294,57964:31287,57965:31299,57966:31319,57967:31305,57968:31329,57969:31330,57970:31337,57971:40861,57972:31344,57973:31353,57974:31357,57975:31368,57976:31383,57977:31381,57978:31384,57979:31382,57980:31401,57981:31432,57982:31408,57984:31414,57985:31429,57986:31428,57987:31423,57988:36995,57989:31431,57990:31434,57991:31437,57992:31439,57993:31445,57994:31443,57995:31449,57996:31450,57997:31453,57998:31457,57999:31458,58e3:31462,58001:31469,58002:31472,58003:31490,58004:31503,58005:31498,58006:31494,58007:31539,58008:31512,58009:31513,58010:31518,58011:31541,58012:31528,58013:31542,58014:31568,58015:31610,58016:31492,58017:31565,58018:31499,58019:31564,58020:31557,58021:31605,58022:31589,58023:31604,58024:31591,58025:31600,58026:31601,58027:31596,58028:31598,58029:31645,58030:31640,58031:31647,58032:31629,58033:31644,58034:31642,58035:31627,58036:31634,58037:31631,58038:31581,58039:31641,58040:31691,58041:31681,58042:31692,58043:31695,58044:31668,58045:31686,58046:31709,58047:31721,58048:31761,58049:31764,58050:31718,58051:31717,58052:31840,58053:31744,58054:31751,58055:31763,58056:31731,58057:31735,58058:31767,58059:31757,58060:31734,58061:31779,58062:31783,58063:31786,58064:31775,58065:31799,58066:31787,58067:31805,58068:31820,58069:31811,58070:31828,58071:31823,58072:31808,58073:31824,58074:31832,58075:31839,58076:31844,58077:31830,58078:31845,58079:31852,58080:31861,58081:31875,58082:31888,58083:31908,58084:31917,58085:31906,58086:31915,58087:31905,58088:31912,58089:31923,58090:31922,58091:31921,58092:31918,58093:31929,58094:31933,58095:31936,58096:31941,58097:31938,58098:31960,58099:31954,58100:31964,58101:31970,58102:39739,58103:31983,58104:31986,58105:31988,58106:31990,58107:31994,58108:32006,58176:32002,58177:32028,58178:32021,58179:32010,58180:32069,58181:32075,58182:32046,58183:32050,58184:32063,58185:32053,58186:32070,58187:32115,58188:32086,58189:32078,58190:32114,58191:32104,58192:32110,58193:32079,58194:32099,58195:32147,58196:32137,58197:32091,58198:32143,58199:32125,58200:32155,58201:32186,58202:32174,58203:32163,58204:32181,58205:32199,58206:32189,58207:32171,58208:32317,58209:32162,58210:32175,58211:32220,58212:32184,58213:32159,58214:32176,58215:32216,58216:32221,58217:32228,58218:32222,58219:32251,58220:32242,58221:32225,58222:32261,58223:32266,58224:32291,58225:32289,58226:32274,58227:32305,58228:32287,58229:32265,58230:32267,58231:32290,58232:32326,58233:32358,58234:32315,58235:32309,58236:32313,58237:32323,58238:32311,58240:32306,58241:32314,58242:32359,58243:32349,58244:32342,58245:32350,58246:32345,58247:32346,58248:32377,58249:32362,58250:32361,58251:32380,58252:32379,58253:32387,58254:32213,58255:32381,58256:36782,58257:32383,58258:32392,58259:32393,58260:32396,58261:32402,58262:32400,58263:32403,58264:32404,58265:32406,58266:32398,58267:32411,58268:32412,58269:32568,58270:32570,58271:32581,58272:32588,58273:32589,58274:32590,58275:32592,58276:32593,58277:32597,58278:32596,58279:32600,58280:32607,58281:32608,58282:32616,58283:32617,58284:32615,58285:32632,58286:32642,58287:32646,58288:32643,58289:32648,58290:32647,58291:32652,58292:32660,58293:32670,58294:32669,58295:32666,58296:32675,58297:32687,58298:32690,58299:32697,58300:32686,58301:32694,58302:32696,58303:35697,58304:32709,58305:32710,58306:32714,58307:32725,58308:32724,58309:32737,58310:32742,58311:32745,58312:32755,58313:32761,58314:39132,58315:32774,58316:32772,58317:32779,58318:32786,58319:32792,58320:32793,58321:32796,58322:32801,58323:32808,58324:32831,58325:32827,58326:32842,58327:32838,58328:32850,58329:32856,58330:32858,58331:32863,58332:32866,58333:32872,58334:32883,58335:32882,58336:32880,58337:32886,58338:32889,58339:32893,58340:32895,58341:32900,58342:32902,58343:32901,58344:32923,58345:32915,58346:32922,58347:32941,58348:20880,58349:32940,58350:32987,58351:32997,58352:32985,58353:32989,58354:32964,58355:32986,58356:32982,58357:33033,58358:33007,58359:33009,58360:33051,58361:33065,58362:33059,58363:33071,58364:33099,58432:38539,58433:33094,58434:33086,58435:33107,58436:33105,58437:33020,58438:33137,58439:33134,58440:33125,58441:33126,58442:33140,58443:33155,58444:33160,58445:33162,58446:33152,58447:33154,58448:33184,58449:33173,58450:33188,58451:33187,58452:33119,58453:33171,58454:33193,58455:33200,58456:33205,58457:33214,58458:33208,58459:33213,58460:33216,58461:33218,58462:33210,58463:33225,58464:33229,58465:33233,58466:33241,58467:33240,58468:33224,58469:33242,58470:33247,58471:33248,58472:33255,58473:33274,58474:33275,58475:33278,58476:33281,58477:33282,58478:33285,58479:33287,58480:33290,58481:33293,58482:33296,58483:33302,58484:33321,58485:33323,58486:33336,58487:33331,58488:33344,58489:33369,58490:33368,58491:33373,58492:33370,58493:33375,58494:33380,58496:33378,58497:33384,58498:33386,58499:33387,58500:33326,58501:33393,58502:33399,58503:33400,58504:33406,58505:33421,58506:33426,58507:33451,58508:33439,58509:33467,58510:33452,58511:33505,58512:33507,58513:33503,58514:33490,58515:33524,58516:33523,58517:33530,58518:33683,58519:33539,58520:33531,58521:33529,58522:33502,58523:33542,58524:33500,58525:33545,58526:33497,58527:33589,58528:33588,58529:33558,58530:33586,58531:33585,58532:33600,58533:33593,58534:33616,58535:33605,58536:33583,58537:33579,58538:33559,58539:33560,58540:33669,58541:33690,58542:33706,58543:33695,58544:33698,58545:33686,58546:33571,58547:33678,58548:33671,58549:33674,58550:33660,58551:33717,58552:33651,58553:33653,58554:33696,58555:33673,58556:33704,58557:33780,58558:33811,58559:33771,58560:33742,58561:33789,58562:33795,58563:33752,58564:33803,58565:33729,58566:33783,58567:33799,58568:33760,58569:33778,58570:33805,58571:33826,58572:33824,58573:33725,58574:33848,58575:34054,58576:33787,58577:33901,58578:33834,58579:33852,58580:34138,58581:33924,58582:33911,58583:33899,58584:33965,58585:33902,58586:33922,58587:33897,58588:33862,58589:33836,58590:33903,58591:33913,58592:33845,58593:33994,58594:33890,58595:33977,58596:33983,58597:33951,58598:34009,58599:33997,58600:33979,58601:34010,58602:34e3,58603:33985,58604:33990,58605:34006,58606:33953,58607:34081,58608:34047,58609:34036,58610:34071,58611:34072,58612:34092,58613:34079,58614:34069,58615:34068,58616:34044,58617:34112,58618:34147,58619:34136,58620:34120,58688:34113,58689:34306,58690:34123,58691:34133,58692:34176,58693:34212,58694:34184,58695:34193,58696:34186,58697:34216,58698:34157,58699:34196,58700:34203,58701:34282,58702:34183,58703:34204,58704:34167,58705:34174,58706:34192,58707:34249,58708:34234,58709:34255,58710:34233,58711:34256,58712:34261,58713:34269,58714:34277,58715:34268,58716:34297,58717:34314,58718:34323,58719:34315,58720:34302,58721:34298,58722:34310,58723:34338,58724:34330,58725:34352,58726:34367,58727:34381,58728:20053,58729:34388,58730:34399,58731:34407,58732:34417,58733:34451,58734:34467,58735:34473,58736:34474,58737:34443,58738:34444,58739:34486,58740:34479,58741:34500,58742:34502,58743:34480,58744:34505,58745:34851,58746:34475,58747:34516,58748:34526,58749:34537,58750:34540,58752:34527,58753:34523,58754:34543,58755:34578,58756:34566,58757:34568,58758:34560,58759:34563,58760:34555,58761:34577,58762:34569,58763:34573,58764:34553,58765:34570,58766:34612,58767:34623,58768:34615,58769:34619,58770:34597,58771:34601,58772:34586,58773:34656,58774:34655,58775:34680,58776:34636,58777:34638,58778:34676,58779:34647,58780:34664,58781:34670,58782:34649,58783:34643,58784:34659,58785:34666,58786:34821,58787:34722,58788:34719,58789:34690,58790:34735,58791:34763,58792:34749,58793:34752,58794:34768,58795:38614,58796:34731,58797:34756,58798:34739,58799:34759,58800:34758,58801:34747,58802:34799,58803:34802,58804:34784,58805:34831,58806:34829,58807:34814,58808:34806,58809:34807,58810:34830,58811:34770,58812:34833,58813:34838,58814:34837,58815:34850,58816:34849,58817:34865,58818:34870,58819:34873,58820:34855,58821:34875,58822:34884,58823:34882,58824:34898,58825:34905,58826:34910,58827:34914,58828:34923,58829:34945,58830:34942,58831:34974,58832:34933,58833:34941,58834:34997,58835:34930,58836:34946,58837:34967,58838:34962,58839:34990,58840:34969,58841:34978,58842:34957,58843:34980,58844:34992,58845:35007,58846:34993,58847:35011,58848:35012,58849:35028,58850:35032,58851:35033,58852:35037,58853:35065,58854:35074,58855:35068,58856:35060,58857:35048,58858:35058,58859:35076,58860:35084,58861:35082,58862:35091,58863:35139,58864:35102,58865:35109,58866:35114,58867:35115,58868:35137,58869:35140,58870:35131,58871:35126,58872:35128,58873:35148,58874:35101,58875:35168,58876:35166,58944:35174,58945:35172,58946:35181,58947:35178,58948:35183,58949:35188,58950:35191,58951:35198,58952:35203,58953:35208,58954:35210,58955:35219,58956:35224,58957:35233,58958:35241,58959:35238,58960:35244,58961:35247,58962:35250,58963:35258,58964:35261,58965:35263,58966:35264,58967:35290,58968:35292,58969:35293,58970:35303,58971:35316,58972:35320,58973:35331,58974:35350,58975:35344,58976:35340,58977:35355,58978:35357,58979:35365,58980:35382,58981:35393,58982:35419,58983:35410,58984:35398,58985:35400,58986:35452,58987:35437,58988:35436,58989:35426,58990:35461,58991:35458,58992:35460,58993:35496,58994:35489,58995:35473,58996:35493,58997:35494,58998:35482,58999:35491,59e3:35524,59001:35533,59002:35522,59003:35546,59004:35563,59005:35571,59006:35559,59008:35556,59009:35569,59010:35604,59011:35552,59012:35554,59013:35575,59014:35550,59015:35547,59016:35596,59017:35591,59018:35610,59019:35553,59020:35606,59021:35600,59022:35607,59023:35616,59024:35635,59025:38827,59026:35622,59027:35627,59028:35646,59029:35624,59030:35649,59031:35660,59032:35663,59033:35662,59034:35657,59035:35670,59036:35675,59037:35674,59038:35691,59039:35679,59040:35692,59041:35695,59042:35700,59043:35709,59044:35712,59045:35724,59046:35726,59047:35730,59048:35731,59049:35734,59050:35737,59051:35738,59052:35898,59053:35905,59054:35903,59055:35912,59056:35916,59057:35918,59058:35920,59059:35925,59060:35938,59061:35948,59062:35960,59063:35962,59064:35970,59065:35977,59066:35973,59067:35978,59068:35981,59069:35982,59070:35988,59071:35964,59072:35992,59073:25117,59074:36013,59075:36010,59076:36029,59077:36018,59078:36019,59079:36014,59080:36022,59081:36040,59082:36033,59083:36068,59084:36067,59085:36058,59086:36093,59087:36090,59088:36091,59089:36100,59090:36101,59091:36106,59092:36103,59093:36111,59094:36109,59095:36112,59096:40782,59097:36115,59098:36045,59099:36116,59100:36118,59101:36199,59102:36205,59103:36209,59104:36211,59105:36225,59106:36249,59107:36290,59108:36286,59109:36282,59110:36303,59111:36314,59112:36310,59113:36300,59114:36315,59115:36299,59116:36330,59117:36331,59118:36319,59119:36323,59120:36348,59121:36360,59122:36361,59123:36351,59124:36381,59125:36382,59126:36368,59127:36383,59128:36418,59129:36405,59130:36400,59131:36404,59132:36426,59200:36423,59201:36425,59202:36428,59203:36432,59204:36424,59205:36441,59206:36452,59207:36448,59208:36394,59209:36451,59210:36437,59211:36470,59212:36466,59213:36476,59214:36481,59215:36487,59216:36485,59217:36484,59218:36491,59219:36490,59220:36499,59221:36497,59222:36500,59223:36505,59224:36522,59225:36513,59226:36524,59227:36528,59228:36550,59229:36529,59230:36542,59231:36549,59232:36552,59233:36555,59234:36571,59235:36579,59236:36604,59237:36603,59238:36587,59239:36606,59240:36618,59241:36613,59242:36629,59243:36626,59244:36633,59245:36627,59246:36636,59247:36639,59248:36635,59249:36620,59250:36646,59251:36659,59252:36667,59253:36665,59254:36677,59255:36674,59256:36670,59257:36684,59258:36681,59259:36678,59260:36686,59261:36695,59262:36700,59264:36706,59265:36707,59266:36708,59267:36764,59268:36767,59269:36771,59270:36781,59271:36783,59272:36791,59273:36826,59274:36837,59275:36834,59276:36842,59277:36847,59278:36999,59279:36852,59280:36869,59281:36857,59282:36858,59283:36881,59284:36885,59285:36897,59286:36877,59287:36894,59288:36886,59289:36875,59290:36903,59291:36918,59292:36917,59293:36921,59294:36856,59295:36943,59296:36944,59297:36945,59298:36946,59299:36878,59300:36937,59301:36926,59302:36950,59303:36952,59304:36958,59305:36968,59306:36975,59307:36982,59308:38568,59309:36978,59310:36994,59311:36989,59312:36993,59313:36992,59314:37002,59315:37001,59316:37007,59317:37032,59318:37039,59319:37041,59320:37045,59321:37090,59322:37092,59323:25160,59324:37083,59325:37122,59326:37138,59327:37145,59328:37170,59329:37168,59330:37194,59331:37206,59332:37208,59333:37219,59334:37221,59335:37225,59336:37235,59337:37234,59338:37259,59339:37257,59340:37250,59341:37282,59342:37291,59343:37295,59344:37290,59345:37301,59346:37300,59347:37306,59348:37312,59349:37313,59350:37321,59351:37323,59352:37328,59353:37334,59354:37343,59355:37345,59356:37339,59357:37372,59358:37365,59359:37366,59360:37406,59361:37375,59362:37396,59363:37420,59364:37397,59365:37393,59366:37470,59367:37463,59368:37445,59369:37449,59370:37476,59371:37448,59372:37525,59373:37439,59374:37451,59375:37456,59376:37532,59377:37526,59378:37523,59379:37531,59380:37466,59381:37583,59382:37561,59383:37559,59384:37609,59385:37647,59386:37626,59387:37700,59388:37678,59456:37657,59457:37666,59458:37658,59459:37667,59460:37690,59461:37685,59462:37691,59463:37724,59464:37728,59465:37756,59466:37742,59467:37718,59468:37808,59469:37804,59470:37805,59471:37780,59472:37817,59473:37846,59474:37847,59475:37864,59476:37861,59477:37848,59478:37827,59479:37853,59480:37840,59481:37832,59482:37860,59483:37914,59484:37908,59485:37907,59486:37891,59487:37895,59488:37904,59489:37942,59490:37931,59491:37941,59492:37921,59493:37946,59494:37953,59495:37970,59496:37956,59497:37979,59498:37984,59499:37986,59500:37982,59501:37994,59502:37417,59503:38e3,59504:38005,59505:38007,59506:38013,59507:37978,59508:38012,59509:38014,59510:38017,59511:38015,59512:38274,59513:38279,59514:38282,59515:38292,59516:38294,59517:38296,59518:38297,59520:38304,59521:38312,59522:38311,59523:38317,59524:38332,59525:38331,59526:38329,59527:38334,59528:38346,59529:28662,59530:38339,59531:38349,59532:38348,59533:38357,59534:38356,59535:38358,59536:38364,59537:38369,59538:38373,59539:38370,59540:38433,59541:38440,59542:38446,59543:38447,59544:38466,59545:38476,59546:38479,59547:38475,59548:38519,59549:38492,59550:38494,59551:38493,59552:38495,59553:38502,59554:38514,59555:38508,59556:38541,59557:38552,59558:38549,59559:38551,59560:38570,59561:38567,59562:38577,59563:38578,59564:38576,59565:38580,59566:38582,59567:38584,59568:38585,59569:38606,59570:38603,59571:38601,59572:38605,59573:35149,59574:38620,59575:38669,59576:38613,59577:38649,59578:38660,59579:38662,59580:38664,59581:38675,59582:38670,59583:38673,59584:38671,59585:38678,59586:38681,59587:38692,59588:38698,59589:38704,59590:38713,59591:38717,59592:38718,59593:38724,59594:38726,59595:38728,59596:38722,59597:38729,59598:38748,59599:38752,59600:38756,59601:38758,59602:38760,59603:21202,59604:38763,59605:38769,59606:38777,59607:38789,59608:38780,59609:38785,59610:38778,59611:38790,59612:38795,59613:38799,59614:38800,59615:38812,59616:38824,59617:38822,59618:38819,59619:38835,59620:38836,59621:38851,59622:38854,59623:38856,59624:38859,59625:38876,59626:38893,59627:40783,59628:38898,59629:31455,59630:38902,59631:38901,59632:38927,59633:38924,59634:38968,59635:38948,59636:38945,59637:38967,59638:38973,59639:38982,59640:38991,59641:38987,59642:39019,59643:39023,59644:39024,59712:39025,59713:39028,59714:39027,59715:39082,59716:39087,59717:39089,59718:39094,59719:39108,59720:39107,59721:39110,59722:39145,59723:39147,59724:39171,59725:39177,59726:39186,59727:39188,59728:39192,59729:39201,59730:39197,59731:39198,59732:39204,59733:39200,59734:39212,59735:39214,59736:39229,59737:39230,59738:39234,59739:39241,59740:39237,59741:39248,59742:39243,59743:39249,59744:39250,59745:39244,59746:39253,59747:39319,59748:39320,59749:39333,59750:39341,59751:39342,59752:39356,59753:39391,59754:39387,59755:39389,59756:39384,59757:39377,59758:39405,59759:39406,59760:39409,59761:39410,59762:39419,59763:39416,59764:39425,59765:39439,59766:39429,59767:39394,59768:39449,59769:39467,59770:39479,59771:39493,59772:39490,59773:39488,59774:39491,59776:39486,59777:39509,59778:39501,59779:39515,59780:39511,59781:39519,59782:39522,59783:39525,59784:39524,59785:39529,59786:39531,59787:39530,59788:39597,59789:39600,59790:39612,59791:39616,59792:39631,59793:39633,59794:39635,59795:39636,59796:39646,59797:39647,59798:39650,59799:39651,59800:39654,59801:39663,59802:39659,59803:39662,59804:39668,59805:39665,59806:39671,59807:39675,59808:39686,59809:39704,59810:39706,59811:39711,59812:39714,59813:39715,59814:39717,59815:39719,59816:39720,59817:39721,59818:39722,59819:39726,59820:39727,59821:39730,59822:39748,59823:39747,59824:39759,59825:39757,59826:39758,59827:39761,59828:39768,59829:39796,59830:39827,59831:39811,59832:39825,59833:39830,59834:39831,59835:39839,59836:39840,59837:39848,59838:39860,59839:39872,59840:39882,59841:39865,59842:39878,59843:39887,59844:39889,59845:39890,59846:39907,59847:39906,59848:39908,59849:39892,59850:39905,59851:39994,59852:39922,59853:39921,59854:39920,59855:39957,59856:39956,59857:39945,59858:39955,59859:39948,59860:39942,59861:39944,59862:39954,59863:39946,59864:39940,59865:39982,59866:39963,59867:39973,59868:39972,59869:39969,59870:39984,59871:40007,59872:39986,59873:40006,59874:39998,59875:40026,59876:40032,59877:40039,59878:40054,59879:40056,59880:40167,59881:40172,59882:40176,59883:40201,59884:40200,59885:40171,59886:40195,59887:40198,59888:40234,59889:40230,59890:40367,59891:40227,59892:40223,59893:40260,59894:40213,59895:40210,59896:40257,59897:40255,59898:40254,59899:40262,59900:40264,59968:40285,59969:40286,59970:40292,59971:40273,59972:40272,59973:40281,59974:40306,59975:40329,59976:40327,59977:40363,59978:40303,59979:40314,59980:40346,59981:40356,59982:40361,59983:40370,59984:40388,59985:40385,59986:40379,59987:40376,59988:40378,59989:40390,59990:40399,59991:40386,59992:40409,59993:40403,59994:40440,59995:40422,59996:40429,59997:40431,59998:40445,59999:40474,6e4:40475,60001:40478,60002:40565,60003:40569,60004:40573,60005:40577,60006:40584,60007:40587,60008:40588,60009:40594,60010:40597,60011:40593,60012:40605,60013:40613,60014:40617,60015:40632,60016:40618,60017:40621,60018:38753,60019:40652,60020:40654,60021:40655,60022:40656,60023:40660,60024:40668,60025:40670,60026:40669,60027:40672,60028:40677,60029:40680,60030:40687,60032:40692,60033:40694,60034:40695,60035:40697,60036:40699,60037:40700,60038:40701,60039:40711,60040:40712,60041:30391,60042:40725,60043:40737,60044:40748,60045:40766,60046:40778,60047:40786,60048:40788,60049:40803,60050:40799,60051:40800,60052:40801,60053:40806,60054:40807,60055:40812,60056:40810,60057:40823,60058:40818,60059:40822,60060:40853,60061:40860,60062:40864,60063:22575,60064:27079,60065:36953,60066:29796,60067:20956,60068:29081}},function(
976r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(1),o=i(2);function l(x,f,h,m){var p;f.degree()<h.degree()&&(p=[h,f],f=p[0],h=p[1]);for(var v=f,y=h,b=x.zero,g=x.one;y.degree()>=m/2;){var w=v,E=b;if(v=y,b=g,v.isZero())return null;y=w;for(var C=x.zero,j=v.getCoefficient(v.degree()),S=x.inverse(j);y.degree()>=v.degree()&&!y.isZero();){var _=y.degree()-v.degree(),O=x.multiply(y.getCoefficient(y.degree()),S);C=C.addOrSubtract(x.buildMonomial(_,O)),y=y.addOrSubtract(v.multiplyByMonomial(_,O))}if(g=C.multiplyPoly(b).addOrSubtract(E),y.degree()>=v.degree())return null}var I=g.getCoefficient(0);if(I===0)return null;var B=x.inverse(I);return[g.multiply(B),y.multiply(B)]}function c(x,f){var h=f.degree();if(h===1)return[f.getCoefficient(1)];for(var m=new Array(h),p=0,v=1;v<x.size&&p<h;v++)f.evaluateAt(v)===0&&(m[p]=x.inverse(v),p++);return p!==h?null:m}function u(x,f,h){for(var m=h.length,p=new Array(m),v=0;v<m;v++){for(var y=x.inverse(h[v]),b=1,g=0;g<m;g++)v!==g&&(b=x.multiply(b,a.addOrSubtractGF(1,x.multiply(h[g],y))));p[v]=x.multiply(f.evaluateAt(y),x.inverse(b)),x.generatorBase!==0&&(p[v]=x.multiply(
976p[v],y))}return p}function d(x,f){var h=new Uint8ClampedArray(x.length);h.set(x);for(var m=new a.default(285,256,0),p=new o.default(m,h),v=new Uint8ClampedArray(f),y=!1,b=0;b<f;b++){var g=p.evaluateAt(m.exp(b+m.generatorBase));v[v.length-1-b]=g,g!==0&&(y=!0)}if(!y)return h;var w=new o.default(m,v),E=l(m,m.buildMonomial(f,1),w,f);if(E===null)return null;var C=c(m,E[0]);if(C==null)return null;for(var j=u(m,E[1],C),S=0;S<C.length;S++){var _=h.length-1-m.log(C[S]);if(_<0)return null;h[_]=a.addOrSubtractGF(h[_],j[S])}return h}n.decode=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.VERSIONS=[{infoBits:null,versionNumber:1,alignmentPatternCenters:[],errorCorrectionLevels:[{ecCodewordsPerBlock:7,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:13,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:13}]},{ecCodewordsPerBlock:17,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:2,alignmentPatternCenters:[6,18],errorCorrectionLevels:[{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:34}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:28}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]}]},{infoBits:null,versionNumber:3,alignmentPatternCenters:[6,22],errorCorrectionLevels:[{ecCodewordsPerBlock:15,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:55}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:13}]}]},{infoBits:null,versionNumber:4,alignmentPatternCenters:[6,26],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:80}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:32}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:5,alignmentPatternCenters:[6,30],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:43}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:11},{numBlocks:2,dataCodewordsPerBlock:12}]}]},{infoBits:null,versionNumber:6,alignmentPatternCenters:[6,34],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:27}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:31892,versionNumber:7,alignmentPatternCenters:[6,22,38],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:78}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:31}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:13},{numBlocks:1,dataCodewordsPerBlock:14}]}]},{infoBits:34236,versionNumber:8,alignmentPatternCenters:[6,24,42],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:97}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:38},{numBlocks:2,dataCodewordsPerBlock:39}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:18},{numBlocks:2,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:14},{numBlocks:2,dataCodewordsPerBlock:15}]}]},{infoBits:39577,versionNumber:9,alignmentPatternCenters:[6,26,46],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:12},{numBlocks:4,dataCodewordsPerBlock:13}]}]},{infoBits:42195,versionNumber:10,alignmentPatternCenters:[6,28,50],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68},{numBlocks:2,dataCodewordsPerBlock:69}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:43},{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]}]},{infoBits:48118,versionNumber:11,alignmentPatternCenters:[6,30,54],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:81}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:50},{numBlocks:4,dataCodewordsPerBlock:51}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:22},{numBlocks:4,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:12},{numBlocks:8,dataCodewordsPerBlock:13}]}]}
976,{infoBits:51042,versionNumber:12,alignmentPatternCenters:[6,32,58],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:92},{numBlocks:2,dataCodewordsPerBlock:93}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:20},{numBlocks:6,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:55367,versionNumber:13,alignmentPatternCenters:[6,34,62],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:37},{numBlocks:1,dataCodewordsPerBlock:38}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:20},{numBlocks:4,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:11},{numBlocks:4,dataCodewordsPerBlock:12}]}]},{infoBits:58893,versionNumber:14,alignmentPatternCenters:[6,26,46,66],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:40},{numBlocks:5,dataCodewordsPerBlock:41}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:16},{numBlocks:5,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:5,dataCodewordsPerBlock:13}]}]},{infoBits:63784,versionNumber:15,alignmentPatternCenters:[6,26,48,70],errorCorrectionLevels:[{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:87},{numBlocks:1,dataCodewordsPerBlock:88}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:41},{numBlocks:5,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:7,dataCodewordsPerBlock:13}]}]},{infoBits:68472,versionNumber:16,alignmentPatternCenters:[6,26,50,74],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:98},{numBlocks:1,dataCodewordsPerBlock:99}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:70749,versionNumber:17,alignmentPatternCenters:[6,30,54,78],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:1,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22},{numBlocks:15,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:17,dataCodewordsPerBlock:15}]}]},{infoBits:76311,versionNumber:18,alignmentPatternCenters:[6,30,56,82],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:120},{numBlocks:1,dataCodewordsPerBlock:121}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:43},{numBlocks:4,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:1,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:19,dataCodewordsPerBlock:15}]}]},{infoBits:79154,versionNumber:19,alignmentPatternCenters:[6,30,58,86],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:113},{numBlocks:4,dataCodewordsPerBlock:114}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:44},{numBlocks:11,dataCodewordsPerBlock:45}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:21},{numBlocks:4,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:13},{numBlocks:16,dataCodewordsPerBlock:14}]}]},{infoBits:84390,versionNumber:20,alignmentPatternCenters:[6,34,62,90],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:41},{numBlocks:13,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:5,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:15},{numBlocks:10,dataCodewordsPerBlock:16}]}]},{infoBits:87683,versionNumber:21,alignmentPatternCenters:[6,28,50,72,94],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:116},{numBlocks:4,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:16},{numBlocks:6,dataCodewordsPerBlock:17}]}]},{infoBits:92361,versionNumber:22,alignmentPatternCenters:[6,26,50,74,98],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:111},{numBlocks:7,dataCodewordsPerBlock:112}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:13}]}]},{infoBits:96236,versionNumber:23,alignmentPatternCenters:[6,30,54,74,102],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:121},{numBlocks:5,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:47},{numBlocks:14,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:16,dataCodewordsPerBlock:15},{numBlocks:14,dataCodewordsPerBlock:16}]}]},{infoBits:102084,versionNumber:24,alignmentPatternCenters:[6,28,54,80,106],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:45},{numBlocks:14,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:30,dataCodewordsPerBlock:16},{numBlocks:2,dataCodewordsPerBlock:17}]}]},{infoBits:102881,versionNumber:25,alignmentPatternCenters:[6,32,58,84,110],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:106},{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:47},{numBlocks:13,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:110507,versionNumber:26,alignmentPatternCenters:[6,30,58,86,114],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:114},{numBlocks:2,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:46},{numBlocks:4,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:28,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:33,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]}]},{infoBits:110734,versionNumber:27,alignmentPatternCenters:[6,34,62,90,118],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:23},{numBlocks:26,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:117786,versionNumber:28,alignmentPatternCenters:[6,26,50,74,98,122],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:117},{numBlocks:10,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:45},{numBlocks:23,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:24},{numBlocks:31,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:31,dataCodewordsPerBlock:16}]}]},{infoBits:119615,versionNumber:29,alignmentPatternCenters:[6,30,54,78,102,126],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:116},{numBlocks:7,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:21,dataCodewordsPerBlock:45},{numBlocks:7,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:23},{numBlocks:37,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:26,dataCodewordsPerBlock:16}]}]},{infoBits:126325,versionNumber:30,alignmentPatternCenters:[6,26,52,78,104,130],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:115},{numBlocks:10,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:47},{numBlocks:10,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:25,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:25,dataCodewordsPerBlock:16}]}]},{infoBits:127568,versionNumber:31,alignmentPatternCenters:[6,30,56,82,108,134],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:3,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:46},{numBlocks:29,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:24},{numBlocks:1,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:133589,versionNumber:32,alignmentPatternCenters:[6,34,60,86,112,138],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:24},{numBlocks:35,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:35,dataCodewordsPerBlock:16}]}]},{infoBits:136944,versionNumber:33,alignmentPatternCenters:[6,30,58,86,114,142],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:21,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:24},{numBlocks:19,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:141498,versionNumber:34,alignmentPatternCenters:[6,34,62,90,118,146],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:6,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:44,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:59,dataCodewordsPerBlock:16},{numBlocks:1,dataCodewordsPerBlock:17}]}]},{infoBits:145311,versionNumber:35,alignmentPatternCenters:[6,30,54,78,102,126,150],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:121},{numBlocks:7,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:47},{numBlocks:26,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:39,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15}
976,{numBlocks:41,dataCodewordsPerBlock:16}]}]},{infoBits:150283,versionNumber:36,alignmentPatternCenters:[6,24,50,76,102,128,154],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:121},{numBlocks:14,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:47},{numBlocks:34,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:46,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:64,dataCodewordsPerBlock:16}]}]},{infoBits:152622,versionNumber:37,alignmentPatternCenters:[6,28,54,80,106,132,158],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:46},{numBlocks:14,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:49,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:24,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:158308,versionNumber:38,alignmentPatternCenters:[6,32,58,84,110,136,162],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:122},{numBlocks:18,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:46},{numBlocks:32,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:48,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:15},{numBlocks:32,dataCodewordsPerBlock:16}]}]},{infoBits:161089,versionNumber:39,alignmentPatternCenters:[6,26,54,82,110,138,166],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:40,dataCodewordsPerBlock:47},{numBlocks:7,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:43,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:15},{numBlocks:67,dataCodewordsPerBlock:16}]}]},{infoBits:167017,versionNumber:40,alignmentPatternCenters:[6,30,58,86,114,142,170],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:118},{numBlocks:6,dataCodewordsPerBlock:119}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:18,dataCodewordsPerBlock:47},{numBlocks:31,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:24},{numBlocks:34,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:15},{numBlocks:61,dataCodewordsPerBlock:16}]}]}]},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(0);function o(d,x,f,h){var m=d.x-x.x+f.x-h.x,p=d.y-x.y+f.y-h.y;if(m===0&&p===0)return{a11:x.x-d.x,a12:x.y-d.y,a13:0,a21:f.x-x.x,a22:f.y-x.y,a23:0,a31:d.x,a32:d.y,a33:1};var v=x.x-f.x,y=h.x-f.x,b=x.y-f.y,g=h.y-f.y,w=v*g-y*b,E=(m*g-y*p)/w,C=(v*p-m*b)/w;return{a11:x.x-d.x+E*x.x,a12:x.y-d.y+E*x.y,a13:E,a21:h.x-d.x+C*h.x,a22:h.y-d.y+C*h.y,a23:C,a31:d.x,a32:d.y,a33:1}}function l(d,x,f,h){var m=o(d,x,f,h);return{a11:m.a22*m.a33-m.a23*m.a32,a12:m.a13*m.a32-m.a12*m.a33,a13:m.a12*m.a23-m.a13*m.a22,a21:m.a23*m.a31-m.a21*m.a33,a22:m.a11*m.a33-m.a13*m.a31,a23:m.a13*m.a21-m.a11*m.a23,a31:m.a21*m.a32-m.a22*m.a31,a32:m.a12*m.a31-m.a11*m.a32,a33:m.a11*m.a22-m.a12*m.a21}}function c(d,x){return{a11:d.a11*x.a11+d.a21*x.a12+d.a31*x.a13,a12:d.a12*x.a11+d.a22*x.a12+d.a32*x.a13,a13:d.a13*x.a11+d.a23*x.a12+d.a33*x.a13,a21:d.a11*x.a21+d.a21*x.a22+d.a31*x.a23,a22:d.a12*x.a21+d.a22*x.a22+d.a32*x.a23,a23:d.a13*x.a21+d.a23*x.a22+d.a33*x.a23,a31:d.a11*x.a31+d.a21*x.a32+d.a31*x.a33,a32:d.a12*x.a31+d.a22*x.a32+d.a32*x.a33,a33:d.a13*x.a31+d.a23*x.a32+d.a33*x.a33}}function u(d,x){for(var f=l({x:3.5,y:3.5},{x:x.dimension-3.5,y:3.5},{x:x.dimension-6.5,y:x.dimension-6.5},{x:3.5,y:x.dimension-3.5}),h=o(x.topLeft,x.topRight,x.alignmentPattern,x.bottomLeft),m=c(h,f),p=a.BitMatrix.createEmpty(x.dimension,x.dimension),v=function(C,j){var S=m.a13*C+m.a23*j+m.a33;return{x:(m.a11*C+m.a21*j+m.a31)/S,y:(m.a12*C+m.a22*j+m.a32)/S}},y=0;y<x.dimension;y++)for(var b=0;b<x.dimension;b++){var g=b+.5,w=y+.5,E=v(g,w);p.set(b,y,d.get(Math.floor(E.x),Math.floor(E.y)))}return{matrix:p,mappingFunction:v}}n.extract=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=4,o=.5,l=1.5,c=function(g,w){return Math.sqrt(Math.pow(w.x-g.x,2)+Math.pow(w.y-g.y,2))};function u(g){return g.reduce(function(w,E){return w+E})}function d(g,w,E){var C,j,S,_,O=c(g,w),I=c(w,E),B=c(g,E),T,k,$;return I>=O&&I>=B?(C=[w,g,E],T=C[0],k=C[1],$=C[2]):B>=I&&B>=O?(j=[g,w,E],T=j[0],k=j[1],$=j[2]):(S=[g,E,w],T=S[0],k=S[1],$=S[2]),($.x-k.x)*(T.y-k.y)-($.y-k.y)*(T.x-k.x)<0&&(_=[$,T],T=_[0],$=_[1]),{bottomLeft:T,topLeft:k,topRight:$}}function x(g,w,E,C){var j=(u(h(g,E,C,5))/7+u(h(g,w,C,5))/7+u(h(E,g,C,5))/7+u(h(w,g,C,5))/7)/4;if(j<1)throw new Error("Invalid module size");var S=Math.round(c(g,w)/j),_=Math.round(c(g,E)/j),O=Math.floor((S+_)/2)+7;switch(O%4){case 0:O++;break;case 2:O--;break}return{dimension:O,moduleSize:j}}function f(g,w,E,C){var j=[{x:Math.floor(g.x),y:Math.floor(g.y)}],S=Math.abs(w.y-g.y)>Math.abs(w.x-g.x),_,O,I,B;
vendor: 4,942 bytes, line 976
976S?(_=Math.floor(g.y),O=Math.floor(g.x),I=Math.floor(w.y),B=Math.floor(w.x)):(_=Math.floor(g.x),O=Math.floor(g.y),I=Math.floor(w.x),B=Math.floor(w.y));for(var T=Math.abs(I-_),k=Math.abs(B-O),$=Math.floor(-T/2),W=_<I?1:-1,z=O<B?1:-1,L=!0,F=_,U=O;F!==I+W;F+=W){var D=S?U:F,N=S?F:U;if(E.get(D,N)!==L&&(L=!L,j.push({x:D,y:N}),j.length===C+1))break;if($+=k,$>0){if(U===B)break;U+=z,$-=T}}for(var K=[],R=0;R<C;R++)j[R]&&j[R+1]?K.push(c(j[R],j[R+1])):K.push(0);return K}function h(g,w,E,C){var j,S=w.y-g.y,_=w.x-g.x,O=f(g,w,E,Math.ceil(C/2)),I=f(g,{x:g.x-_,y:g.y-S},E,Math.ceil(C/2)),B=O.shift()+I.shift()-1;return(j=I.concat(B)).concat.apply(j,O)}function m(g,w){var E=u(g)/u(w),C=0;return w.forEach(function(j,S){C+=Math.pow(g[S]-j*E,2)}),{averageSize:E,error:C}}function p(g,w,E){try{var C=h(g,{x:-1,y:g.y},E,w.length),j=h(g,{x:g.x,y:-1},E,w.length),S={x:Math.max(0,g.x-g.y)-1,y:Math.max(0,g.y-g.x)-1},_=h(g,S,E,w.length),O={x:Math.min(E.width,g.x+g.y)+1,y:Math.min(E.height,g.y+g.x)+1},I=h(g,O,E,w.length),B=m(C,w),T=m(j,w),k=m(_,w),$=m(I,w),W=Math.sqrt(B.error*B.error+T.error*T.error+k.error*k.error+$.error*$.error),z=(B.averageSize+T.averageSize+k.averageSize+$.averageSize)/4,L=(Math.pow(B.averageSize-z,2)+Math.pow(T.averageSize-z,2)+Math.pow(k.averageSize-z,2)+Math.pow($.averageSize-z,2))/z;return W+L}catch{return 1/0}}function v(g,w){for(var E=Math.round(w.x);g.get(E,Math.round(w.y));)E--;for(var C=Math.round(w.x);g.get(C,Math.round(w.y));)C++;for(var j=(E+C)/2,S=Math.round(w.y);g.get(Math.round(j),S);)S--;for(var _=Math.round(w.y);g.get(Math.round(j),_);)_++;var O=(S+_)/2;return{x:j,y:O}}function y(g){for(var w=[],E=[],C=[],j=[],S=function(D){for(var N=0,K=!1,R=[0,0,0,0,0],H=function(ie){var se=g.get(ie,D);if(se===K)N++;else{R=[R[1],R[2],R[3],R[4],N],N=1,K=se;var ne=u(R)/7,ce=Math.abs(R[0]-ne)<ne&&Math.abs(R[1]-ne)<ne&&Math.abs(R[2]-3*ne)<3*ne&&Math.abs(R[3]-ne)<ne&&Math.abs(R[4]-ne)<ne&&!se,ae=u(R.slice(-3))/3,Q=Math.abs(R[2]-ae)<ae&&Math.abs(R[3]-ae)<ae&&Math.abs(R[4]-ae)<ae&&se;if(ce){var he=ie-R[3]-R[4],P=he-R[2],G={startX:P,endX:he,y:D},Z=E.filter(function(Y){return P>=Y.bottom.startX&&P<=Y.bottom.endX||he>=Y.bottom.startX&&P<=Y.bottom.endX||P<=Y.bottom.startX&&he>=Y.bottom.endX&&R[2]/(Y.bottom.endX-Y.bottom.startX)<l&&R[2]/(Y.bottom.endX-Y.bottom.startX)>o});Z.length>0?Z[0].bottom=G:E.push({top:G,bottom:G})}if(Q){var V=ie-R[4],M=V-R[3],G={startX:M,y:D,endX:V},Z=j.filter(function(te){return M>=te.bottom.startX&&M<=te.bottom.endX||V>=te.bottom.startX&&M<=te.bottom.endX||M<=te.bottom.startX&&V>=te.bottom.endX&&R[2]/(te.bottom.endX-te.bottom.startX)<l&&R[2]/(te.bottom.endX-te.bottom.startX)>o});Z.length>0?Z[0].bottom=G:j.push({top:G,bottom:G})}}},X=-1;X<=g.width;X++)H(X);w.push.apply(w,E.filter(function(ie){return ie.bottom.y!==D&&ie.bottom.y-ie.top.y>=2})),E=E.filter(function(ie){return ie.bottom.y===D}),C.push.apply(C,j.filter(function(ie){return ie.bottom.y!==D})),j=j.filter(function(ie){return ie.bottom.y===D})},_=0;_<=g.height;_++)S(_);w.push.apply(w,E.filter(function(D){return D.bottom.y-D.top.y>=2})),C.push.apply(C,j);var O=w.filter(function(D){return D.bottom.y-D.top.y>=2}).map(function(D){var N=(D.top.startX+D.top.endX+D.bottom.startX+D.bottom.endX)/4,K=(D.top.y+D.bottom.y+1)/2;if(g.get(Math.round(N),Math.round(K))){var R=[D.top.endX-D.top.startX,D.bottom.endX-D.bottom.startX,D.bottom.y-D.top.y+1],H=u(R)/R.length,X=p({x:Math.round(N),y:Math.round(K)},[1,1,3,1,1],g);return{score:X,x:N,y:K,size:H}}}).filter(function(D){return!!D}).sort(function(D,N){return D.score-N.score}).map(function(D,N,K){if(N>a)return null;var R=K.filter(function(X,ie){return N!==ie}).map(function(X){return{x:X.x,y:X.y,score:X.score+Math.pow(X.size-D.size,2)/D.size,size:X.size}}).sort(function(X,ie){return X.score-ie.score});if(R.length<2)return null;var H=D.score+R[0].score+R[1].score;return{points:[D].concat(R.slice(0,2)),score:H}}).filter(function(D){return!!D}).sort(function(D,N){return D.score-N.score});if(O.length===0)return null;var I=d(O[0].points[0],O[0].points[1],O[0].points[2]),B=I.topRight,T=I.topLeft,k=I.bottomLeft,$=b(g,C,B,T,k),W=[];$&&W.push({alignmentPattern:{x:$.alignmentPattern.x,y:$.alignmentPattern.y},bottomLeft:{x:k.x,y:k.y},dimension:$.dimension,topLeft:{x:T.x,y:T.y},topRight:{x:B.x,y:B.y}});var z=v(g,B),L=v(g,T),F=v(g,k),U=b(g,C,z,L,F);return U&&W.push({alignmentPattern:{x:U.alignmentPattern.x,y:U.alignmentPattern.y},bottomLeft:{x:F.x,y:F.y},topLeft:{x:L.x,y:L.y},topRight:{x:z.x,y:z.y},dimension:U.dimension}),W.length===0?null:W}n.locate=y;function b(g,w,E,C,j){var S,_,O;try{S=x(C,E,j,g),_=S.dimension,O=S.moduleSize}catch{return null}var I={x:E.x-C.x+j.x,y:E.y-C.y+j.y},B=(c(C,j)+c(C,E))/2/O,T=1-3/B,k={x:C.x+T*(I.x-C.x),y:C.y+T*(I.y-C.y)},$=w.map(function(z){var L=(z.top.startX+z.top.endX+z.bottom.startX+z.bottom.endX)/4,F=(z.top.y+z.bottom.y+1)/2;if(g.get(Math.floor(L),Math.floor(F))){var U=[z.top.endX-z.top.startX,z.bottom.endX-z.bottom.startX,z.bottom.y-z.to
976p.y+1];u(U)/U.length;var D=p({x:Math.floor(L),y:Math.floor(F)},[1,1,1],g),N=D+c({x:L,y:F},k);return{x:L,y:F,score:N}}}).filter(function(z){return!!z}).sort(function(z,L){return z.score-L.score}),W=B>=15&&$.length?$[0]:k;return{alignmentPattern:W,dimension:_}}}]).default})})($D);var R2e=$D.exports;const L2e=qe(R2e);function z2e(e){"vibrate"in navigator&&(e==="valid"?navigator.vibrate(200):navigator.vibrate([100,50,100]))}function U2e(){const[e,t]=A.useState(""),[r,n]=A.useState(!1),[i,a]=A.useState(!1),[o,l]=A.useState(null),[c,u]=A.useState(null),[d,x]=A.useState([]),f=A.useRef(null),h=A.useRef(null),m=A.useRef(null),p=A.useRef(""),v=A.useRef([]),y=A.useRef(!1);A.useEffect(()=>{v.current=d},[d]),A.useEffect(()=>{(async()=>{const{data:k}=await re.from("scanned_tickets").select("ticket_number, holder_name, event_title, scanned_at").order("scanned_at",{ascending:!1}).limit(200);if(k){const $=k.map(W=>({ticketNumber:W.ticket_number,holderName:W.holder_name||"â",eventTitle:W.event_title||"Spirit Festival 2027",status:"already_scanned",scannedAt:new Date(W.scanned_at).toLocaleTimeString("de-DE")}));x($)}})()},[]);function b(k){const $=k.trim();try{const W=JSON.parse($);return{ticketNumber:(W.tn||W.TN||W.ticketNumber||"").toString().toUpperCase(),holderName:W.holder||W.HOLDER||W.holderName||"â",eventTitle:W.evt||W.EVT||W.eventTitle||"Spirit Festival 2027"}}catch{return{ticketNumber:$.toUpperCase(),holderName:"â",eventTitle:"Spirit Festival 2027"}}}const g=A.useCallback(async k=>{if(!k.trim()||y.current)return;const $=b(k);if(!$.ticketNumber||$.ticketNumber===p.current)return;p.current=$.ticketNumber,setTimeout(()=>{p.current===$.ticketNumber&&(p.current="")},4e3),y.current=!0;const{data:W}=await re.from("tickets").select("id, order_id").eq("ticket_number",$.ticketNumber).maybeSingle();let z=null;if(W!=null&&W.order_id){const{data:N}=await re.from("orders").select("status").eq("id",W.order_id).maybeSingle();z=(N==null?void 0:N.status)??null}const{data:L}=await re.from("scanned_tickets").select("id").eq("ticket_number",$.ticketNumber).maybeSingle();let F;if(!(W!=null&&W.id)||z!=="paid")F="invalid";else if(L)F="already_scanned";else{F="valid";const{data:{user:N}}=await re.auth.getUser();await re.from("scanned_tickets").insert({ticket_number:$.ticketNumber,holder_name:$.holderName!=="â"?$.holderName:null,event_title:$.eventTitle,scanned_by:(N==null?void 0:N.id)||null})}y.current=!1;const U={ticketNumber:$.ticketNumber,holderName:$.holderName,eventTitle:$.eventTitle,status:F,scannedAt:new Date().toLocaleTimeString("de-DE")};l(U),x(N=>[U,...N]),t(""),setTimeout(()=>l(N=>(N==null?void 0:N.ticketNumber)===U.ticketNumber?null:N),3e3),u(F==="valid"?"bg-green-500/40":F==="already_scanned"?"bg-yellow-500/40":"bg-red-500/40"),setTimeout(()=>u(null),600),z2e(F)},[]),w=A.useRef(null),E=A.useRef(0),[C,j]=A.useState(!1),S=A.useCallback(()=>{w.current||(w.current=setInterval(()=>{const k=f.current,$=h.current;if(!k||!$||k.readyState<k.HAVE_ENOUGH_DATA)return;const W=k.videoWidth,z=k.videoHeight;if(W===0||z===0)return;$.width=W,$.height=z;const L=$.getContext("2d",{willReadFrequently:!0});if(!L)return;L.drawImage(k,0,0,W,z);const F=L.getImageData(0,0,W,z),U=L2e(F.data,W,z,{inversionAttempts:"attemptBoth"});E.current++,E.current%15===0&&(console.log(`[Scanner] frame #${E.current}, video ${W}x${z}, qr=${U?"FOUND":"none"}`),j(D=>!D)),U!=null&&U.data&&(console.log("[Scanner] QR detected:",U.data),g(U.data))},200))},[g]),_=A.useCallback(()=>{w.current&&(clearInterval(w.current),w.current=null)},[]);async function O(){a(!1);try{const k=await navigator.mediaDevices.getUserMedia({video:{facingMode:"environment",width:{ideal:1280},height:{ideal:720}},audio:!1});m.current=k,n(!0)}catch(k){console.error("Camera error:",k),a(!0)}}A.useEffect(()=>{if(r&&f.current&&m.current){const k=f.current;k.srcObject=m.current,k.setAttribute("playsinline","true"),k.muted=!0,k.play().catch($=>console.error("Video play error:",$))}},[r]),A.useEffect(()=>(r&&S(),()=>{_()}),[r,S,_]);function I(){_(),m.current&&(m.current.getTracks().forEach(k=>k.stop()),m.current=null),f.current&&(f.current.srcObject=null),n(!1)}A.useEffect(()=>()=>
976{_(),m.current&&m.current.getTracks().forEach(k=>k.stop())},[_]);function B(k){k.preventDefault(),g(e)}const T={valid:{icon:up,label:"GÃLTIG â",color:"text-green-400",bg:"bg-green-500/10 border-green-500/30",hint:"Ticket ist gültig â Einlass gewähren"},already_scanned:{icon:Kt,label:"BEREITS GESCANNT",color:"text-yellow-400",bg:"bg-yellow-500/10 border-yellow-500/30",hint:"Dieses Ticket wurde bereits verwendet"},invalid:{icon:Kt,label:"UNGÃLTIG",color:"text-destructive",bg:"bg-destructive/10 border-destructive/30",hint:"Ticket nicht erkannt â Einlass verweigern"}};return s.jsxs(s.Fragment,{children:[s.jsx(Hr,{}),s.jsxs("main",{id:"main-content",className:"pt-14 min-h-screen",children:[s.jsx("section",{className:"py-12 bg-card/50 border-b border-border text-center",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-2",children:"Check-In"}),s.jsx("h1",{className:"font-display text-5xl md:text-7xl",children:"TICKET SCANNER"}),s.jsx("div",{className:"w-24 h-0.5 bg-primary mx-auto mt-4 glow-primary"}),s.jsx("p",{className:"text-muted-foreground mt-3 text-sm",children:"QR-Codes scannen oder Ticketnummer manuell eingeben"})]})}),s.jsxs("div",{className:"container mx-auto px-4 py-8 max-w-2xl",children:[s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6 mb-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(_f,{size:18,className:"text-primary"}),s.jsx("h2",{className:"font-bold text-sm",children:"Kamera-Scanner"})]}),i&&s.jsxs("div",{className:"mb-4 rounded-xl border border-destructive/30 bg-destructive/10 p-4 text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1 font-bold text-destructive",children:[s.jsx(vT,{size:16}),"Kamera-Zugriff fehlgeschlagen"]}),s.jsxs("p",{className:"text-muted-foreground text-xs leading-relaxed",children:["Bitte erlaube den Kamera-Zugriff in deinen Geräteeinstellungen:",s.jsx("br",{}),s.jsx("strong",{children:"iPhone:"})," Einstellungen â Safari â Kamera â Erlauben",s.jsx("br",{}),s.jsx("strong",{children:"Android:"})," Einstellungen â Apps â Browser â Berechtigungen â Kamera",s.jsx("br",{}),s.jsx("br",{}),s.jsx("strong",{children:"Tipp:"})," Ãffne die Seite direkt im Safari/Chrome-Browser."]})]}),r?s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"relative rounded-xl overflow-hidden bg-black aspect-[4/3]",children:[s.jsx("video",{ref:f,autoPlay:!0,playsInline:!0,muted:!0,className:"w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsxs("div",{className:"w-56 h-56 border-2 border-primary rounded-2xl relative",children:[s.jsx("div",{className:"absolute top-0 left-0 w-6 h-6 border-t-4 border-l-4 border-primary rounded-tl-xl"}),s.jsx("div",{className:"absolute top-0 right-0 w-6 h-6 border-t-4 border-r-4 border-primary rounded-tr-xl"}),s.jsx("div",{className:"absolute bottom-0 left-0 w-6 h-6 border-b-4 border-l-4 border-primary rounded-bl-xl"}),s.jsx("div",{className:"absolute bottom-0 right-0 w-6 h-6 border-b-4 border-r-4 border-primary rounded-br-xl"})]})}),s.jsxs("div",{className:"absolute top-3 left-3 flex items-center gap-1.5 bg-black/60 rounded-full px-2.5 py-1",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${C?"bg-green-400":"bg-green-600"} transition-colors`}),s.jsx("span",{className:"text-[10px] text-white/80 font-mono",children:"SCANNING"})]}),o&&r&&s.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-3 pointer-events-none animate-fade-up z-10",children:s.jsxs("div",{className:`rounded-xl border p-3 backdrop-blur-md ${o.status==="valid"?"bg-green-900/80 border-green-500/50":o.status==="already_scanned"?"bg-yellow-900/80 border-yellow-500/50":"bg-red-900/80 border-red-500/50"}`,children:[s.jsxs("div",{className:"flex items-center gap-2",children:[(()=>{const k=T[o.status].icon;return s.jsx(k,{size:24,className:T[o.status].color})})(),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:`font-display text-xl leading-tight ${T[o.status].color}`,children:T[o.status].label}),s.jsxs("p",{className:"text-[11px] text-white/70 truncate",children:[o.holderName!=="â"?`${o.holderName} · `:"",o.ticketNumber]})]})]}),s.jsx("p",{className:"text-[10px] text-white/50 mt-1",children:T[o.status].hint})]})}),c&&s.jsx("div",{className:`absolute inset-0 pointer-events-none rounded-xl transition-opacity duration-500 ${c==="bg-green-500/40"?"ring-4 ring-green-500/60":c==="bg-yellow-500/40"?"ring-4 ring-yellow-500/60":"ring-4 ring-red-500/60"}`})]}),s.jsx("canvas",{ref:h,className:"hidden"}),s.jsx("button",{onClick:I,className:"w-full py-2 rounded-xl border border-border text-sm font-bold hover:bg-muted transition-colors",children:"Kamera stoppen"})]}):s.jsxs("button",{onClick:O,className:"w-full flex items-center justify-center gap-2 py-3 rounded-xl bg-primary text-primary-foreground font-bold text-sm hover:opacity-90 transition-opacity glow-primary",children:[s.jsx(b4,{size:16}),"Kamera starten"]})]}),s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6 mb-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(Ur,{size:18,className:"text-primary"}),s.jsx("h2",{className:"font-bold text-sm",children:"Manuelle Eingabe"})]}),s.jsxs("form",{onSubmit:B,className:"flex gap-2",children:[s.jsx("input",{type:"text",value:e,onCh
976ange:k=>t(k.target.value),placeholder:"z.B. SF-2027-01-001004",className:"flex-1 bg-background border border-border rounded-xl px-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50"}),s.jsx("button",{type:"submit",className:"px-5 py-2.5 rounded-xl bg-primary text-primary-foreground font-bold text-sm hover:opacity-90 transition-opacity",children:"Prüfen"})]})]}),o&&!r&&s.jsxs("div",{className:`rounded-2xl border p-6 mb-6 ${T[o.status].bg}`,children:[s.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[(()=>{const k=T[o.status].icon;return s.jsx(k,{size:28,className:T[o.status].color})})(),s.jsxs("div",{children:[s.jsx("p",{className:`font-display text-2xl ${T[o.status].color}`,children:T[o.status].label}),s.jsx("p",{className:"text-xs text-muted-foreground",children:o.scannedAt})]})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:T[o.status].hint}),s.jsxs("div",{className:"space-y-1 text-sm",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Ticket"}),s.jsx("span",{className:"font-mono font-bold",children:o.ticketNumber})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Event"}),s.jsx("span",{children:o.eventTitle})]})]})]}),d.length>0&&s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6",children:[s.jsxs("h2",{className:"font-bold text-sm mb-4",children:["Scan-Verlauf (",d.length,")"]}),s.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:d.map((k,$)=>s.jsxs("div",{className:"flex items-center justify-between px-3 py-2 rounded-xl bg-background text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[(()=>{const W=T[k.status].icon;return s.jsx(W,{size:14,className:T[k.status].color})})(),s.jsx("span",{className:"font-mono text-xs",children:k.ticketNumber})]}),s.jsx("span",{className:"text-xs text-muted-foreground",children:k.scannedAt})]},$))})]})]})]})]})}const Oi=e=>(e??"").trim().toLowerCase();async function Zg(e,t,r){const n=[];for(let a=0;;a+=1e3){let o=re.from(e).select(t).range(a,a+1e3-1);r&&(o=r(o));const{data:l,error:c}=await o;if(c||!l||(n.push(...l),l.length<1e3))break}return n}function W2e(e,t,r,n){const i=["ID","Name","E-Mail","Admin","Registriert","Bestellungen","Tickets (Anzahl)","Gesamtumsatz (â¬)","Stornierte Bestellungen","Ticket-Nummern"],a=e.map(l=>{const c=Oi(l.email),u=t[c]??[],d=r[c]??[],x=u.filter(p=>p.status==="paid"),f=u.filter(p=>p.status==="refunded"),h=x.reduce((p,v)=>p+v.total_amount_cents,0),m=f.map(p=>{var v;return((v=n[p.id])==null?void 0:v.credit_note_number)??p.order_number}).join(" | ");return[l.id,l.display_name??"",l.email??"",l.is_admin?"Ja":"Nein",new Date(l.created_at).toLocaleDateString("de-DE"),u.length,d.length,(h/100).toFixed(2),m,d.map(p=>p.ticket_number).join(" | ")].map(p=>`"${String(p).replace(/"/g,'""')}"`).join(";")}),o=new Blob(["\uFEFF"+[i.join(";"),...a].join(` 977`)],{type:"text/csv;charset=utf-8;"});B0(`kunden_${new Date().toISOString().slice(0,10)}.csv`,o)}function H2e(){const[e,t]=A.useState([]),[r,n]=A.useState([]),[i,a]=A.useState([]),[o,l]=A.useState([]),[c,u]=A.useState(!0),[d,x]=A.useState(""),[f,h]=A.useState("created_at"),[m,p]=A.useState(!1),[v,y]=A.useState(null),[b,g]=A.useState(null),[w,E]=A.useState(null),C=A.useCallback(async()=>{u(!0);const[{data:F},U,D,N]=await Promise.all([re.from("admin_users_view").select("*").order("created_at",{ascending:!1}),Zg("orders","id,order_number,buyer_email,status,total_amount_cents,created_at",K=>K.or("status.eq.paid,status.eq.refunded")),Zg("tickets","id,ticket_number,holder_email,ticket_type,event_title,event_date_label,price_cents,order_id"),Zg("credit_notes","id,credit_note_number,order_id,order_number,gross_amount_cents,refund_status,issued_at,mollie_refund_id")]);t(F??[]),n(U),a(D),l(N),g(new Date),u(!1)},[]);A.useEffect(()=>{C()},[C]);const j=r.reduce((F,U)=>((F[Oi(U.buyer_email)]=F[Oi(U.buyer_email)]||[]).push(U),F),{}),S=i.reduce((F,U)=>((F[Oi(U.holder_email)]=F[Oi(U.holder_email)]||[]).push(U),F),{}),_=o.reduce((F,U)=>(U.order_id&&(F[U.order_id]=U),F),{}),I=[...e.filter(F=>{const U=d.trim().toLowerCase();return(F.display_name??"").toLowerCase().includes(U)||Oi(F.email).includes(U)})].sort((F,U)=>{let D="",N="";return f==="name"&&(D=F.display_name??"",N=U.display_name??""),f==="email"&&(D=F.email??"",N=U.email??""),f==="created_at"&&(D=F.created_at,N=U.created_at),f==="tickets"&&(D=(j[Oi(F.email)]??[]).length,N=(j[Oi(U.email)]??[]).length),D<N?m?-1:1:D>N?m?1:-1:0}),B=r.filter(F=>F.status==="paid"),T=r.filter(F=>F.status==="refunded"),k=B.reduce((F,U)=>F+U.total_amount_cents,0);function $(F){f===F?p(U=>!U):(h(F),p(!0))}function W({k:F}){return f!==F?null:m?s.jsx(na,{size:12}):s.jsx(mr,{size:12})}
977async function z(F){if(F.status!=="paid"||!window.confirm(`Bestellung ${F.order_number} wirklich vollständig über Mollie erstatten? 978 979Betrag: ⬠${(F.total_amount_cents/100).toFixed(2)} 980Die Tickets werden ungültig, eine Stornorechnung wird erstellt und per E-Mail versendet. Diese Aktion kann nicht rückgängig gemacht werden.`))return;E(`${F.id}:refund`);const{data:D,error:N}=await re.functions.invoke("refund-order",{body:{orderId:F.id}});if(E(null),N||D!=null&&D.error){Bt({title:"Erstattung fehlgeschlagen",description:(N==null?void 0:N.message)??(D==null?void 0:D.error),variant:"destructive"});return}Bt({title:"Vollständig erstattet",description:`${F.order_number}: ⬠${(Number(D.refundedAmountCents??F.total_amount_cents)/100).toFixed(2)} über Mollie.`}),D!=null&&D.emailWarning&&Bt({title:"Stornorechnung nicht versendet",description:D.emailWarning,variant:"destructive"}),await C()}async function L(F){E(`${F.id}:download`);const{data:U,error:D}=await re.functions.invoke("refund-order",{body:{mode:"download",creditNoteId:F.id}});if(E(null),D||U!=null&&U.error||!(U!=null&&U.content)){Bt({title:"Download fehlgeschlagen",description:(D==null?void 0:D.message)??(U==null?void 0:U.error)??"PDF konnte nicht erstellt werden.",variant:"destructive"});return}qw(U.filename??`Stornorechnung-${F.credit_note_number}.pdf`,U.content)}return s.jsxs(dt,{allowedRoles:["admin","moderator"],children:[s.jsx(Hr,{}),s.jsxs("main",{id:"main-content",className:"pt-14 min-h-screen",children:[s.jsx("section",{className:"py-12 bg-card/50 border-b border-border",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-6xl",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase",children:"Admin"}),s.jsx("h1",{className:"font-display text-4xl md:text-6xl mt-1",children:"KUNDENDATENBANK"}),s.jsxs("p",{className:"text-muted-foreground text-sm mt-1",children:["Alle registrierten Nutzer · ",e.length," Einträge"]})]}),s.jsxs("div",{className:"flex gap-2 flex-wrap",children:[s.jsxs(Ge,{variant:"outline",size:"sm",onClick:C,disabled:c,className:"gap-2",children:[s.jsx(Be,{size:13,className:c?"animate-spin":""})," Aktualisieren"]}),s.jsxs(Ge,{size:"sm",onClick:()=>W2e(I,j,S,_),className:"gap-2",children:[s.jsx(zr,{size:13})," CSV Export"]})]})]}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3 mt-6",children:[{label:"Kunden gesamt",value:e.length,icon:Je},{label:"Admins",value:e.filter(F=>F.is_admin).length,icon:ha},{label:"Tickets gesamt",value:i.length,icon:$t},{label:"Bestellungen",value:B.length,icon:Lr},{label:"Storniert",value:T.length,icon:aa},{label:"Umsatz bezahlt",value:`⬠${(k/100).toLocaleString("de-DE",{minimumFractionDigits:2})}`,icon:zr}].map(({label:F,value:U,icon:D})=>s.jsxs("div",{className:"p-4 rounded-xl border border-border bg-card gradient-card flex flex-col gap-1",children:[s.jsx(D,{size:14,className:"text-primary"}),s.jsx("p",{className:"font-display text-2xl text-foreground",children:U}),s.jsx("p",{className:"text-[11px] text-muted-foreground",children:F})]},F))})]})}),s.jsx("section",{className:"py-8",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-6xl",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[s.jsxs("div",{className:"relative flex-1 max-w-sm",children:[s.jsx(Ur,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx("input",{type:"search",placeholder:"Name oder E-Mail suchen â¦",value:d,onChange:F=>x(F.target.value),className:"w-full pl-9 pr-4 py-2 text-sm rounded-xl border border-border bg-card focus:outline-none focus:ring-1 focus:ring-primary"})]}),b&&s.jsxs("p",{className:"text-[11px] text-muted-foreground hidden sm:block",children:["Stand: ",b.toLocaleTimeString("de-DE")]})]}),c?s.jsxs("div",{className:"flex items-center justify-center py-20 text-muted-foreground gap-2",children:[s.jsx(Be,{size:16,className:"animate-spin"})," Lade Kundenâ¦"]}):I.length===0?s.jsxs("div",{className:"flex flex-col items-center py-20 text-muted-foreground gap-2",children:[s.jsx(HT,{size:32,className:"opacity-30"}),s.jsx("p",{children:"Keine Kunden gefunden."})]}):s.jsxs("div",{className:"rounded-xl border border-border overflow-hidden",children:[s.jsxs("div",{className:"hidden md:grid grid-cols-[2fr_2fr_1fr_1fr_1fr_1fr] gap-2 px-4 py-3 bg-muted/50 border-b border-border text-[11px] font-bold uppercase tracking-widest text-muted-foreground",children:[[{k:"name",label:"Name"},{k:"email",label:"E-Mail"},{k:"tickets",label:"Bestellungen"},{k:"created_at",label:"Registriert"}].map(({k:F,label:U})=>s.jsxs("button",{onClick:()=>$(F),className:"flex items-center gap-1 hover:text-foreground transition-colors text-left",children:[U," ",s.jsx(W,{k:F})]},F)),s.jsx("span",{children:"Umsatz"}),s.jsx("span",{children:"Aktionen"})]}),s.jsx("div",{className:"divide-y divide-border",children:I.map(F=>{const U=Oi(F.email),D=j[U]??[],N=S[U]??[],R=D.filter(X=>X.status==="paid").reduce((X,ie)=>X+ie.total_amount_cents,0),H=v===F.id;return s.jsxs("div",{children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[2fr_2fr_1fr_1fr_1fr_1fr] gap-2 px-4 py-3 hover:bg-muted/30 transition-colors cursor-pointer items-center",onClick:()=>y(H?null:F.id),children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/15 flex items-center justify-center text-primary font-bold text-xs shrink-0",children:(F.display_name??F.email??"?")[0].toUpperCase()}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm font-semibold truncate",children:F.display_name??s.jsx("span",{className:"text-muted-foreground italic",children:"â"})}),F.is_admin&&s.jsx("span",{className:"text-[9px] font-bold text-primary bg-primary/10 px-1.5 py-0.5 rounded",children:"ADMIN"})]})]}),s.jsxs("p",{className:"text-sm text-muted-foreground truncate flex items-center gap-1.5",children:[s.jsx($t,{size:11,className:"text-primary shrink-0"}),F.email??"â"]}),s.jsxs("p",{className:"text-sm font-bold text-foreground",children:[D.length,s.jsxs("span",{className:"text-[11px] font-normal text-muted-foreground",children:[" · ",N.length," Tickets"]})]}),s.jsxs("p",{className:"text-sm text-muted-foreground flex items-center gap-1",children:[s.jsx(Lr,{size:11,className:"text-primary shrink-0"}),new Date(F.created_at).toLocaleDateString("de-DE")]}),s.jsxs("p",{className:"text-sm font-bold text-primary",children:["⬠",(R/100).toLocaleStr
980ing("de-DE",{minimumFractionDigits:2})]}),s.jsx("div",{className:"flex items-center justify-end",children:s.jsx(Ge,{variant:"outline",size:"icon",className:"h-8 w-8","aria-label":"Details anzeigen",children:s.jsx("span",{"aria-hidden":"true",children:H?s.jsx(na,{size:13}):s.jsx(mr,{size:13})})})})]}),H&&s.jsxs("div",{className:"px-4 pb-4 bg-muted/20 border-t border-border/50",children:[s.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-muted-foreground mt-3 mb-2",children:"Bestellungen, Tickets & Stornorechnungen"}),D.length===0&&N.length===0?s.jsx("p",{className:"text-sm text-muted-foreground italic",children:"Keine Tickets gekauft."}):s.jsxs("div",{className:"space-y-3",children:[D.map(X=>{const ie=_[X.id],se=X.status==="refunded";return s.jsxs("div",{className:"flex flex-wrap items-center gap-3 p-3 rounded-lg border border-border bg-card text-xs",children:[s.jsx("span",{className:"font-mono font-bold text-primary",children:X.order_number}),s.jsx("span",{className:"text-muted-foreground",children:new Date(X.created_at).toLocaleDateString("de-DE")}),s.jsx("span",{className:`text-[10px] font-bold uppercase px-1.5 py-0.5 rounded ${se?"bg-destructive/15 text-destructive":"bg-primary/10 text-primary"}`,children:se?"vollständig erstattet":"bezahlt"}),s.jsxs("span",{className:"font-bold text-foreground",children:["⬠",(X.total_amount_cents/100).toFixed(2)]}),s.jsxs("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[ie&&s.jsxs(Ge,{variant:"outline",size:"sm",className:"h-7 gap-1.5",disabled:w===`${ie.id}:download`,onClick:ne=>{ne.stopPropagation(),L(ie)},children:[s.jsx(h0,{size:12})," Storno-PDF"]}),!se&&s.jsxs(Ge,{variant:"destructive",size:"sm",className:"h-7 gap-1.5",disabled:w===`${X.id}:refund`,onClick:ne=>{ne.stopPropagation(),z(X)},children:[w===`${X.id}:refund`?s.jsx(Be,{size:12,className:"animate-spin"}):s.jsx(aa,{size:12})," Voll erstatten"]})]}),ie&&s.jsxs("span",{className:"w-full text-[10px] text-muted-foreground",children:["Stornorechnung ",ie.credit_note_number," · ",ie.refund_status==="completed"?"Mollie-Erstattung abgeschlossen":ie.refund_status]})]},X.id)}),N.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-[10px] uppercase tracking-widest text-muted-foreground",children:"Tickets"}),N.map(X=>s.jsxs("div",{className:"flex flex-wrap items-center gap-3 p-3 rounded-lg border border-border/60 bg-card/60 text-xs",children:[s.jsx("span",{className:"font-mono font-bold text-primary",children:X.ticket_number}),s.jsx("span",{className:"text-foreground font-semibold",children:X.ticket_type}),s.jsx("span",{className:"text-muted-foreground",children:X.event_title}),s.jsx("span",{className:"text-muted-foreground",children:X.event_date_label??""}),s.jsxs("span",{className:"ml-auto font-bold text-foreground",children:["⬠",(X.price_cents/100).toFixed(2)]})]},X.id))]})]})]})]},F.id)})})]})]})})]})]})}const Ns=e=>`⬠${(e/100).toFixed(2)}`;function fj(e,t,r){return e.flatMap(n=>(n.tickets.length?n.tickets:[null]).map(i=>{const a=[n.order_number,n.invoiceNumber??"",(i==null?void 0:i.ticket_number)??"",(i==null?void 0:i.ticket_type)??n.items.map(o=>`${o.quantity}à ${o.ticket_type}`).join(" | "),n.buyer_name,n.buyer_email,n.status,(((i==null?void 0:i.price_cents)??n.total_amount_cents)/100).toFixed(2),i&&t.has(i.ticket_number)?"Ja":"Nein"];return r&&a.unshift(n.event_title,n.event_date??""),a.map(o=>`"${String(o).replace(/"/g,'""')}"`).join(";")}))}function hj(e,t,r){B0(r,new Blob(["\uFEFF"+[e.join(";"),...t].join(` 981`)],{type:"text/csv;charset=utf-8;"}))}const K2e={none:"Kein Mail-Protokoll",sent:"Mail verschickt",delivered:"Mail zugestellt",opened:"Mail geöffnet",clicked:"Mail geöffnet",bounced:"Mail abgewiesen",complained:"Als Spam markiert",failed:"Versand fehlgeschlagen",other:"Mail-Status unbekannt"},pj={none:"bg-muted text-muted-foreground",sent:"bg-primary/15 text-primary",delivered:"bg-green-500/15 text-green-400",opened:"bg-green-500/15 text-green-400",clicked:"bg-green-500/15 text-green-400",bounced:"bg-destructive/15 text-destructive",complained:"bg-destructive/15 text-destructive",failed:"bg-destructive/15 text-destructive",other:"bg-muted text-muted-foreground"},mj=["Bestell-Nr.","Rechnung-Nr.","Ticket-Nr.","Typ","Käufer","E-Mail","Status","Preis (â¬)","Eingecheckt"];function gj(e){return{tickets:e.tickets.map(t=>({id:t.id,ticketNumber:t.ticket_number,eventTitle:t.event_title,eventDateLabel:t.event_date_label??t.event_date??e.event_date??"",eventLocation:t.event_location??e.event_location??"",eventAddress:t.event_address??e.event_address??"",eventTime:t.event_time??e.event_time??"",ticketType:t.ticket_type,price:t.price_cents/100,currency:t.currency||"EUR",holderName:t.holder_name||e.buyer_name,holderEmail:t.holder_email||e.buyer_email,purchasedAt:e.paid_at??e.created_at,qrData:JSON.stringify({tn:t.ticket_number,holder:t.holder_name,evt:t.event_title})})),feeCents:e.fee_cents??0,invoiceNumber:e.invoiceNumber??void 0,orderId:e.id,orderNumber:e.order_number}}function V2e(){const[e,t]=A.useState([]),[r,n]=A.useState([]),[i,a]=A.useState(!0),[o,l]=A.useState(""),[c,u]=A.useState(null),[d,x]=A.useState(null),[f,h]=A.useState(null),[m,p]=A.useState(!1),[v,y]=A.useState(null),[b,g]=A.useState(""),w=A.useCallback(async()=>{a(!0);async function F(ae,Q="*",he="created_at"){const G=[];for(let V=0;;V+=1e3){const{data:M,error:Y}=await re.from(ae).select(Q).order(he,{ascending:!1}).order("id",{ascending:!1}).range(V,V+1e3-1);if(Y)break;const ee=M??[];if(G.push(...ee),ee.length<1e3)break}const Z=new Set;return G.filter(V=>{const M=V==null?void 0:V.id;return M?Z.has(M)?!1:(Z.add(M),!0):!0})}const[U,D,N,K,R,H]=await Promise.all([F("orders"),F("order_items"),F("tickets"),F("invoices","invoice_number, ticket_number, gross_amount_cents"),F("scanned_tickets","ticket_number","scanned_at"),F("email_deliveries","order_id, order_number, recipient_email, status, created_at")]),X=new Map;for(const ae of H){const Q=ae.order_id??ae.order_number??"";Q&&!X.has(Q)&&X.set(Q,ae)}const ie=K,se=new Map;
981for(const ae of N){if(!ae.order_id)continue;const Q=se.get(ae.order_id)??[];Q.push(ae),se.set(ae.order_id,Q)}const ne=new Map;for(const ae of D){const Q=ne.get(ae.order_id)??[];Q.push(ae),ne.set(ae.order_id,Q)}const ce=U.map(ae=>{var G;const Q=se.get(ae.id)??[],he=(G=Q[0])==null?void 0:G.ticket_number,P=he?ie.find(Z=>(Z.ticket_number??"").includes(he)):void 0;return{...ae,delivery:X.get(ae.id)??X.get(ae.order_number)??null,items:ne.get(ae.id)??[],tickets:Q,invoiceNumber:(P==null?void 0:P.invoice_number)??null}});t(ce),n(R.map(ae=>ae.ticket_number)),x(new Date),a(!1)},[]);A.useEffect(()=>{w()},[w]);const E=new Set(r),C=e.filter(F=>F.status==="paid"||F.status==="refunded"),j=o.toLowerCase().trim(),S=F=>!j||F.buyer_name.toLowerCase().includes(j)||F.buyer_email.toLowerCase().includes(j)||F.order_number.toLowerCase().includes(j)||(F.invoiceNumber??"").toLowerCase().includes(j)||F.event_title.toLowerCase().includes(j)||F.tickets.some(U=>U.ticket_number.toLowerCase().includes(j))||F.items.some(U=>U.ticket_type.toLowerCase().includes(j)),_=Object.values(C.filter(S).reduce((F,U)=>{const D=U.event_title;return F[D]||(F[D]={title:U.event_title,date:U.event_date??"",orders:[]}),F[D].orders.push(U),F},{})),O=C.flatMap(F=>F.tickets),I=C.reduce((F,U)=>F+U.total_amount_cents,0),B=O.filter(F=>E.has(F.ticket_number)).length,T=async F=>{if(F.tickets.length)return F;const{data:U,error:D}=await re.from("tickets").select("*").eq("order_id",F.id).order("created_at",{ascending:!0});if(D)return Bt({title:"Tickets konnten nicht geladen werden",description:D.message,variant:"destructive"}),null;const N=U??[];if(!N.length)return F;const K={...F,tickets:N};return t(R=>R.map(H=>H.id===F.id?K:H)),K},k=async F=>{const U=await T(F);if(!(U!=null&&U.tickets.length)){Bt({title:"Keine Tickets",description:"Zu dieser Bestellung sind keine Tickets vorhanden.",variant:"destructive"});return}h(F.id+":mail");const{data:D,error:N}=await re.functions.invoke("send-ticket",{body:gj(U)});if(h(null),N||D!=null&&D.error){Bt({title:"Versand fehlgeschlagen",description:(N==null?void 0:N.message)??(D==null?void 0:D.error),variant:"destructive"});return}Bt({title:"Erneut versendet",description:`Tickets & Rechnung an ${U.buyer_email} verschickt.`}),w()},$=async(F,U)=>{var H;const D=b.trim().toLowerCase();if(!/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(D)){Bt({title:"Ungültige E-Mail",description:"Bitte eine korrekte Adresse eingeben.",variant:"destructive"});return}h(F.id+":email");const[{error:N},{error:K}]=await Promise.all([re.from("orders").update({buyer_email:D}).eq("id",F.id),re.from("tickets").update({holder_email:D}).eq("order_id",F.id)]);if(N||K){h(null),Bt({title:"Ãnderung fehlgeschlagen",description:(H=N??K)==null?void 0:H.message,variant:"destructive"});return}const R={...F,buyer_email:D,tickets:F.tickets.map(X=>({...X,holder_email:D}))};t(X=>X.map(ie=>ie.id===F.id?R:ie)),y(null),h(null),Bt({title:"E-Mail aktualisiert",description:`Bestellung ${F.order_number} â ${D}`}),U?await k(R):w()},W=async()=>{p(!0);const{data:F,error:U}=await re.functions.invoke("sync-email-status",{body:{}});if(p(!1),U){Bt({title:"Sync fehlgeschlagen",description:U.message,variant:"destructive"});return}Bt({title:"Zustellstatus aktualisiert",description:`${(F==null?void 0:F.updated)??0} Mails geprüft.`}),w()},z=async F=>{const U=await T(F);if(!(U!=null&&U.tickets.length)){Bt({title:"Keine Tickets",description:"Zu dieser Bestellung sind keine Tickets vorhanden.",variant:"destructive"});return}h(F.id+":pdf");const{data:D,error:N}=await re.functions.invoke("send-ticket",{body:{...gj(U),mode:"download"}});if(h(null),N||D!=null&&D.error||!(D!=null&&D.files)){Bt({title:"PDF-Erstellung fehlgeschlagen",description:(N==null?void 0:N.message)??(D==null?void 0:D.error),variant:"destructive"});return}const K=await b2e(D.files,`Bestellung-${F.order_number}.zip`);Bt({title:K.zipped?"ZIP heruntergeladen":"PDF heruntergeladen",description:K.zipped?`${K.count} Dateien als ZIP-Archiv gespeichert.`:"Datei wurde gespeichert."})},L=async F=>{if(F.status!=="paid"||!window.confirm(`Bestellung ${F.order_number} wirklich vollständig über Mollie erstatten? 982 983Betrag: ${Ns(F.total_amount_cents)} 984Die Tickets werden ungültig, eine Stornorechnung wird erstellt und versendet. Diese Aktion kann nicht rückgängig gemacht werden.`))return;h(F.id+":refund");const{data:D,error:N}=await re.functions.invoke("refund-order",{body:{orderId:F.id}});if(h(null),N||D!=null&&D.error){Bt({title:"Erstattung fehlgeschlagen",description:(N==null?void 0:N.message)??(D==null?void 0:D.error),variant:"destructive"});return}Bt({title:"Vollständig erstattet",description:`${F.order_number}: ${Ns(Number(D.refundedAmountCents??F.total_amount_cents))}.`}),D!=null&&D.emailWarning&&Bt({title:"Stornorechnung nicht versendet",description:D.emailWarning,variant:"destructive"}),w()};return s.jsxs(dt,{allowedRoles:["admin","moderator"],children:[s.jsx(Hr,{}),s.jsxs("main",{id:"main-content",className:"pt-14 min-h-screen",children:[s.jsx("section",{className:"py-12 bg-card/50 border-b border-border",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-6xl",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase",children:"Admin"}),s.jsx("h1",{className:"font-display text-4xl md:text-6xl mt-1",children:"TICKETVERKÃUFE"}),s.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"Bestellungen mit allen Ticketkategorien, Wiederversand und PDF-Download"})]}),s.jsxs("div",{className:"flex gap-2 flex-wrap",children:[s.jsxs(Ge,{variant:"outline",size:"sm",onClick:w,disabled:i,className:"gap-2",children:[s.jsx(Be,{size:13,className:i?"animate-spin":""}),"Aktualisieren"]}),s.jsxs(Ge,{variant:"outline",size:"sm",onClick:W,disabled:m,className:"gap-2",children:[s.jsx(_T,{size:13,className:m?"animate-pulse":""}),"Zustellstatus"]}),s.jsxs(Ge,{size:"sm",className:"gap-2",onClick:()=>hj(["Event","Datum",...mj],fj(_.flatMap(F=>F.orders),E,!0),`alle_ticketkäufer_${new Date().toISOString().slice(0,10)}.csv`),children:[s.jsx(zr,{size:13}),"Alle CSV"]})]})]}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mt-6",children:[{label:"Bestellungen",value:C.length,icon:hu},{label:"Tickets verkauft",value:O.length,icon:Wl}
984,{label:"Check-ins",value:B,icon:Je},{label:"Gesamtumsatz",value:Ns(I),icon:ji}].map(({label:F,value:U,icon:D})=>s.jsxs("div",{className:"p-4 rounded-xl border border-border bg-card gradient-card flex flex-col gap-1",children:[s.jsx(D,{size:14,className:"text-primary"}),s.jsx("p",{className:"font-display text-2xl text-foreground",children:U}),s.jsx("p",{className:"text-[11px] text-muted-foreground",children:F})]},F))})]})}),s.jsx("section",{className:"py-8",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-6xl",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[s.jsxs("div",{className:"relative flex-1 max-w-sm",children:[s.jsx(Ur,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx("input",{type:"search",placeholder:"Käufer, Ticket-Nr., Bestell-Nr. oder Kategorie â¦",value:o,onChange:F=>l(F.target.value),className:"w-full pl-9 pr-4 py-2 text-sm rounded-xl border border-border bg-card focus:outline-none focus:ring-1 focus:ring-primary"})]}),d&&s.jsxs("p",{className:"text-[11px] text-muted-foreground hidden sm:block",children:["Stand: ",d.toLocaleTimeString("de-DE")]})]}),i?s.jsxs("div",{className:"flex items-center justify-center py-20 text-muted-foreground gap-2",children:[s.jsx(Be,{size:16,className:"animate-spin"})," Lade Datenâ¦"]}):_.length===0?s.jsxs("div",{className:"flex flex-col items-center py-20 text-muted-foreground gap-2",children:[s.jsx(hu,{size:32,className:"opacity-30"}),s.jsx("p",{children:"Keine bezahlten Bestellungen gefunden."})]}):s.jsx("div",{className:"space-y-4",children:_.map(F=>{const U=F.orders.reduce((R,H)=>R+H.total_amount_cents,0),D=F.orders.flatMap(R=>R.tickets),N=D.filter(R=>E.has(R.ticket_number)).length,K=c===F.title;return s.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between px-5 py-4 cursor-pointer hover:bg-muted/30 transition-colors",onClick:()=>u(K?null:F.title),children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(hu,{size:16,className:"text-primary"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-bold text-foreground",children:F.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:F.date})]}),s.jsxs("div",{className:"hidden sm:flex items-center gap-4 ml-4 text-xs text-muted-foreground",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(hu,{size:11,className:"text-primary"})," ",F.orders.length," Bestellungen"]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Wl,{size:11,className:"text-primary"})," ",D.length," Tickets"]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Je,{size:11,className:"text-primary"})," ",N," Eingecheckt"]}),s.jsxs("span",{className:"flex items-center gap-1 font-bold text-foreground",children:[s.jsx(ji,{size:11,className:"text-primary"})," ",(U/100).toFixed(2)]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("button",{onClick:R=>{R.stopPropagation(),hj(mj,fj(F.orders,E,!1),`tickets_${F.title.replace(/\s+/g,"_")}_${new Date().toISOString().slice(0,10)}.csv`)},className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border text-xs text-muted-foreground hover:text-primary hover:border-primary/40 transition-all",title:"CSV herunterladen",children:[s.jsx(ey,{size:13})," CSV"]}),K?s.jsx(na,{size:16,className:"text-muted-foreground"}):s.jsx(mr,{size:16,className:"text-muted-foreground"})]})]}),K&&s.jsx("div",{className:"border-t border-border divide-y divide-border",children:F.orders.map(R=>{var H,X,ie;return s.jsxs("div",{className:"px-5 py-4 space-y-3",children:[s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"font-semibold text-foreground",children:R.buyer_name}),v===R.id?s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[s.jsx("input",{type:"email",value:b,onChange:se=>g(se.target.value),className:"px-2 py-1 text-xs rounded-md border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary min-w-[220px]",placeholder:"[email protected]",autoFocus:!0}),s.jsx("button",{onClick:()=>$(R,!1),disabled:f===R.id+":email",className:"px-2.5 py-1 rounded-md border border-border text-[11px] hover:text-primary hover:border-primary/40 disabled:opacity-50",children:"Speichern"}),s.jsx("button",{onClick:()=>$(R,!0),disabled:f===R.id+":email"||R.status==="refunded",className:"px-2.5 py-1 rounded-md border border-primary/50 text-primary text-[11px] hover:bg-primary/10 disabled:opacity-50",children:"Speichern & Ticket senden"}),s.jsx("button",{onClick:()=>y(null),className:"px-2.5 py-1 rounded-md text-[11px] text-muted-foreground hover:text-foreground",children:"Abbrechen"})]}):s.jsxs("p",{className:"text-xs text-muted-foreground truncate flex items-center gap-2",children:[R.buyer_email,s.jsxs("button",{onClick:()=>{y(R.id),g(R.buyer_email)},className:"inline-flex items-center gap-1 text-[11px] text-primary hover:underline shrink-0",children:[s.jsx(ss,{size:11})," Mail ändern"]})]}),s.jsxs("p",{className:"text-[11px] text-muted-foreground mt-1 font-mono",children:[R.order_number,R.invoiceNumber&&s.jsxs(s.Fragment,{children:[" · ",R.invoiceNumber]}),R.paid_at&&s.jsxs(s.Fragment,{children:[" · ",new Date(R.paid_at).toLocaleDateString("de-DE")]})]}),s.jsx("p",{className:"mt-1.5",children:s.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-full ${pj[((H=R.delivery)==null?void 0:H.status)??"none"]??pj.other}`,children:K2e[((X=R.delivery)==null?void 0:X.status)??"none"]??`Mail: ${(ie=R.delivery)==null?void 0:ie.status}`})})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("span",{className:"font-bold text-foreground",children:Ns(R.total_amount_cents)}),R.status==="refunded"?s.jsx("span",{className:"text-[10px] font-bold uppercase px-2 py-1 rounded-full bg-destructive/15 text-destructive",children:"vollständig erstattet"}):s.jsxs("button",{onClick:()=>L(R),disabled:f===R.id+":refund",className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-destructive/40 text-destructive text-xs hover:bg-destructive/10 transition-all disabled:opacity-50",children:[f===R.id+":refund"?s.jsx(ar,{size:13,className:"animate-spin"}):s.jsx(aa,{size:13}),"Voll erstatten"]}),s.jsxs("button",{onClick:()=>k(R),disabled:f===R.id+":mail"||R.status==="refunded",className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border text-xs hover:text-primary hover:border-primary/40 transition-all disabled:opacity-50",children:[f===R.id+":mail"?s.jsx(ar,{size:13,className:"animate-spin"}):s.jsx($t,{size:13}),"Erneut senden"]}),s.jsxs("button",{onClick:()=>z(R),disabled:f===R.id+":pdf"||R.status==="refunded",className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border text-xs hover:text-primary hover:border-primary/40 transition-all disabled:opacity-50",children:[f===R.id+":pdf"?s.jsx(ar,{size:13,className:"animate-spin"}):s.jsx(ey,{size:13}),"PDFs laden"]})]})]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[(R.items.length?R.items.map(se=>`${se.quantity}à ${se.ticket_type} · ${Ns(se.unit_price_cents)}`):[`${R.tickets.length}à Tickets`]).map(se=>s.jsx("span",{className:"text-[11px] px-2 py-1 rounded-md bg-muted text-muted-foreground",children:se},se)),R.fee_cents>0&&s.jsxs("span",{className:"text-[11px] px-2 py-1 rounded-md bg-muted text-muted-foreground",children:["Gebühr ",Ns(R.fee_cents)]})]}),s.jsx("div",{className:"grid gap-1",children:R.tickets.map(se=>s.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[s.jsx("span",{className:"font-mono text-primary",children:se.ticket_number}),s.jsx("span",{className:"text-muted-foreground",children:se.ticket_type}),s.jsx("span",{className:"text-foreground",children:Ns(se.price_cents)}),E.has(se.ticket_number)?s.jsx("span",{className:"font-bold px-2 py-0.5 rounded-full bg-green-500/15 text-green-400",children:"â eingecheckt"}):s.jsx("span",{className:"font-bold px-2 py-0.5 rounded-full bg-muted text-muted-foreground",children:"Nicht eingecheckt"})]},se.id))})]},R.id)})})]},F.title)})})]})})]})]})}const Wh=[{value:"general",label:"Allgemein",color:"bg-blue-500/15 text-blue-400"},{value:"vip",label:"VIP",color:"bg-yellow-500/15 text-yellow-400"},{value:"press",label:"Presse",color:"bg-purple-500/15 text-purple-400"},{value:"artist",label:"Künstler",color:"bg-green-500/15 text-green-400"}],Xg=[{value:"all",label:"Alle"},...Wh];function vj(e){var t;return((t=Wh.find(r=>r.value===e))==null?void 0:t.color)??"bg-muted text-muted-foreground"}
984function G2e(e){const t=["E-Mail","Name","Segment","Status","Quelle","Abonniert am"],r=e.map(o=>[o.email,o.display_name??"",o.segment,o.status,o.source,new Date(o.subscribed_at).toLocaleDateString("de-DE")].map(l=>`"${String(l).replace(/"/g,'""')}"`).join(";")),n=new Blob(["\uFEFF"+[t.join(";"),...r].join(` 985`)],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(n),a=document.createElement("a");a.href=i,a.download=`newsletter_abonnenten_${new Date().toISOString().slice(0,10)}.csv`,a.click(),URL.revokeObjectURL(i)}function q2e(){const{toast:e}=iE(),[t,r]=A.useState([]),[n,i]=A.useState([]),[a,o]=A.useState(!0),[l,c]=A.useState(""),[u,d]=A.useState("all"),[x,f]=A.useState("subscribers"),[h,m]=A.useState(!1),[p,v]=A.useState(""),[y,b]=A.useState(""),[g,w]=A.useState("general"),[E,C]=A.useState(!1),[j,S]=A.useState(!1),[_,O]=A.useState(""),[I,B]=A.useState(""),[T,k]=A.useState("all"),[$,W]=A.useState(!1),[z,L]=A.useState(null),[F,U]=A.useState(null),[D,N]=A.useState(""),[K,R]=A.useState("10:00"),H=A.useCallback(async()=>{o(!0);const[{data:G},{data:Z}]=await Promise.all([re.from("newsletter_subscribers").select("*").order("subscribed_at",{ascending:!1}),re.from("newsletter_campaigns").select("*").order("created_at",{ascending:!1})]);r(G??[]),i(Z??[]),o(!1)},[]);A.useEffect(()=>{H()},[H]);async function X(){if(!p.trim())return;C(!0);const{error:G}=await re.from("newsletter_subscribers").insert({email:p.trim(),display_name:y.trim()||null,segment:g,source:"manual"});C(!1),G?e({title:"Fehler",description:G.message,variant:"destructive"}):(e({title:"Hinzugefügt!",description:`${p} wurde eingetragen.`}),v(""),b(""),w("general"),m(!1),H())}async function ie(G){const Z=G.status==="active"?"unsubscribed":"active",{error:V}=await re.from("newsletter_subscribers").update({status:Z,unsubscribed_at:Z==="unsubscribed"?new Date().toISOString():null}).eq("id",G.id);if(V){e({title:"Fehler",description:V.message,variant:"destructive"});return}e({title:Z==="active"?"Reaktiviert":"Abgemeldet"}),H()}async function se(G){const{error:Z}=await re.from("newsletter_subscribers").delete().eq("id",G);if(Z){e({title:"Fehler",description:Z.message,variant:"destructive"});return}e({title:"Gelöscht"}),H()}async function ne(){if(!_.trim()||!I.trim())return;W(!0);const G=T==="all"?t.filter(V=>V.status==="active"):t.filter(V=>V.status==="active"&&V.segment===T),{error:Z}=await re.from("newsletter_campaigns").insert({subject:_.trim(),body_text:I.trim(),segment:T,status:"draft",recipient_count:G.length});if(W(!1),Z){e({title:"Fehler",description:Z.message,variant:"destructive"});return}e({title:"Kampagne gespeichert!",description:`Entwurf für ${G.length} Empfänger.`}),O(""),B(""),k("all"),S(!1),H()}async function ce(G){var Z;if(confirm(`Newsletter "${G.subject}" jetzt an ${G.recipient_count} Empfänger senden?`)){L(G.id);try{const{data:{session:V}}=await re.auth.getSession(),M=await re.functions.invoke("send-newsletter",{body:{campaign_id:G.id},headers:{Authorization:`Bearer ${V==null?void 0:V.access_token}`}}),Y=M.data;if(M.error||Y!=null&&Y.error){const J=(Y==null?void 0:Y.error)??((Z=M.error)==null?void 0:Z.message)??"Unbekannter Fehler";throw new Error(J)}const ee=(Y==null?void 0:Y.sent)??0,te=(Y==null?void 0:Y.failed)??0;e({title:ee>0?"Newsletter versendet! ð":"Versand fehlgeschlagen",description:ee>0?`${ee} E-Mails erfolgreich${te>0?`, ${te} fehlgeschlagen`:""}.`:`0 gesendet, ${te} fehlgeschlagen.`,variant:ee>0?"default":"destructive"}),H()}catch(V){const M=V instanceof Error?V.message:String(V);e({title:"Fehler beim Senden",description:M,variant:"destructive"})}finally{L(null)}}}async function ae(G){if(!D){e({title:"Bitte ein Datum wählen",variant:"destructive"});return}const Z=new Date(`${D}T${K}:00`);if(Z<=new Date){e({title:"Datum muss in der Zukunft liegen",variant:"destructive"});return}const{error:V}=await re.from("newsletter_campaigns").update({status:"scheduled",sent_at:Z.toISOString()}).eq("id",G.id);if(V){e({title:"Fehler",description:V.message,variant:"destructive"});return}e({title:"Versand geplant â",description:`Wird am ${Z.toLocaleStr
985ing("de-DE")} versendet.`}),U(null),N(""),H()}async function Q(G){const{error:Z}=await re.from("newsletter_campaigns").delete().eq("id",G);if(Z){e({title:"Fehler",description:Z.message,variant:"destructive"});return}e({title:"Kampagne gelöscht"}),H()}const he=t.filter(G=>{const Z=l.toLowerCase(),V=G.email.toLowerCase().includes(Z)||(G.display_name??"").toLowerCase().includes(Z),M=u==="all"||G.segment===u;return V&&M}),P=t.filter(G=>G.status==="active").length;return s.jsxs(dt,{allowedRoles:["admin","moderator"],children:[s.jsx(Hr,{}),s.jsxs("main",{id:"main-content",className:"pt-14 min-h-screen",children:[s.jsx("section",{className:"py-12 bg-card/50 border-b border-border",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-6xl",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase",children:"Admin"}),s.jsx("h1",{className:"font-display text-4xl md:text-6xl mt-1",children:"NEWSLETTER"}),s.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"Abonnenten verwalten · Kampagnen erstellen"})]}),s.jsxs("div",{className:"flex gap-2 flex-wrap",children:[s.jsx(Ge,{variant:"outline",size:"sm",onClick:H,disabled:a,className:"gap-2",children:s.jsx(Be,{size:13,className:a?"animate-spin":""})}),s.jsxs(Ge,{variant:"outline",size:"sm",onClick:()=>G2e(he),className:"gap-2",children:[s.jsx(zr,{size:13})," CSV"]}),x==="subscribers"&&s.jsxs(Ge,{size:"sm",onClick:()=>m(!0),className:"gap-2",children:[s.jsx(Ht,{size:13})," Abonnent hinzufügen"]}),x==="campaigns"&&s.jsxs(Ge,{size:"sm",onClick:()=>S(!0),className:"gap-2",children:[s.jsx(m9,{size:13})," Neue Kampagne"]})]})]}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mt-6",children:[{label:"Abonnenten gesamt",value:t.length,icon:Je},{label:"Aktiv",value:P,icon:ut},{label:"Abgemeldet",value:t.length-P,icon:Kt},{label:"Kampagnen",value:n.length,icon:os}].map(({label:G,value:Z,icon:V})=>s.jsxs("div",{className:"p-4 rounded-xl border border-border bg-card gradient-card flex flex-col gap-1",children:[s.jsx(V,{size:14,className:"text-primary"}),s.jsx("p",{className:"font-display text-2xl text-foreground",children:Z}),s.jsx("p",{className:"text-[11px] text-muted-foreground",children:G})]},G))})]})}),s.jsx("div",{className:"border-b border-border bg-card/30",children:s.jsx("div",{className:"container mx-auto px-4 max-w-6xl flex gap-0",children:["subscribers","campaigns"].map(G=>s.jsx("button",{onClick:()=>f(G),className:`px-5 py-3 text-sm font-semibold border-b-2 transition-all ${x===G?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"}`,children:G==="subscribers"?`Abonnenten (${t.length})`:`Kampagnen (${n.length})`},G))})}),s.jsx("section",{className:"py-8",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-6xl",children:[h&&x==="subscribers"&&s.jsxs("div",{className:"mb-6 p-5 rounded-xl border border-primary/30 bg-card",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"font-bold",children:"Neuen Abonnenten hinzufügen"}),s.jsx("button",{onClick:()=>m(!1),children:s.jsx(_t,{size:16,className:"text-muted-foreground"})})]}),s.jsxs("div",{className:"grid sm:grid-cols-3 gap-3",children:[s.jsx("input",{type:"email",placeholder:"E-Mail *",value:p,onChange:G=>v(G.target.value),className:"px-3 py-2 text-sm rounded-lg border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary"}),s.jsx("input",{type:"text",placeholder:"Name (optional)",value:y,onChange:G=>b(G.target.value),className:"px-3 py-2 text-sm rounded-lg border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary"}),s.jsx("select",{value:g,onChange:G=>w(G.target.value),className:"px-3 py-2 text-sm rounded-lg border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary",children:Wh.map(G=>s.jsx("option",{value:G.value,children:G.label},G.value))})]}),s.jsxs("div",{className:"flex gap-2 mt-3 justify-end",children:[s.jsx(Ge,{variant:"outline",size:"sm",onClick:()=>m(!1),children:"Abbrechen"}),s.jsxs(Ge,{size:"sm",onClick:X,disabled:E||!p.trim(),className:"gap-2",children:[E?s.jsx(Be,{size:12,className:"animate-spin"}):s.jsx(Ht,{size:12}),"Hinzufügen"]})]})]}
985),j&&x==="campaigns"&&s.jsxs("div",{className:"mb-6 p-5 rounded-xl border border-primary/30 bg-card",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"font-bold",children:"Neue Kampagne erstellen"}),s.jsx("button",{onClick:()=>S(!1),children:s.jsx(_t,{size:16,className:"text-muted-foreground"})})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid sm:grid-cols-2 gap-3",children:[s.jsx("input",{type:"text",placeholder:"Betreff *",value:_,onChange:G=>O(G.target.value),className:"px-3 py-2 text-sm rounded-lg border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary"}),s.jsx("select",{value:T,onChange:G=>k(G.target.value),className:"px-3 py-2 text-sm rounded-lg border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary",children:Xg.map(G=>s.jsx("option",{value:G.value,children:G.label},G.value))})]}),s.jsx("textarea",{placeholder:"Nachrichtentext *",value:I,onChange:G=>B(G.target.value),rows:5,className:"w-full px-3 py-2 text-sm rounded-lg border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary resize-none"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Empfänger: ",T==="all"?t.filter(G=>G.status==="active").length:t.filter(G=>G.status==="active"&&G.segment===T).length," aktive Abonnenten"]})]}),s.jsxs("div",{className:"flex gap-2 mt-3 justify-end",children:[s.jsx(Ge,{variant:"outline",size:"sm",onClick:()=>S(!1),children:"Abbrechen"}),s.jsxs(Ge,{size:"sm",onClick:ne,disabled:$||!_.trim()||!I.trim(),className:"gap-2",children:[$?s.jsx(Be,{size:12,className:"animate-spin"}):s.jsx(m9,{size:12}),"Als Entwurf speichern"]})]})]}),x==="subscribers"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-5",children:[s.jsxs("div",{className:"relative flex-1 max-w-sm",children:[s.jsx(Ur,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx("input",{type:"search",placeholder:"E-Mail oder Name â¦",value:l,onChange:G=>c(G.target.value),className:"w-full pl-9 pr-4 py-2 text-sm rounded-xl border border-border bg-card focus:outline-none focus:ring-1 focus:ring-primary"})]}),s.jsx("div",{className:"flex gap-1",children:Xg.map(G=>s.jsx("button",{onClick:()=>d(G.value),className:`px-3 py-1.5 rounded-lg text-xs font-semibold transition-all border ${u===G.value?"bg-primary/15 text-primary border-primary/30":"border-border text-muted-foreground hover:text-foreground"}`,children:G.label},G.value))})]}),a?s.jsxs("div",{className:"flex items-center justify-center py-20 text-muted-foreground gap-2",children:[s.jsx(Be,{size:16,className:"animate-spin"})," Ladeâ¦"]}):s.jsxs("div",{className:"rounded-xl border border-border overflow-hidden",children:[s.jsxs("div",{className:"hidden md:grid grid-cols-[2fr_1fr_1fr_1fr_1fr_auto] gap-2 px-4 py-3 bg-muted/50 text-[11px] font-bold uppercase tracking-widest text-muted-foreground border-b border-border",children:[s.jsx("span",{children:"E-Mail / Name"}),s.jsx("span",{children:"Segment"}),s.jsx("span",{children:"Quelle"}),s.jsx("span",{children:"Status"}),s.jsx("span",{children:"Abonniert am"}),s.jsx("span",{})]}),s.jsx("div",{className:"divide-y divide-border",children:he.map(G=>{var Z;return s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[2fr_1fr_1fr_1fr_1fr_auto] gap-2 px-4 py-3 items-center hover:bg-muted/20 transition-colors",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold text-foreground",children:G.email}),G.display_name&&s.jsx("p",{className:"text-xs text-muted-foreground",children:G.display_name})]}),s.jsx("span",{className:`text-[11px] font-bold px-2 py-0.5 rounded-full w-fit ${vj(G.segment)}`,children:((Z=Wh.find(V=>V.value===G.segment))==null?void 0:Z.label)??G.segment}),s.jsx("span",{className:"text-xs text-muted-foreground capitalize",children:G.source}),s.jsx("span",{className:`text-[11px] font-bold px-2 py-0.5 rounded-full w-fit ${G.status==="active"?"bg-green-500/15 text-green-400":"bg-muted text-muted-foreground"}`,children:G.status==="active"?"Aktiv":"Abgemeldet"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(G.subscribed_at).toLocaleDateString("de-DE")}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>ie(G),title:G.status==="active"?"Abmelden":"Reaktivieren",className:"p-1.5 rounded-lg border border-border text-muted-foreground hover:text-foreground transition-colors",children:G.status==="active"?s.jsx(Kt,{size:13}):s.jsx(ut,{size:13})}),s.jsx("button",{onClick:()=>se(G.id),className:"p-1.5 rounded-lg border border-border text-muted-foreground hover:text-destructive hover:border-destructive/40 transition-colors",children:s.jsx(Vt,{size:13})})]})]},G.id)})})]})]}),x==="campaigns"&&s.jsx(s.Fragment,{children:a?s.jsxs("div",{className:"flex items-center justify-center py-20 text-muted-foreground gap-2",children:[s.jsx(Be,{size:16,className:"animate-spin"})," Ladeâ¦"]}):n.length===0?s.jsxs("div",{className:"flex flex-col items-center py-20 text-muted-foreground gap-2",children:[s.jsx(os,{size:32,className:"opacity-30"}),s.jsx("p",{children:"Noch keine Kampagnen erstellt."}),s.jsxs(Ge,{size:"sm",onClick:()=>S(!0),className:"mt-2 gap-2",children:[s.jsx(Ht,{size:13})," Erste Kampagne erstellen"]})]}):s.jsx("div",{className:"space-y-3",children:n.map(G=>{var Z;return s.jsxs("div",{className:"p-5 rounded-xl border border-border bg-card flex flex-col sm:flex-row sm:items-center gap-4",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("h3",{className:"font-bold text-foreground truncate",children:G.subject}),s.jsx("span",{className:`text-[11px] font-bold px-2 py-0.5 rounded-full shrink-0 ${G.status==="sent"?"bg-green-500/15 text-green-400":G.status==="scheduled"?"bg-blue-500/15 text-blue-400":"bg-yellow-500/15 text-yellow-400"}`,children:G.status==="sent"?"Versendet":G.status==="scheduled"?"Geplant":"Entwurf"})]}),s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:G.body_text}),s.jsxs("div",{className:"flex items-center gap-3 mt-2 text-[11px] text-muted-foreground",children:[s.jsx("span",{className:`px-1.5 py-0.5 rounded ${vj(G.segment)}`,children:((Z=Xg.find(V=>V.value===G.segment))==null?void 0:Z.label)??G.segment}
985),s.jsxs("span",{children:[s.jsx(Je,{size:10,className:"inline mr-0.5"}),G.recipient_count," Empfänger"]}),G.status==="scheduled"&&G.sent_at&&s.jsxs("span",{className:"text-blue-400",children:[s.jsx(gr,{size:10,className:"inline mr-0.5"}),"Geplant: ",new Date(G.sent_at).toLocaleString("de-DE")]}),G.status==="sent"&&G.sent_at&&s.jsxs("span",{children:["Versendet: ",new Date(G.sent_at).toLocaleDateString("de-DE")]}),s.jsxs("span",{children:["Erstellt: ",new Date(G.created_at).toLocaleDateString("de-DE")]})]})]}),s.jsxs("div",{className:"flex flex-col gap-2 shrink-0 min-w-[200px]",children:[(G.status==="draft"||G.status==="scheduled")&&s.jsxs(s.Fragment,{children:[s.jsxs(Ge,{size:"sm",onClick:()=>ce(G),disabled:z===G.id,className:"gap-1.5 text-xs",children:[z===G.id?s.jsx(Be,{size:12,className:"animate-spin"}):s.jsx(fE,{size:12}),z===G.id?"Wird gesendetâ¦":"Jetzt senden"]}),F===G.id?s.jsxs("div",{className:"p-3 rounded-lg border border-border bg-muted/30 space-y-2",children:[s.jsx("p",{className:"text-[11px] text-muted-foreground font-semibold uppercase tracking-widest",children:"Versand planen"}),s.jsx("input",{type:"date",value:D,min:new Date().toISOString().slice(0,10),onChange:V=>N(V.target.value),className:"w-full px-2 py-1.5 text-xs rounded border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary"}),s.jsx("input",{type:"time",value:K,onChange:V=>R(V.target.value),className:"w-full px-2 py-1.5 text-xs rounded border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary"}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx(Ge,{size:"sm",variant:"outline",className:"flex-1 text-xs h-7",onClick:()=>U(null),children:"Abbrechen"}),s.jsxs(Ge,{size:"sm",className:"flex-1 text-xs h-7 gap-1",onClick:()=>ae(G),children:[s.jsx(gr,{size:10})," Planen"]})]})]}):s.jsxs(Ge,{size:"sm",variant:"outline",onClick:()=>{U(G.id),N(""),R("10:00")},className:"gap-1.5 text-xs",children:[s.jsx(gr,{size:12})," Versand planen"]})]}),G.status==="sent"&&s.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-green-500/10 text-green-400 text-xs",children:[s.jsx(ut,{size:12})," Erfolgreich versendet"]}),s.jsxs("button",{onClick:()=>Q(G.id),className:"flex items-center gap-1.5 px-2 py-1.5 rounded-lg border border-border text-muted-foreground hover:text-destructive hover:border-destructive/40 transition-colors text-xs",children:[s.jsx(Vt,{size:12})," Löschen"]})]})]},G.id)})})})]})})]})]})}const yj=[{value:"general",label:"Allgemein"},{value:"vip",label:"VIP"},{value:"press",label:"Presse"},{value:"artist",label:"Künstler"}];function Y2e(e){return e.type==="percentage"?`${e.value}%`:`â¬${(e.value/100).toFixed(2)}`}function Z2e(e){return e==="active"?"bg-green-500/15 text-green-400":e==="expired"?"bg-red-500/15 text-red-400":"bg-muted text-muted-foreground"}function X2e(e){return e==="active"?"Aktiv":e==="expired"?"Abgelaufen":"Inaktiv"}function Qg(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";return Array.from({length:8},()=>e[Math.floor(Math.random()*e.length)]).join("")}function Q2e(){const{toast:e}=iE(),[t,r]=A.useState([]),[n,i]=A.useState(!0),[a,o]=A.useState(""),[l,c]=A.useState("all"),[u,d]=A.useState(!1),[x,f]=A.useState(!1),[h,m]=A.useState(Qg()),[p,v]=A.useState(""),[y,b]=A.useState("percentage"),[g,w]=A.useState(""),[E,C]=A.useState(""),[j,S]=A.useState(""),[_,O]=A.useState(""),[I,B]=A.useState(""),[T,k]=A.useState(""),$=A.useCallback(async()=>{i(!0);const{data:R,error:H}=await re.from("coupons").select("*").order("created_at",{ascending:!1});H||r(R??[]),i(!1)},[]);A.useEffect(()=>{$()},[$]);function W(){m(Qg()),v(""),b("percentage"),w(""),C(""),S(""),O(""),B(""),k("")}async function z(){const R=parseFloat(g);if(!h.trim()||isNaN(R)||R<=0){e({title:"Pflichtfelder fehlen",description:"Code und Wert sind erforderlich.",variant:"destructive"});return}if(y==="percentage"&&R>100){e({title:"Ungültiger Prozentsatz",description:"Maximal 100%.",variant:"destructive"});return}f(!0);const{data:{user:H}}=await re.auth.getUser(),X=Math.round(y==="fixed"?R*100:R),{error:ie}=await re.from("coupons").insert({code:h.trim().toUpperCase(),description:p.trim()||null,type:y,value:X,max_uses:E?parseInt(E):null,min_order_cents:j?Math.round(parseFloat(j)*100):null,applicable_segment:_||null,valid_from:I||null,valid_until:T||null,created_by:H.id,status:"active"});f(!1),ie?e({title:"Fehler",description:ie.message,variant:"destructive"}
985):(e({title:"Gutschein erstellt! ðï¸",description:`Code: ${h.toUpperCase()}`}),W(),d(!1),$())}async function L(R){const H=R.status==="active"?"inactive":"active",{error:X}=await re.from("coupons").update({status:H}).eq("id",R.id);if(X){e({title:"Fehler",description:X.message,variant:"destructive"});return}e({title:H==="active"?"Aktiviert":"Deaktiviert"}),$()}async function F(R){if(!confirm("Gutschein wirklich löschen?"))return;const{error:H}=await re.from("coupons").delete().eq("id",R);if(H){e({title:"Fehler",description:H.message,variant:"destructive"});return}e({title:"Gelöscht"}),$()}function U(R){navigator.clipboard.writeText(R),e({title:"Code kopiert!",description:R})}const D=t.filter(R=>{const H=a.toLowerCase(),X=R.code.toLowerCase().includes(H)||(R.description??"").toLowerCase().includes(H),ie=l==="all"||R.status===l;return X&&ie}),N=t.filter(R=>R.status==="active").length,K=t.reduce((R,H)=>R+H.used_count,0);return s.jsxs(dt,{allowedRoles:["admin"],children:[s.jsx(Hr,{}),s.jsxs("main",{id:"main-content",className:"pt-14 min-h-screen",children:[s.jsx("section",{className:"py-12 bg-card/50 border-b border-border",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-6xl",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase",children:"Admin"}),s.jsx("h1",{className:"font-display text-4xl md:text-6xl mt-1",children:"GUTSCHEINE"}),s.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"Rabattcodes erstellen · verwalten · einlösen"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Ge,{variant:"outline",size:"sm",onClick:$,disabled:n,children:s.jsx(Be,{size:13,className:n?"animate-spin":""})}),s.jsxs(Ge,{size:"sm",onClick:()=>{W(),d(!0)},className:"gap-2",children:[s.jsx(Ht,{size:13})," Neuer Gutschein"]})]})]}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mt-6",children:[{label:"Gesamt",value:t.length,icon:ay},{label:"Aktiv",value:N,icon:ut},{label:"Inaktiv / Abgelaufen",value:t.length-N,icon:Kt},{label:"Einlösungen gesamt",value:K,icon:fE}].map(({label:R,value:H,icon:X})=>s.jsxs("div",{className:"p-4 rounded-xl border border-border bg-card gradient-card flex flex-col gap-1",children:[s.jsx(X,{size:14,className:"text-primary"}),s.jsx("p",{className:"font-display text-2xl text-foreground",children:H}),s.jsx("p",{className:"text-[11px] text-muted-foreground",children:R})]},R))})]})}),s.jsx("section",{className:"py-8",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-6xl space-y-6",children:[u&&s.jsxs("div",{className:"p-6 rounded-xl border border-primary/30 bg-card space-y-5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h2",{className:"font-bold text-lg",children:"Neuen Gutschein erstellen"}),s.jsx("button",{onClick:()=>d(!1),children:s.jsx(_t,{size:16,className:"text-muted-foreground"})})]}),s.jsxs("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-widest",children:"Code *"}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx("input",{value:h,onChange:R=>m(R.target.value.toUpperCase()),className:"flex-1 px-3 py-2 text-sm font-mono rounded-lg border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary uppercase",placeholder:"SUMMER20"}),s.jsx("button",{onClick:()=>m(Qg()),title:"Zufälligen Code generieren",className:"px-2 rounded-lg border border-border text-muted-foreground hover:text-foreground transition-colors",children:s.jsx(jT,{size:14})})]})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-widest",children:"Rabatt-Typ *"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("button",{onClick:()=>b("percentage"),className:`flex-1 flex items-center justify-center gap-1.5 py-2 rounded-lg border text-sm font-semibold transition-all ${y==="percentage"?"border-primary bg-primary/10 text-primary":"border-border text-muted-foreground hover:text-foreground"}`,children:[s.jsx(g9,{size:13})," Prozent"]}),s.jsxs("button",{onClick:()=>b("fixed"),className:`flex-1 flex items-center justify-center gap-1.5 py-2 rounded-lg border text-sm font-semibold transition-all ${y==="fixed"?"border-primary bg-primary/10 text-primary":"border-border text-muted-foreground hover:text-foreground"}`,children:[s.jsx(ji,{size:13})," Fest (â¬)"]})]})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsxs("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-widest",children:["Wert * ",y==="percentage"?"(1â100%)":"(â¬)"]}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"number",min:"0",max:y==="percentage"?100:void 0,step:y==="fixed"?"0.01":"1",value:g,onChange:R=>w(R.target.value),placeholder:y==="percentage"?"20":"5.00",className:"w-full px-3 py-2 text-sm rounded-lg border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary"}),s.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-xs text-muted-foreground",children:y==="percentage"?"%":"â¬"})]})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-widest",children:"Max. Einlösungen"}),s.jsx("input",{type:"number",min:"1",value:E,onChange:R=>C(R.target.value),placeholder:"Unbegrenzt",className:"w-full px-3 py-2 text-sm rounded-lg border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-widest",children:"Mindestbestellwert (â¬)"}),s.jsx("input",{type:"number",min:"0",step:"0.01",value:j,onChange:R=>S(R.target.value),placeholder:"Kein Minimum",className:"w-full px-3 py-2 text-sm rounded-lg border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-widest",children:"Ticket-Kategorie"}
985),s.jsxs("select",{value:_,onChange:R=>O(R.target.value),className:"w-full px-3 py-2 text-sm rounded-lg border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary",children:[s.jsx("option",{value:"",children:"Alle Kategorien"}),yj.map(R=>s.jsx("option",{value:R.value,children:R.label},R.value))]})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-widest",children:"Gültig ab"}),s.jsx("input",{type:"date",value:I,onChange:R=>B(R.target.value),className:"w-full px-3 py-2 text-sm rounded-lg border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-widest",children:"Gültig bis"}),s.jsx("input",{type:"date",value:T,onChange:R=>k(R.target.value),className:"w-full px-3 py-2 text-sm rounded-lg border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary"})]}),s.jsxs("div",{className:"space-y-1 sm:col-span-2 lg:col-span-1",children:[s.jsx("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-widest",children:"Beschreibung (intern)"}),s.jsx("input",{type:"text",value:p,onChange:R=>v(R.target.value),placeholder:"z.B. Sommer-Aktion 2025",className:"w-full px-3 py-2 text-sm rounded-lg border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary"})]})]}),s.jsxs("div",{className:"flex gap-2 justify-end pt-2 border-t border-border",children:[s.jsx(Ge,{variant:"outline",size:"sm",onClick:()=>d(!1),children:"Abbrechen"}),s.jsxs(Ge,{size:"sm",onClick:z,disabled:x||!h.trim()||!g,className:"gap-2",children:[x?s.jsx(Be,{size:12,className:"animate-spin"}):s.jsx(Ht,{size:12}),"Gutschein erstellen"]})]})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[s.jsxs("div",{className:"relative flex-1 max-w-sm",children:[s.jsx(Ur,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx("input",{type:"search",placeholder:"Code oder Beschreibung â¦",value:a,onChange:R=>o(R.target.value),className:"w-full pl-9 pr-4 py-2 text-sm rounded-xl border border-border bg-card focus:outline-none focus:ring-1 focus:ring-primary"})]}),s.jsx("div",{className:"flex gap-1",children:["all","active","inactive","expired"].map(R=>s.jsx("button",{onClick:()=>c(R),className:`px-3 py-1.5 rounded-lg text-xs font-semibold transition-all border ${l===R?"bg-primary/15 text-primary border-primary/30":"border-border text-muted-foreground hover:text-foreground"}`,children:{all:"Alle",active:"Aktiv",inactive:"Inaktiv",expired:"Abgelaufen"}[R]},R))})]}),n?s.jsxs("div",{className:"flex items-center justify-center py-20 text-muted-foreground gap-2",children:[s.jsx(Be,{size:16,className:"animate-spin"})," Ladeâ¦"]}):D.length===0?s.jsxs("div",{className:"flex flex-col items-center py-20 text-muted-foreground gap-2",children:[s.jsx(ay,{size:32,className:"opacity-30"}),s.jsx("p",{children:"Keine Gutscheine gefunden."}),s.jsxs(Ge,{size:"sm",onClick:()=>{W(),d(!0)},className:"mt-2 gap-2",children:[s.jsx(Ht,{size:13})," Ersten Gutschein erstellen"]})]}):s.jsxs("div",{className:"rounded-xl border border-border overflow-hidden",children:[s.jsxs("div",{className:"hidden lg:grid grid-cols-[2fr_1fr_1fr_1fr_1fr_1fr_auto] gap-2 px-4 py-3 bg-muted/50 text-[11px] font-bold uppercase tracking-widest text-muted-foreground border-b border-border",children:[s.jsx("span",{children:"Code / Beschreibung"}),s.jsx("span",{children:"Rabatt"}),s.jsx("span",{children:"Einlösungen"}),s.jsx("span",{children:"Gültigkeit"}),s.jsx("span",{children:"Kategorie"}),s.jsx("span",{children:"Status"}),s.jsx("span",{})]}),s.jsx("div",{className:"divide-y divide-border",children:D.map(R=>{var X;const H=R.max_uses?Math.min(100,R.used_count/R.max_uses*100):null;return s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[2fr_1fr_1fr_1fr_1fr_1fr_auto] gap-3 px-4 py-4 items-center hover:bg-muted/20 transition-colors",children:[s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-mono font-bold text-foreground tracking-widest text-sm",children:R.code}),s.jsx("button",{onClick:()=>U(R.code),className:"text-muted-foreground hover:text-primary transition-colors",title:"Code kopieren",children:s.jsx(ET,{size:12})})]}),R.description&&s.jsx("span",{className:"text-xs text-muted-foreground",children:R.description})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[R.type==="percentage"?s.jsx(g9,{size:12,className:"text-primary"}):s.jsx(ji,{size:12,className:"text-primary"}),s.jsx("span",{className:"font-bold text-foreground",children:Y2e(R)})]}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsxs("span",{className:"text-sm text-foreground",children:[R.used_count,R.max_uses?` / ${R.max_uses}`:""]}),H!==null&&s.jsx("div",{className:"h-1.5 rounded-full bg-muted overflow-hidden w-24",children:s.jsx("div",{className:`h-full rounded-full transition-all ${H>=90?"bg-red-500":"bg-primary"}`,style:{width:`${H}%`}})}),R.min_order_cents&&s.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["ab â¬",(R.min_order_cents/100).toFixed(2)]})]}),s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs text-muted-foreground",children:[R.valid_from&&s.jsxs("span",{children:[s.jsx(Lr,{size:10,
985className:"inline mr-0.5"}),"ab ",new Date(R.valid_from).toLocaleDateString("de-DE")]}),R.valid_until&&s.jsxs("span",{children:[s.jsx(Lr,{size:10,className:"inline mr-0.5"}),"bis ",new Date(R.valid_until).toLocaleDateString("de-DE")]}),!R.valid_from&&!R.valid_until&&s.jsx("span",{children:"Unbegrenzt"})]}),s.jsx("span",{className:"text-xs text-muted-foreground",children:R.applicable_segment?((X=yj.find(ie=>ie.value===R.applicable_segment))==null?void 0:X.label)??R.applicable_segment:"Alle"}),s.jsx("span",{className:`text-[11px] font-bold px-2 py-0.5 rounded-full w-fit ${Z2e(R.status)}`,children:X2e(R.status)}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>L(R),disabled:R.status==="expired",title:R.status==="active"?"Deaktivieren":"Aktivieren",className:"p-1.5 rounded-lg border border-border text-muted-foreground hover:text-foreground transition-colors disabled:opacity-40",children:R.status==="active"?s.jsx(Kt,{size:13}):s.jsx(ut,{size:13})}),s.jsx("button",{onClick:()=>F(R.id),className:"p-1.5 rounded-lg border border-border text-muted-foreground hover:text-destructive hover:border-destructive/40 transition-colors",children:s.jsx(Vt,{size:13})})]})]},R.id)})})]})]})})]})]})}const J2e=["Electronic","Techno","House","Trance","Drum & Bass","Hip-Hop","Pop","Rock","Jazz","Mixed"],e9e=[0,7,19],o1={draft:{label:"Entwurf",cls:"bg-muted text-muted-foreground border-border"},pending:{label:"Ausstehend",cls:"bg-orange-500/15 text-orange-400 border-orange-500/30"},approved:{label:"Genehmigt",cls:"bg-primary/15 text-primary border-primary/30"},rejected:{label:"Abgelehnt",cls:"bg-destructive/15 text-destructive border-destructive/30"}},ID={gelaende:{label:"Geländeplan",desc:"Festival-/Open-Air-Gelände",icon:zT},saal:{label:"Saalplan",desc:"Halle / Indoor-Venue",icon:gT},none:{label:"Keiner",desc:"Ohne Plan veröffentlichen",icon:Qv}},Jg=["#22c55e","#3b82f6","#f59e0b","#ef4444","#a855f7","#ec4899","#06b6d4","#f97316","#84cc16","#6366f1"],t9e={title:"",description:"",date_start:"",date_end:"",time_start:"",time_end:"",location:"",address:"",organizer_name:"",organizer_email:"",genre:"",expected_attendance:null,status:"draft",lageplan_url:null,plan_type:"none"},r9e={category:"",description:"",price_cents:0,net_price_cents:0,vat_rate:19,fee_cents:0,total_stock:100,restock_threshold:20,is_group:!1,group_size:null,sale_from:null,sale_until:null};function MD(e,t,r){return Math.round(e*(1+t/100))+r}function RD(e,t){return Math.round(e*(t/100))}function Ri(e){return`â¬Â ${(e/100).toFixed(2)}`}const pt="w-full bg-background border border-border rounded-xl px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50 transition-all placeholder:text-muted-foreground",rt="block text-xs font-semibold text-muted-foreground mb-1 uppercase tracking-wider";function n9e({msg:e,type:t}){return s.jsxs("div",{role:"alert","aria-live":"assertive",className:`fixed top-20 right-4 z-[500] flex items-center gap-2 px-4 py-3 rounded-xl shadow-xl text-sm font-semibold border ${t==="ok"?"bg-card border-primary/30 text-primary":"bg-card border-destructive/30 text-destructive"}`,children:[t==="ok"?s.jsx(ut,{size:15}):s.jsx(bn,{size:15}),e]})}function i9e({label:e,onConfirm:t,onCancel:r,deleting:n}){return s.jsxs("div",{className:"fixed inset-0 z-[500] flex items-center justify-center p-4",role:"dialog","aria-modal":"true",children:[s.jsx("div",{className:"absolute inset-0 bg-background/80 backdrop-blur-sm",onClick:r}),s.jsxs("div",{className:"relative w-full max-w-sm bg-card border border-destructive/30 rounded-2xl shadow-2xl p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-destructive/10 flex items-center justify-center",children:s.jsx(Vt,{size:18,className:"text-destructive"})}),s.jsx("h2",{className:"font-display text-lg text-destructive",children:"LÃSCHEN?"})]}),s.jsxs("p",{className:"text-sm text-muted-foreground mb-5",children:[s.jsx("span",{className:"font-bold text-foreground",children:e})," wirklich löschen? Kann nicht rückgängig gemacht werden."]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:r,className:"flex-1 py-2.5 rounded-xl border border-border text-sm hover:bg-muted transition-colors",children:"Abbrechen"}),s.jsxs("button",{onClick:t,disabled:n,className:"flex-1 flex items-center justify-center gap-2 py-2.5 rounded-xl bg-destructive text-destructive-foreground text-sm font-bold hover:opacity-90 disabled:opacity-50",children:[n?s.jsx(ar,{size:14,className:"animate-spin"}):s.jsx(Vt,{size:14})," Löschen"]})]})]})]})}function a9e({eventId:e,planUrl:t,planType:r,sectors:n,onUpdate:i,notify:a}){const o=A.useRef(null),[l,c]=A.useState(null),[u,d]=A.useState(""),[x,f]=A.useState(""),[h,m]=A.useState("#22c55e"),[p,v]=A.useState(null),[y,b]=A.useState(null),g=A.useRef({x:0,y:0,origTop:0,origLeft:0,origW:0,origH:0}),[w,E]=A.useState(!1),C=r==="saal"?"Saalplan":"Geländeplan";async function j(){E(!0);const T=n.length,k=T%Jg.length,{error:$}=await re.from("plan_sectors").insert([{event_id:e,label:`Sektor ${T+1}`,top_pct:10+T*5%60,left_pct:10+T*8%60,width_pct:18,height_pct:12,color:Jg[k],sort_order:T}]);$?a($.message,"err"):(a("Sektor hinzugefügt â","ok"),i()),E(!1)}async function S(T,k){const{error:$}=await re.from("plan_sectors").update(k).eq("id",T);$?a($.message,"err"):i()}async function _(T){const{error:k}=await re.from("plan_sectors").delete().eq("id",T);k?a(k.message,"err"):(a("Sektor gelöscht","ok"),i())}function O(T){c(T.id),d(T.label),f(T.description??""),m(T.color)}async function I(){l&&(await S(l,{label:u,description:x||null,color:h}),c(null),a("Sektor gespeichert â","ok"))}function B(T,k,$){var z;T.preventDefault(),T.stopPropagation(),(z=o.current)!=null&&z.getBoundingClientRect()&&
985(g.current={x:T.clientX,y:T.clientY,origTop:k.top_pct,origLeft:k.left_pct,origW:k.width_pct,origH:k.height_pct},$==="drag"?v(k.id):b(k.id))}return A.useEffect(()=>{if(!(p||y))return;function k(W){var U,D,N;const z=(U=o.current)==null?void 0:U.getBoundingClientRect();if(!z)return;const L=(W.clientX-g.current.x)/z.width*100,F=(W.clientY-g.current.y)/z.height*100;if(p){const K=Math.max(0,Math.min(100-g.current.origH,g.current.origTop+F)),R=Math.max(0,Math.min(100-g.current.origW,g.current.origLeft+L)),H=(D=o.current)==null?void 0:D.querySelector(`[data-sector-id="${p}"]`);H&&(H.style.top=`${K}%`,H.style.left=`${R}%`)}else if(y){const K=Math.max(5,g.current.origW+L),R=Math.max(5,g.current.origH+F),H=(N=o.current)==null?void 0:N.querySelector(`[data-sector-id="${y}"]`);H&&(H.style.width=`${K}%`,H.style.height=`${R}%`)}}function $(W){var U;const z=(U=o.current)==null?void 0:U.getBoundingClientRect();if(!z)return;const L=(W.clientX-g.current.x)/z.width*100,F=(W.clientY-g.current.y)/z.height*100;if(p){const D=Math.max(0,Math.min(100-g.current.origH,g.current.origTop+F)),N=Math.max(0,Math.min(100-g.current.origW,g.current.origLeft+L));S(p,{top_pct:Math.round(D*10)/10,left_pct:Math.round(N*10)/10})}else if(y){const D=Math.max(5,g.current.origW+L),N=Math.max(5,g.current.origH+F);S(y,{width_pct:Math.round(D*10)/10,height_pct:Math.round(N*10)/10})}v(null),b(null)}return window.addEventListener("mousemove",k),window.addEventListener("mouseup",$),()=>{window.removeEventListener("mousemove",k),window.removeEventListener("mouseup",$)}},[p,y]),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("h4",{className:"text-xs font-bold uppercase tracking-widest text-muted-foreground",children:[C," â Sektoren (",n.length,")"]}),s.jsxs("button",{onClick:j,disabled:w,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-primary/10 border border-primary/30 text-primary text-xs font-bold hover:bg-primary/20 transition-colors disabled:opacity-50",children:[w?s.jsx(ar,{size:11,className:"animate-spin"}):s.jsx(Ht,{size:11})," Sektor hinzufügen"]})]}),s.jsxs("div",{ref:o,className:"relative rounded-xl overflow-hidden border border-border bg-muted/30 select-none",style:{cursor:p?"grabbing":"default"},children:[s.jsx("img",{src:t,alt:C,className:"w-full h-auto block pointer-events-none",draggable:!1}),n.map(T=>s.jsxs("div",{"data-sector-id":T.id,className:"absolute group",style:{to
985p:`${T.top_pct}%`,left:`${T.left_pct}%`,width:`${T.width_pct}%`,height:`${T.height_pct}%`},children:[s.jsxs("div",{className:"absolute inset-0 rounded-lg border-2 transition-all",style:{borderColor:T.color,backgroundColor:`${T.color}25`},onMouseDown:k=>B(k,T,"drag"),title:`${T.label}${T.description?` â ${T.description}`:""}`,children:[s.jsx("span",{className:"absolute top-1 left-1 px-1.5 py-0.5 rounded text-[9px] font-bold text-white leading-none whitespace-nowrap",style:{backgroundColor:T.color},children:T.label}),s.jsx(FT,{size:10,className:"absolute top-1 right-1 text-white opacity-0 group-hover:opacity-80 transition-opacity cursor-grab"})]}),s.jsx("div",{className:"absolute bottom-0 right-0 w-3 h-3 cursor-se-resize opacity-0 group-hover:opacity-100 transition-opacity",style:{backgroundColor:T.color},onMouseDown:k=>B(k,T,"resize")})]},T.id))]}),n.length>0&&s.jsx("div",{className:"space-y-2",children:n.map(T=>s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 rounded-xl border border-border bg-card/50",children:[s.jsx("div",{className:"w-4 h-4 rounded-sm shrink-0",style:{backgroundColor:T.color}}),l===T.id?s.jsxs("div",{className:"flex-1 flex flex-wrap gap-2 items-center",children:[s.jsx("input",{className:`${pt} max-w-[160px]`,value:u,onChange:k=>d(k.target.value),placeholder:"Name"}),s.jsx("input",{className:`${pt} max-w-[220px]`,value:x,onChange:k=>f(k.target.value),placeholder:"Beschreibung (optional)"}),s.jsx("div",{className:"flex gap-1",children:Jg.map(k=>s.jsx("button",{type:"button",onClick:()=>m(k),className:`w-5 h-5 rounded-sm border-2 transition-all ${h===k?"border-foreground scale-110":"border-transparent"}`,style:{backgroundColor:k}},k))}),s.jsx("button",{onClick:I,className:"px-2.5 py-1.5 rounded-lg bg-primary text-primary-foreground text-xs font-bold",children:s.jsx(p0,{size:11})}),s.jsx("button",{onClick:()=>c(null),className:"px-2.5 py-1.5 rounded-lg border border-border text-xs text-muted-foreground",children:s.jsx(_t,{size:11})})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-semibold text-foreground",children:T.label}),T.description&&s.jsx("p",{className:"text-xs text-muted-foreground",children:T.description})]}),s.jsx("button",{onClick:()=>O(T),className:"p-1.5 rounded-lg border border-border text-muted-foreground hover:text-primary hover:border-primary/40 transition-all",children:s.jsx(ss,{size:11})}),s.jsx("button",{onClick:()=>_(T.id),className:"p-1.5 rounded-lg border border-border text-muted-foreground hover:text-destructive hover:border-destructive/40 transition-all",children:s.jsx(Vt,{size:11})})]})]},T.id))}),n.length===0&&s.jsxs("p",{className:"text-center py-6 text-sm text-muted-foreground",children:['Noch keine Sektoren. Klicke âSektor hinzufügen" und ziehe die Bereiche auf dem ',C," zurecht."]})]})}function s9e({initial:e,onSave:t,onClose:r,saving:n}){const[i,a]=A.useState({...t9e,...e}),[o,l]=A.useState({});function c(d,x){a(f=>({...f,[d]:x})),l(f=>{const h={...f};return delete h[d],h})}function u(){const d={};return i.title.trim()||(d.title="Pflichtfeld"),i.date_start||(d.date_start="Pflichtfeld"),i.location.trim()||(d.location="Pflichtfeld"),i.organizer_name.trim()||(d.organizer_name="Pflichtfeld"),(!i.organizer_email.trim()||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i.organizer_email))&&(d.organizer_email="Gültige E-Mail erforderlich"),l(d),Object.keys(d).length===0}return s.jsxs("div",{className:"fixed inset-0 z-[400] flex items-center justify-center p-4",role:"dialog","aria-modal":"true",children:[s.jsx("div",{className:"absolute inset-0 bg-background/80 backdrop-blur-sm",onClick:r}),s.jsxs("div",{className:"relative w-full max-w-2xl bg-card border border-border rounded-2xl shadow-2xl shadow-black/60 overflow-y-auto max-h-[90vh]",children:[s.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[s.jsx("h2",{className:"font-display text-xl",children:e.title?"EVENT BEARBEITEN":"NEUES EVENT"}),s.jsx("button",{onClick:r,className:"p-1.5 rounded-lg hover:bg-muted text-muted-foreground hover:text-foreground transition-colors",children:s.jsx(_t,{size:16})})]}),s.jsxs("form",{onSubmit:d=>{d.preventDefault(),u()&&t(i)},className:"p-6 space-y-5",children:[s.jsxs("div",{children:[s.jsx("p",{className:rt,children:"Status"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:["draft","pending","approved"].map(d=>s.jsx("button",{type:"button",onClick:()=>c("status",d),className:`px-3 py-1.5 rounded-lg text-xs font-bold border transition-all ${i.status===d?o1[d].cls+" ring-1 ring-primary/30":"border-border text-muted-foreground hover:border-primary/30"}`,children:o1[d].label},d))})]}),s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"ev-title",children:"Titel *"}),s.jsx("input",{id:"ev-title",className:`${pt} ${o.title?"border-destructive":""}`,value:i.title,onChange:d=>c("title",d.target.value),placeholder:"Spirit Festival 2027"}),o.title&&s.jsx("p",{className:"text-xs text-destructive mt-1",children:o.title})]}),s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"ev-desc",children:"Beschreibung"}),s.jsx("textarea",{id:"ev-desc",rows:3,className:pt,value:i.description??"",onChange:d=>c("description",d.target.value),placeholder:"Kurze Beschreibung â¦"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"ev-ds",children:"Startdatum *"}),s.jsx("input",{id:"ev-ds",type:"date",className:`${pt} ${o.date_start?"border-destructive":""}
985`,value:i.date_start,onChange:d=>c("date_start",d.target.value)}),o.date_start&&s.jsx("p",{className:"text-xs text-destructive mt-1",children:o.date_start})]}),s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"ev-de",children:"Enddatum"}),s.jsx("input",{id:"ev-de",type:"date",className:pt,value:i.date_end??"",onChange:d=>c("date_end",d.target.value||null)})]}),s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"ev-ts",children:"Beginn"}),s.jsx("input",{id:"ev-ts",type:"time",className:pt,value:i.time_start??"",onChange:d=>c("time_start",d.target.value||null)})]}),s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"ev-te",children:"Ende"}),s.jsx("input",{id:"ev-te",type:"time",className:pt,value:i.time_end??"",onChange:d=>c("time_end",d.target.value||null)})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"ev-loc",children:"Ort / Venue *"}),s.jsx("input",{id:"ev-loc",className:`${pt} ${o.location?"border-destructive":""}`,value:i.location,onChange:d=>c("location",d.target.value),placeholder:"Arena Berlin"}),o.location&&s.jsx("p",{className:"text-xs text-destructive mt-1",children:o.location})]}),s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"ev-addr",children:"Adresse"}),s.jsx("input",{id:"ev-addr",className:pt,value:i.address??"",onChange:d=>c("address",d.target.value),placeholder:"Musterstr. 1, 10115 Berlin"})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"ev-genre",children:"Genre"}),s.jsxs("select",{id:"ev-genre",className:pt,value:i.genre??"",onChange:d=>c("genre",d.target.value||null),children:[s.jsx("option",{value:"",children:"â wählen â"}),J2e.map(d=>s.jsx("option",{value:d,children:d},d))]})]}),s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"ev-att",children:"Erwartete Besucher"}),s.jsx("input",{id:"ev-att",type:"number",min:"0",className:pt,value:i.expected_attendance??"",onChange:d=>c("expected_attendance",d.target.value?parseInt(d.target.value):null)})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"ev-on",children:"Veranstalter *"}),s.jsx("input",{id:"ev-on",className:`${pt} ${o.organizer_name?"border-destructive":""}`,value:i.organizer_name,onChange:d=>c("organizer_name",d.target.value),placeholder:"Max Mustermann"}),o.organizer_name&&s.jsx("p",{className:"text-xs text-destructive mt-1",children:o.organizer_name})]}),s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"ev-oe",children:"Veranstalter E-Mail *"}),s.jsx("input",{id:"ev-oe",type:"email",className:`${pt} ${o.organizer_email?"border-destructive":""}`,value:i.organizer_email,onChange:d=>c("organizer_email",d.target.value),placeholder:"[email protected]"}),o.organizer_email&&s.jsx("p",{className:"text-xs text-destructive mt-1",children:o.organizer_email})]})]}),s.jsxs("div",{className:"rounded-xl border border-border bg-muted/20 p-4 space-y-3",children:[s.jsx("p",{className:rt+" mb-0",children:"Gelände- / Saalplan"}),s.jsx("div",{className:"grid grid-cols-3 gap-2",children:["gelaende","saal","none"].map(d=>{const x=ID[d],f=x.icon;return s.jsxs("button",{type:"button",onClick:()=>c("plan_type",d),className:`flex flex-col items-center gap-1.5 p-3 rounded-xl text-xs border transition-all ${i.plan_type===d?"bg-primary/10 border-primary/40 text-primary ring-1 ring-primary/20":"border-border text-muted-foreground hover:border-primary/20"}`,children:[s.jsx(f,{size:20}),s.jsx("span",{className:"font-bold",children:x.label}),s.jsx("span",{className:"text-[10px] opacity-70",children:x.desc})]},d)})}),i.plan_type!=="none"&&s.jsx("p",{className:"text-xs text-muted-foreground",children:"ð¡ Nach dem Speichern kannst du ein Bild hochladen und Sektoren (z.B. Bühnen, Camping, Sanitär) darauf anlegen."})]}),s.jsxs("div",{className:"flex gap-3 pt-2",children:[s.jsx("button",{type:"button",onClick:r,className:"flex-1 py-2.5 rounded-xl border border-border text-sm hover:bg-muted transition-colors",children:"Abbrechen"}),s.jsxs("button",{type:"submit",disabled:n,className:"flex-1 flex items-center justify-center gap-2 py-2.5 rounded-xl bg-primary text-primary-foreground text-sm font-bold hover:opacity-90 disabled:opacity-50",children:[n?s.jsx(ar,{size:14,className:"animate-spin"}):s.jsx(p0,{size:14})," Speichern"]})]})]})]})]})}function o9e({eventName:e,initial:t,onSave:r,onClose:n,saving:i}){const a=(t==null?void 0:t.net_price_cents)??(t==null?void 0:t.price_cents)??0,[o,l]=A.useState({...r9e,...t,net_price_cents:a}),[c,u]=A.useState({});function d(m,p){l(v=>({...v,[m]:p})),u(v=>{const y={...v};return delete y[m],y})}const x=MD(o.net_price_cents,o.vat_rate,o.fee_cents),f=RD(o.net_price_cents,o.vat_rate);function h(){const m={};return o.category.trim()||(m.category="Pflichtfeld"),o.net_price_cents<0&&(m.net_price_cents="Muss ⥠0 sein"),o.total_stock<1&&(m.total_stock="Muss ⥠1 sein"),o.is_group&&(!o.group_size||o.group_size<2)&&(m.group_size="Mindestens 2 Personen"),u(m),Object.keys(m).length===0}return s.jsxs("div",{className:"fixed inset-0 z-[400] flex items-center justify-center p-4",role:"dialog","aria-modal":"true",children:[s.jsx("div",{className:"absolute inset-0 bg-background/80 backdrop-blur-sm",onClick:n}),s.jsxs("div",{className:"relative w-full max-w-lg bg-card border border-border rounded-2xl shadow-2xl shadow-black/60 overflow-y-auto max-h-[90vh]",children:[s.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-xl",children:t!=null&&t.category?"TICKET BEARBEITEN":"NEUES TICKET"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:e})]}),s.jsx("button",{onClick:n,className:"p-1.5 rounded-lg hover:bg-muted text-muted-foreground hover:text-foreground transition-colors",children:s.jsx(_t,{size:16})})]}),s.jsxs("form",{onSubmit:m=>{m.preventDefault(),h()&&r({...o,price_cents:x})},className:"p-6 space-y-4",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("button",{type:"button",onClick:()=>d("is_group",!1),className:`flex-1 flex items-center justify-center gap-2 py-2.5 rounded-xl text-sm font-bold border transition-all ${o.is_group?"border-border text-muted-foreground hover:border-primary/20":"bg-primary/10 border-primary/40 text-primary"}`,children:[s.jsx(Pt,{size:14})," Einzelticket"]}),s.jsxs("button",{type:"button",onClick:()=>{d("is_group",!0),o.group_size||d("group_size",2)},className:`flex-1 flex items-center justify-center gap-2 py-2.5 rounded-xl text-sm font-bold border transition-all ${o.is_group?"bg-primary/10 border-primary/40 text-primary":"border-border text-muted-foreground hover:border-primary/20"}`,children:[s.jsx(Je,{size:14})," Gruppenticket"]})]}),s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"tc-cat",children:"Kategorie-Name *"}),s.jsx("input",{id:"tc-cat",className:`${pt} ${c.category?"border-destructive":""}`,value:o.category,onChange:m=>d("category",m.target.value),placeholder:o.is_group?"Gruppe (4 Personen)":"Early Bird / VIP / Standard"}),c.category&&s.jsx("p",{className:"text-xs text-destructive mt-1",children:c.category})]}),s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"tc-desc",children:"Beschreibung"}),s.jsx("input",{id:"tc-desc",className:pt,value:o.description??"",onChange:m=>d("description",m.target.value||null),placeholder:"z.B. Inklusive Garderobe und Getränk"})]}),o.is_group&&s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"tc-gs",children:"Personen pro Ticket *"}),s.jsx("input",{id:"tc-gs",type:"number",min:"2",max:"200",className:`${pt} ${c.group_size?"border-destructive":""}`,value:o.group_size??"",onChange:m=>d("group_size",m.target.value?parseInt(m.target.value):null)}),c.group_size&&s.jsx("p",{className:"text-xs text-destructive mt-1",children:c.group_size})]}),s.jsxs("div",{className:"rounded-xl border border-border bg-muted/20 p-4 space-y-4",children:[s.jsx("p",{className:rt+" mb-0",children:"Preisaufschlüsselung"}),s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"tc-net",children:"Nettopreis (â¬)"}),s.jsx("input",{id:"tc-net",type:"number",min:"0",step:"0.01",className:`${pt} ${c.net_price_cents?"border-destructive":""}`,value:(o.net_price_cents/100).toFixed(2),onChange:m=>d("net_price_cents",Math.round(parseFloat(m.target.value||"0")*100))}),c.net_price_cents&&s.jsx("p",{className:"text-xs text-destructive mt-1",children:c.net_price_cents})]}),s.jsxs("div",{children:[s.jsx("p",{className:rt,children:"MwSt-Satz"}),s.jsx("div",{className:"flex gap-2",children:e9e.map(m=>s.jsxs("button",{type:"button",onClick:()=>d("vat_rate",m),className:`flex-1 py-2 rounded-lg text-xs font-bold border transition-all ${o.vat_rate===m?"bg-primary/10 border-primary/40 text-primary":"border-border text-muted-foreground hover:border-primary/20"}`,children:[m," %"]},m))}),o.vat_rate>0&&o.net_price_cents>0&&s.jsxs("p",{className:"text-xs text-muted-foreground mt-1.5",children:["MwSt-Betrag: ",Ri(f)]})]}),s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"tc-fee",children:"Gebühr / Booking-Fee (â¬)"}),s.jsx("input",{id:"tc-fee",type:"number",min:"0",step:"0.01",className:pt,value:(o.fee_cents/100).toFixed(2),onChange:m=>d("fee_cents",Math.round(parseFloat(m.target.value||"0")*100))}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Service- oder Vorverkaufsgebühr"})]}),s.jsxs("div",{className:"pt-3 border-t border-border flex items-end justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Bruttopreis (Kaufpreis)"}),o.vat_rate>0&&o.net_price_cents>0&&s.jsxs("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:["inkl. ",o.vat_rate,"% MwSt (",Ri(f),")"]}),o.fee_cents>0&&s.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["inkl. ",Ri(o.fee_cents)," Gebühr"]}),o.is_group&&o.group_size&&x>0&&s.jsxs("p",{className:"text-[11px] text-primary/70 mt-1",children:["â ",Ri(Math.round(x/o.group_size))," / Person"]})]}),s.jsx("p",{className:"font-display text-3xl text-primary",children:Ri(x)})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"tc-stock",children:"Kontingent *"}),s.jsx("input",{id:"tc-stock",type:"number",min:"1",className:`${pt} ${c.total_stock?"border-destructive":""}`,value:o.total_stock,onChange:m=>d("total_stock",parseInt(m.target.value||"0",10))}),c.total_stock&&s.jsx("p",{className:"text-xs text-destructive mt-1",children:c.total_stock})]}),s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"tc-thr",children:"Nachfüll-Schwellenwert"}),s.jsx("input",{id:"tc-thr",type:"number",min:"0",className:pt,value:o.restock_threshold,onChange:m=>d("restock_threshold",parseInt(m.target.value||"0",10))})]})]}),s.jsxs("div",{className:"rounded-xl border border-border bg-muted/20 p-4 space-y-3",children:[s.jsx("p",{className:rt+" mb-0",children:"Verkaufszeitraum"}),s.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"Nur innerhalb dieses Zeitraums wird das Ticket öffentlich angezeigt und ist kaufbar."}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"tc-sale-from",children:"Verkauf ab"}),s.jsx("input",{id:"tc-sale-from",type:"datetime-local",className:pt,value:o.sale_from?o.sale_from.slice(0,16):"",onCh
985ange:m=>d("sale_from",m.target.value?new Date(m.target.value).toISOString():null)})]}),s.jsxs("div",{children:[s.jsx("label",{className:rt,htmlFor:"tc-sale-until",children:"Verkauf bis"}),s.jsx("input",{id:"tc-sale-until",type:"datetime-local",className:pt,value:o.sale_until?o.sale_until.slice(0,16):"",onChange:m=>d("sale_until",m.target.value?new Date(m.target.value).toISOString():null)})]})]}),o.sale_from&&o.sale_until&&new Date(o.sale_from)>=new Date(o.sale_until)&&s.jsx("p",{className:"text-xs text-destructive",children:'âVerkauf ab" muss vor âVerkauf bis" liegen.'})]}),s.jsxs("div",{className:"flex gap-3 pt-1",children:[s.jsx("button",{type:"button",onClick:n,className:"flex-1 py-2.5 rounded-xl border border-border text-sm hover:bg-muted transition-colors",children:"Abbrechen"}),s.jsxs("button",{type:"submit",disabled:i,className:"flex-1 flex items-center justify-center gap-2 py-2.5 rounded-xl bg-primary text-primary-foreground text-sm font-bold hover:opacity-90 disabled:opacity-50",children:[i?s.jsx(ar,{size:14,className:"animate-spin"}):s.jsx(p0,{size:14})," Speichern"]})]})]})]})]})}function l9e(){const[e,t]=A.useState("events"),[r,n]=A.useState([]),[i,a]=A.useState([]),[o,l]=A.useState([]),[c,u]=A.useState([]),[d,x]=A.useState(new Set),[f,h]=A.useState(!0),[m,p]=A.useState(null),[v,y]=A.useState(null),[b,g]=A.useState(null),[w,E]=A.useState(null),[C,j]=A.useState(""),[S,_]=A.useState(null),[O,I]=A.useState(null),B=(M,Y="ok")=>{I({msg:M,type:Y}),setTimeout(()=>I(null),3500)},[T,k]=A.useState(null),[$,W]=A.useState(!1),[z,L]=A.useState(null),[F,U]=A.useState(!1),[D,N]=A.useState(null),[K,R]=A.useState(!1);A.useEffect(()=>{re.auth.getUser().then(({data:M})=>{var Y;return p(((Y=M.user)==null?void 0:Y.id)??null)})},[]);const H=A.useCallback(async()=>{h(!0);const[{data:M},{data:Y},{data:ee},{data:te},{data:J}]=await Promise.all([re.from("events").select("*").order("date_start",{ascending:!1}),re.from("ticket_categories").select("*").order("event_name").order("category"),re.from("invoices").select("*").order("issued_at",{ascending:!1}),re.from("scanned_tickets").select("ticket_number"),re.from("plan_sectors").select("*").order("sort_order")]);n(M??[]),a(Y??[]),l(ee??[]),u(J??[]),x(new Set((te??[]).map(oe=>oe.ticket_number))),h(!1)},[]);A.useEffect(()=>{H()},[H]);async function X(M,Y){E(M);const ee=Y.name.split(".").pop()??"jpg",te=`${M}/lageplan.${ee}`,{error:J}=await re.storage.from("event-maps").upload(te,Y,{upsert:!0});if(J){B(J.message,"err"),E(null);return}const{data:oe}=re.storage.from("event-maps").getPublicUrl(te),{error:pe}=await re.from("events").update({lageplan_url:oe.publicUrl}).eq("id",M);pe?B(pe.message,"err"):(B("Plan hochgeladen â"),H()),E(null)}async function ie(M){W(!0);const Y={...M,date_end:M.date_end||null,time_start:M.time_start||null,time_end:M.time_end||null,address:M.address||null,description:M.description||null,genre:M.genre||null,expected_attendance:M.expected_attendance||null,lageplan_url:M.lageplan_url||null};if((T==null?void 0:T.mode)==="edit"&&T.id){const{error:ee}=await re.from("events").update(Y).eq("id",T.id);ee?B(ee.message,"err"):(await re.from("event_audit_trail").insert([{event_id:T.id,action:"updated",changed_by:m,notes:"Event vom Admin bearbeitet"}]),B("Event gespeichert â"),k(null),H())}else{const{data:ee,error:te}=await re.from("events").insert([{...Y,created_by:m}]).select().single();te?B(te.message,"err"):(await re.from("event_audit_trail").insert([{event_id:ee.id,action:"created",new_status:M.status,changed_by:m,notes:"Event vom Admin erstellt"}]),B("Event erstellt â"),k(null),H())}W(!1)}async function se(M){U(!0);const Y={...M,description:M.description||null,group_size:M.is_group?M.group_size:null,event_name:z.eventName};if((z==null?void 0:z.mode)==="edit"&&z.id){const{error:ee}=await re.from("ticket_categories").update(Y).eq("id",z.id);ee?B(ee.message,"err"):(B("Ticket gespeichert â"),L(null),H())}else{const{error:ee}=await re.from("ticket_categories").insert([{...Y,sold_count:0}]);ee?B(ee.message,"err"):(B("Ticket-Kategorie erstellt â"),L(null),H())}U(!1)}function ne(M,Y){const ee=["Ticket-Nr.","Rechnung-Nr.","Typ","Käufer","E-Mail","Datum","Brutto (â¬)","Netto (â¬)","MwSt (â¬)","Eingecheckt"],te=Y.map(xe=>[xe.ticket_number,xe.invoice_number,xe.ticket_type,xe.holder_name,xe.holder_email,xe.event_date,(xe.gross_amount_cents/100).toFixed(2),(xe.net_amount_cents/100).toFixed(2),(xe.tax_amount_cents/100).toFixed(2),d.has(xe.ticket_number)?"Ja":"Nein"].map(ve=>`"${String(ve).replace(/"/g,'""')}"`).join(";")),J=new Blob(["\uFEFF"+[ee.join(";"),...te].join(` 986`)],{type:"text/csv;charset=utf-8;"}),oe=URL.createObjectURL(J),pe=document.createElement("a");
986pe.href=oe,pe.download=`tickets_${M.replace(/\s+/g,"_")}_${new Date().toISOString().slice(0,10)}.csv`,pe.click(),URL.revokeObjectURL(oe)}function ce(){const M=["Event","Datum","Ticket-Nr.","Rechnung-Nr.","Typ","Käufer","E-Mail","Brutto (â¬)","Netto (â¬)","MwSt (â¬)","Eingecheckt"],Y=o.map(oe=>[oe.event_title,oe.event_date,oe.ticket_number,oe.invoice_number,oe.ticket_type,oe.holder_name,oe.holder_email,(oe.gross_amount_cents/100).toFixed(2),(oe.net_amount_cents/100).toFixed(2),(oe.tax_amount_cents/100).toFixed(2),d.has(oe.ticket_number)?"Ja":"Nein"].map(pe=>`"${String(pe).replace(/"/g,'""')}"`).join(";")),ee=new Blob(["\uFEFF"+[M.join(";"),...Y].join(` 987`)],{type:"text/csv;charset=utf-8;"}),te=URL.createObjectURL(ee),J=document.createElement("a");J.href=te,J.download=`alle_ticketkäufer_${new Date().toISOString().slice(0,10)}.csv`,J.click(),URL.revokeObjectURL(te)}const ae=i.reduce((M,Y)=>{var ee;return(M[ee=Y.event_name]??(M[ee]=[])).push(Y),M},{}),Q=c.reduce((M,Y)=>{var ee;return(M[ee=Y.event_id]??(M[ee]=[])).push(Y),M},{}),P=Object.values(o.reduce((M,Y)=>(M[Y.event_title]||(M[Y.event_title]={title:Y.event_title,date:Y.event_date,invoices:[]}),M[Y.event_title].invoices.push(Y),M),{})).map(M=>({...M,invoices:M.invoices.filter(Y=>{const ee=C.toLowerCase();return!ee||Y.holder_name.toLowerCase().includes(ee)||Y.holder_email.toLowerCase().includes(ee)||Y.ticket_number.toLowerCase().includes(ee)||M.title.toLowerCase().includes(ee)})})).filter(M=>M.invoices.length>0),G=i.reduce((M,Y)=>M+Y.total_stock,0),Z=i.reduce((M,Y)=>M+Y.sold_count,0),V=o.reduce((M,Y)=>M+Y.gross_amount_cents,0);return s.jsxs(dt,{children:[s.jsx(Hr,{}),O&&s.jsx(n9e,{msg:O.msg,type:O.type}),T&&s.jsx(s9e,{initial:T.data,onSave:ie,onClose:()=>k(null),saving:$}),z&&s.jsx(o9e,{eventName:z.eventName,initial:z.data,onSave:se,onClose:()=>L(null),saving:F}),D&&s.jsx(i9e,{label:D.label,onConfirm:async()=>{R(!0),await D.onConfirm(),R(!1)},onCancel:()=>N(null),deleting:K}),s.jsxs("main",{id:"main-content",className:"pt-14 min-h-screen",children:[s.jsx("section",{className:"py-12 bg-card/50 border-b border-border",children:s.jsx("div",{className:"container mx-auto px-4 max-w-6xl",children:s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end sm:justify-between gap-4",children:[s.jsxs("div",{children:[s.jsxs(we,{to:"/dashboard",className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-primary transition-colors mb-3",children:[s.jsx(Sn,{size:12})," Dashboard"]}),s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-1",children:"Admin · Verwaltung"}),s.jsx("h1",{className:"font-display text-5xl md:text-7xl",children:"EVENT MANAGER"}),s.jsx("p",{className:"text-muted-foreground text-sm mt-2",children:"Events, Tickets & Käufer-Ãbersicht"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("button",{onClick:H,disabled:f,className:"flex items-center gap-1.5 px-3 py-2 rounded-xl border border-border text-xs text-muted-foreground hover:text-foreground transition-all disabled:opacity-40",children:[s.jsx(Be,{size:12,className:f?"animate-spin":""})," Aktualisieren"]}),e==="events"&&s.jsxs("button",{onClick:()=>k({mode:"create",data:{}}),className:"flex items-center gap-1.5 px-4 py-2 rounded-xl bg-primary text-primary-foreground text-xs font-bold hover:opacity-90",children:[s.jsx(Ht,{size:13})," Neues Event"]}),e==="buyers"&&s.jsxs("button",{onClick:ce,disabled:o.length===0,className:"flex items-center gap-1.5 px-4 py-2 rounded-xl bg-primary text-primary-foreground text-xs font-bold hover:opacity-90 disabled:opacity-40",children:[s.jsx(zr,{size:13})," Alle CSV"]})]})]})})}),s.jsx("section",{className:"border-b border-border bg-card/30",children:s.jsx("div",{className:"container mx-auto px-4 max-w-6xl py-5",children:s.jsx("dl",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[{label:"Events",value:r.length,icon:Lr},{label:"Ticket-Kontingent",value:G,icon:Pt},{label:"Tickets verkauft",value:Z,icon:Je},{label:"Gesamtumsatz",value:`â¬Â ${(V/100).toLocaleString("de-DE",{minimumFractionDigits:2})}`,icon:ji}].map(({label:M,value:Y,icon:ee})=>s.jsxs("div",{className:"p-4 rounded-xl border border-border gradient-card flex flex-col gap-1.5",children:[s.jsx(ee,{size:14,className:"text-primary"}),s.jsx("dd",{className:"font-display text-2xl text-foreground",children:Y}),s.jsx("dt",{className:"text-[11px] text-muted-foreground",children:M})]},M))})})}),s.jsx("div",{className:"border-b border-border bg-card/20",children:s.jsx("div",{className:"container mx-auto px-4 max-w-6xl",children:s.jsx("div",{className:"flex",role:"tablist",children:[{key:"events",label:"Events & Tickets"},{key:"buyers",label:`Käufer-Ãbersicht${o.length>0?` (${o.length})`:""}`}].map(({key:M,label:Y})=>s.jsx("button",{role:"tab","aria-selected":e===M,onClick:()=>t(M),className:`px-5 py-3 text-sm font-semibold border-b-2 transition-all ${e===M?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"}`,children:Y},M))})})}),s.jsxs("div",{className:"container mx-auto px-4 max-w-6xl py-8",children:[e==="events"&&s.jsx(Ce,{children:s.jsx("div",{className:"space-y-4",children:f?Array.from({length:3}).map((M,Y)=>s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-5 animate-pulse",children:[s.jsx("div",{className:"h-4 w-1/3 bg-muted rounded mb-2"}),s.jsx("div",{className:"h-3 w-1/2 bg-muted rounded"})]},Y)):r.length===0?s.jsxs("div",{className:"text-center py-20 text-muted-foreground",children:[s.jsx(Lr,{size:40,className:"mx-auto mb-3 opacity-30"}),s.jsx("p",{children:"Noch keine Events vorhanden."}),s.jsxs("button",{onClick:()=>k({mode:"create",data:{}}),className:"mt-4 inline-flex items-center gap-2 px-4 py-2 rounded-xl bg-primary text-primary-foreground text-sm font-bold hover:opacity-90",children:[s.jsx(Ht,{size:14})," Erstes Event erstellen"]})]}):r.map(M=>{const Y=ae[M.title]??[],ee=Q[M.id]??[],te=v===M.id,J=Y.reduce((ge,He)=>ge+He.total_stock,0),oe=Y.reduce((ge,He)=>ge+He.sold_count,0),pe=J>0?Math.round(oe/J*100):0,xe=o1[M.status],ve=ID[M.plan_type],Oe=ve.icon,De=M.plan_type!=="none",Et=b===M.id;return s.jsxs("div",{className:"rounded-2xl border border-border bg-card overflow-hidden",children:[s.jsxs("div",{className:"flex items-start gap-4 p-5",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-1",children:[s.jsx("h3",{className:"font-bold text-foreground",children:M.title}),s.jsx("span",{className:`inline-flex items-center text-[10px] px-2 py-0.5 rounded-full font-bold border ${xe.cls}`,children:xe.label}),M.genre&&s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-primary/10 text-primary font-semibold",children:M.genre}),De&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground font-semibold",children:[s.jsx(Oe,{size:9})," ",ve.label,ee.length>0&&` · ${ee.length} Sektoren`]})]}),s.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-muted-foreground mt-1",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Lr,{size:10}),new Date(M.date_start).toLocaleDateString("de-DE"),M.date_end&&` â ${new Date(M.date_end).toLocaleDateString("de-DE")}`]}),M.time_start&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(gr,{size:10}),M.time_start,M.time_end&&` â ${M.time_end}`]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(_r,{size:10}),M.location]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Pt,{size:10}),Y.length," Kat. · ",oe,"/",J," (",pe,"%)"]})]})]}),s.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 flex-wrap justify-end",children:[De&&s.jsxs("button",{onClick:()=>g(Et?null:M.id),className:`flex items-center gap-1 px-2.5 py-1.5 rounded-lg border text-xs transition-all ${Et?"bg-primary/10 border-primary/40 text-primary":"border-border text-muted-foreground hover:text-primary hover:border-primary/40"}`,children:[s.jsx(A4,{size:11})," Plan"]}),s.jsxs("button",{onClick:()=>k({mode:"edit",data:M,id:M.id}),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-border text-xs text-muted-foreground hover:text-primary hover:border-primary/40 transition-all",children:[s.jsx(ss,{size:11})," Bearbeiten"]}),s.jsx("button",{onClick:()=>N({label:M.title,onConfirm:async()=>{const{error:ge}=await re.from("events").delete().eq("id",M.id);ge?B(ge.message,"err"):(B("Event gelöscht"),H()),N(null)}}),className:"p-1.5 rounded-lg border border-border text-muted-foreground hover:text-destructive hover:border-destructive/40 transition-all",children:s.jsx(Vt,{size:12})}),s.jsxs("button",{onClick:()=>y(te?null:M.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-border text-xs text-muted-foreground hover:text-foreground transition-all","aria-expanded":te,children:[te?s.jsx(na,{size:13}):s.jsx(mr,{size:13})," Tickets"]})]})]}),J>0&&s.jsx("div",{className:"px-5 pb-3",children:s.jsx("div",{className:"h-1.5 rounded-full bg-muted overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all ${pe>=90?"bg-destructive":pe>=70?"bg-orange-500":"bg-primary"}`,style:{width:`${pe}%`}})})}),Et&&De&&s.jsx("div",{className:"border-t border-border p-5 bg-muted/10",children:M.lageplan_url?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Oe,{size:14,className:"text-primary"}),s.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-muted-foreground",children:ve.label})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("a",{href:M.lageplan_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border text-xs text-muted-foreground hover:text-primary hover:border-primary/40 transition-all",children:[s.jsx(ki,{size:11})," Vollbild"]}),s.jsxs("label",{className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-primary/10 border border-primary/30 text-primary text-xs font-bold hover:bg-primary/20 transition-colors cursor-pointer",children:[w===M.id?s.jsx(ar,{size:11,className:"animate-spin"}):s.jsx(y9,{size:11}),"Bild ersetzen",s.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:ge=>{var wt;const He=(wt=ge.target.files)==null?void 0:wt[0];He&&X(M.id,He)}})]})]})]}),s.jsx(a9e,{eventId:M.id,planUrl:M.lageplan_url,planType:M.plan_type,sectors:ee,onUpdate:H,notify:B})]}):s.jsxs("div",{className:"text-center py-10",children:[s.jsx(Oe,{size:40,className:"mx-auto mb-3 text-muted-foreground opacity-30"}),s.jsxs("p",{className:"text-sm text-muted-foreground mb-4",children:["Lade ein Bild deines ",M.plan_type==="saal"?"Saals":"Geländes"," hoch, um Sektoren darauf zu markieren."]}),s.jsxs("label",{className:"inline-flex items-center gap-2 px-4 py-2.5 rounded-xl bg-primary text-primary-foreground text-sm font-bold hover:opacity-90 cursor-pointer",children:[w===M.id?s.jsx(ar,{size:14,className:"animate-spin"}):s.jsx(y9,{size:14}),"Bild hochladen",s.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:ge=>{var wt;const He=(wt=ge.target.files)==null?void 0:wt[0];He&&X(M.id,He)}})]})]})}),te&&s.jsxs("div",{className:"border-t border-border",children:[s.jsxs("div",{className:"flex items-center justify-between px-5 py-3 bg-muted/10",children:[s.jsx("h4",{className:"text-xs font-bold uppercase tracking-widest text-muted-foreground",children:"Ticket-Kategorien"}),s.jsxs("button",{onClick:()=>L({eventName:M.title,mode:"create"}),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-primary/10 border border-primary/30 text-primary text-xs font-bold hover:bg-primary/20 transition-colors",children:[s.jsx(Ht,{size:11})," Kategorie hinzufügen"]})]}),Y.length===0?s.jsxs("div",{className:"px-5 py-8 text-center text-muted-foreground text-sm",children:[s.jsx(Pt,{size:24,className:"mx-auto mb-2 opacity-30"}),"Noch keine Ticket-Kategorien für dieses Event."]}):s.jsxs("div",{className:"divide-y divide-border",children:[s.jsxs("div",{className:"hidden lg:grid grid-cols-[2fr_1fr_1fr_1fr_1fr_1fr_auto] gap-2 px-5 py-2 bg-muted/10 text-[10px] uppercase font-bold tracking-widest text-muted-foreground",children:[s.jsx("span",{children:"Kategorie"}),s.jsx("span",{children:"Typ"}),s.jsx("span",{children:"Netto"}),s.jsx("span",{children:"MwSt"}),s.jsx("span",{children:"Gebühr"}),s.jsx("span",{children:"Brutto / Bestand"}),s.jsx("span",{})]}),Y.map(ge=>{const He=ge.total_stock-ge.sold_count,wt=ge.total_stock>0?Math.round(ge.sold_count/ge.total_stock*100):0,ze=RD(ge.net_price_cents,ge.vat_rate),br=ge.net_price_cents>0?MD(ge.net_price_cents,ge.vat_rate,ge.fee_cents):ge.price_cents;return s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[2fr_1fr_1fr_1fr_1fr_1fr_auto] gap-2 px-5 py-3 items-center",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold text-foreground",children:ge.category}
987),ge.description&&s.jsx("p",{className:"text-xs text-muted-foreground",children:ge.description})]}),s.jsx("div",{children:ge.is_group?s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full bg-primary/10 text-primary font-bold border border-primary/20",children:[s.jsx(Je,{size:9})," ",ge.group_size,"P"]}):s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full bg-muted text-muted-foreground font-bold border border-border",children:[s.jsx(Pt,{size:9})," Einzel"]})}),s.jsx("span",{className:"text-sm text-muted-foreground",children:ge.net_price_cents>0?Ri(ge.net_price_cents):"â"}),s.jsxs("span",{className:"text-sm text-muted-foreground",children:[ge.vat_rate>0&&ge.net_price_cents>0?`${ge.vat_rate}%`:"â",ge.vat_rate>0&&ge.net_price_cents>0&&s.jsxs("span",{className:"text-[10px] ml-1",children:["(",Ri(ze),")"]})]}),s.jsx("span",{className:"text-sm text-muted-foreground",children:ge.fee_cents>0?Ri(ge.fee_cents):"â"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-bold text-foreground text-sm",children:Ri(br)}),s.jsxs("p",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[He,"/",ge.total_stock,He===0&&s.jsx("span",{className:"text-[10px] font-bold text-destructive",children:"AUSVERKAUFT"}),He>0&&He<=ge.restock_threshold&&s.jsx("span",{className:"text-[10px] font-bold text-orange-400",children:"NIEDRIG"})]}),s.jsx("div",{className:"h-1 w-16 rounded-full bg-muted overflow-hidden mt-1",children:s.jsx("div",{className:`h-full rounded-full ${wt>=90?"bg-destructive":wt>=70?"bg-orange-500":"bg-primary"}`,style:{width:`${wt}%`}})})]}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx("button",{onClick:()=>L({eventName:M.title,mode:"edit",id:ge.id,data:{category:ge.category,description:ge.description,price_cents:ge.price_cents,net_price_cents:ge.net_price_cents||ge.price_cents,vat_rate:ge.vat_rate,fee_cents:ge.fee_cents,total_stock:ge.total_stock,restock_threshold:ge.restock_threshold,is_group:ge.is_group,group_size:ge.group_size,sale_from:ge.sale_from,sale_until:ge.sale_until}}),className:"p-1.5 rounded-lg border border-border text-muted-foreground hover:text-primary hover:border-primary/40 transition-all",children:s.jsx(ss,{size:12})}),s.jsx("button",{onClick:()=>N({label:`${ge.category} (${M.title})`,onConfirm:async()=>{const{error:Dn}=await re.from("ticket_categories").delete().eq("id",ge.id);Dn?B(Dn.message,"err"):(B("Kategorie gelöscht"),H()),N(null)}}),className:"p-1.5 rounded-lg border border-border text-muted-foreground hover:text-destructive hover:border-destructive/40 transition-all",children:s.jsx(Vt,{size:12})})]})]},ge.id)})]})]})]},M.id)})})}),e==="buyers"&&s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center gap-3 mb-5",children:s.jsxs("div",{className:"relative flex-1 max-w-sm",children:[s.jsx(Ur,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx("input",{type:"search",placeholder:"Event, Käufer, Ticket-Nr. â¦",value:C,onChange:M=>j(M.target.value),className:"w-full pl-9 pr-4 py-2 text-sm rounded-xl border border-border bg-card focus:outline-none focus:ring-1 focus:ring-primary/50"})]})}),f?s.jsxs("div",{className:"flex items-center justify-center py-20 text-muted-foreground gap-2",children:[s.jsx(Be,{size:16,className:"animate-spin"})," Lade Datenâ¦"]}):P.length===0?s.jsxs("div",{className:"flex flex-col items-center py-20 text-muted-foreground gap-2",children:[s.jsx(Wl,{size:32,className:"opacity-30"}),s.jsx("p",{children:C?"Keine Treffer gefunden.":"Noch keine Ticketkäufe vorhanden."})]}):s.jsx("div",{className:"space-y-4",children:P.map(M=>{const Y=M.invoices.reduce((J,oe)=>J+oe.gross_amount_cents,0),ee=M.invoices.filter(J=>d.has(J.ticket_number)).length,te=S===M.title;return s.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between px-5 py-4 cursor-pointer hover:bg-muted/30 transition-colors",onClick:()=>_(te?null:M.title),children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(Wl,{size:16,className:"text-primary"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-bold text-foreground",children:M.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:M.date})]}),s.jsxs("div",{className:"hidden sm:flex items-center gap-4 ml-4 text-xs text-muted-foreground",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Pt,{size:11,className:"text-primary"})," ",M.invoices.length]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Je,{size:11,className:"text-primary"})," ",ee," Check-ins"]}),s.jsxs("span",{className:"flex items-center gap-1 font-bold text-foreground",children:[s.jsx(ji,{size:11,className:"text-primary"})," ",(Y/100).toFixed(2)]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("button",{onClick:J=>{J.stopPropagation(),ne(M.title,M.invoices)},className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border text-xs text-muted-foreground hover:text-primary hover:border-primary/40 transition-all",children:[s.jsx(ey,{size:13})," CSV"]}),te?s.jsx(na,{size:16,className:"text-muted-foreground"}):s.jsx(mr,{size:16,className:"text-muted-foreground"})]})]}),te&&s.jsxs("div",{className:"border-t border-border",children:[s.jsxs("div",{className:"hidden md:grid grid-cols-[2fr_2fr_1fr_1fr_1fr_1fr] gap-2 px-5 py-2 bg-muted/30 text-[10px] font-bold uppercase tracking-widest text-muted-foreground",children:[s.jsx("span",{children:"Käufer"}),s.jsx("span",{children:"E-Mail"}),s.jsx("span",{children:"Ticket-Nr."}),s.jsx("span",{children:"Typ"}),s.jsx("span",{children:"Preis"}),s.jsx("span",{children:"Check-in"})]}),s.jsx("div",{className:"divide-y divide-border",children:M.invoices.map(J=>s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[2fr_2fr_1fr_1fr_1fr_1fr] gap-2 px-5 py-3 text-sm items-center",children:[s.jsx("span",{className:"font-semibold text-foreground",children:J.holder_name}),s.jsx("span",{className:"text-muted-foreground truncate",children:J.holder_email}),s.jsx("span",{className:"font-mono text-xs text-primary",children:J.ticket_number}),s.jsx("span",{className:"text-muted-foreground",children:J.ticket_type}),s.jsxs("span",{className:"font-bold text-foreground",children:["⬠",(J.gross_amount_cents/100).toFixed(2)]}),s.jsx("span",{children:d.has(J.ticket_number)?s.jsx("span",{className:"text-xs font-bold px-2 py-0.5 rounded-full bg-green-500/15 text-green-400",children:"â Ja"}):s.jsx("span",{className:"text-xs font-bold px-2 py-0.5 rounded-full bg-muted text-muted-foreground",children:"â Nein"})})]},J.id))})]})]},M.title)})})]})]})]})]})}const l1=A.forwardRef(({className:e,type:t,...r},n)=>s.jsx("input",{type:t,className:Wr("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));l1.displayName="Input";const Nx="META_PIXEL_ID",ev="META_CAPI_ACCESS_TOKEN";function c9e(){const[e,t]=A.useState(""),[r,n]=A.useState(""),[i,a]=A.useState(!1),[o,l]=A.useState(!0),[c,u]=A.useState(!1),[d,x]=A.useState(!1),[f,h]=A.useState(!1),m=A.useCallback(async()=>
987{l(!0);const{data:g}=await re.from("admin_secrets").select("name, value_enc").in("name",[Nx,ev]);if(g)for(const w of g){const E=w.value_enc?p(w.value_enc):"";w.name===Nx&&(t(E),x(!0)),w.name===ev&&(n(E),h(!0))}l(!1)},[]);A.useEffect(()=>{m()},[m]);function p(g){try{const w=g.split(",").map(Number);return new TextDecoder().decode(new Uint8Array(w))}catch{return g}}function v(g){return new TextEncoder().encode(g).toString()}async function y(g,w,E){const{data:{user:C}}=await re.auth.getUser();if(!C)throw new Error("Nicht authentifiziert");if(E){const{error:j}=await re.from("admin_secrets").update({value_enc:v(w),updated_at:new Date().toISOString()}).eq("name",g);if(j)throw j}else{const{error:j}=await re.from("admin_secrets").insert({name:g,description:g===Nx?"Meta Pixel ID":"Meta Conversions API Access Token",value_enc:v(w),created_by:C.id});if(j)throw j}}async function b(){if(!e.trim()){Gm.error("Bitte Pixel ID eingeben.");return}u(!0);try{await y(Nx,e.trim(),d),r.trim()&&await y(ev,r.trim(),f),Gm.success("Tracking-Konfiguration gespeichert!"),x(!0),r.trim()&&h(!0)}catch(g){Gm.error("Fehler: "+g.message)}u(!1)}return s.jsxs(s.Fragment,{children:[s.jsx(Hr,{}),s.jsxs("main",{className:"min-h-screen bg-background pt-14",children:[s.jsx("section",{className:"relative py-10 px-4 border-b border-border bg-gradient-to-br from-card via-background to-card",children:s.jsxs("div",{className:"max-w-3xl mx-auto",children:[s.jsxs(we,{to:"/dashboard",className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-primary mb-4 transition-colors",children:[s.jsx(Sn,{size:14})," Zurück zum Dashboard"]}),s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx(y4,{size:24,className:"text-primary"}),s.jsx("h1",{className:"text-2xl font-display font-bold tracking-tight text-foreground",children:"Tracking & Pixel"})]}),s.jsx("p",{className:"text-muted-foreground text-sm max-w-xl",children:"Verwalte dein Meta Pixel und die Conversions API für Facebook & Instagram Ads."})]})}),s.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-8 space-y-8",children:[s.jsx(Ce,{children:s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[s.jsxs("div",{className:`rounded-xl border p-4 flex items-start gap-3 ${d?"border-primary/30 bg-primary/5":"border-border bg-card"}`,children:[s.jsx(ut,{size:18,className:d?"text-primary mt-0.5":"text-muted-foreground mt-0.5"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Meta Pixel"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:d?"Konfiguriert â":"Noch nicht eingerichtet"})]})]}),s.jsxs("div",{className:`rounded-xl border p-4 flex items-start gap-3 ${f?"border-primary/30 bg-primary/5":"border-border bg-card"}`,children:[s.jsx(ut,{size:18,className:f?"text-primary mt-0.5":"text-muted-foreground mt-0.5"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Conversions API"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:f?"Konfiguriert â":"Noch nicht eingerichtet"})]})]})]})}),s.jsx(Ce,{children:s.jsx("div",{className:"rounded-xl border border-border bg-card p-5",children:s.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[s.jsx(C4,{size:16,className:"text-primary mt-0.5 shrink-0"}),s.jsxs("div",{className:"text-xs text-muted-foreground space-y-1",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Meta Pixel"})," trackt PageView, ViewContent, InitiateCheckout und Purchase Events clientseitig."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Conversions API (CAPI)"})," sendet Events serverseitig für bessere Zuordnung und Datenschutz-Compliance."]}),s.jsx("p",{className:"text-muted-foreground/70",children:"Pixel ID findest du im Meta Events Manager â Datenquellen â Pixel ID."}),s.jsx("p",{className:"text-muted-foreground/70",children:"CAPI Token findest du unter Events Manager â Einstellungen â Conversions API â Access Token generieren."})]})]})})}),s.jsx(Ce,{children:s.jsxs("div",{className:"rounded-xl border border-border bg-card p-6 space-y-5",children:[s.jsx("h2",{className:"text-lg font-bold text-foreground",children:"Konfiguration"}),o?s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-sm py-8 justify-center",children:[s.jsx(Be,{size:14,className:"animate-spin"})," Lade Konfigurationâ¦"]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-sm font-medium text-foreground",children:"Meta Pixel ID *"}
987),s.jsx(l1,{value:e,onChange:g=>t(g.target.value),placeholder:"z.B. 1234567890123456",className:"font-mono text-sm"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-sm font-medium text-foreground",children:"Conversions API Access Token"}),s.jsxs("div",{className:"relative",children:[s.jsx(l1,{type:i?"text":"password",value:r,onChange:g=>n(g.target.value),placeholder:"EAAxxxxxxxâ¦",className:"font-mono text-sm pr-10"}),s.jsx("button",{type:"button",onClick:()=>a(g=>!g),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:i?s.jsx(uo,{size:16}):s.jsx(ki,{size:16})})]}),s.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Optional â wird für serverseitiges Event-Tracking benötigt."})]}),s.jsxs("div",{className:"flex items-center gap-3 pt-2",children:[s.jsxs(Ge,{onClick:b,disabled:c,className:"gap-2",children:[s.jsx(p0,{size:14}),c?"Speichernâ¦":"Speichern"]}),s.jsxs(Ge,{variant:"outline",onClick:m,disabled:o,className:"gap-2",children:[s.jsx(Be,{size:14})," Neu laden"]})]})]})]})}),s.jsx(Ce,{children:s.jsxs("div",{className:"rounded-xl border border-border bg-card p-6",children:[s.jsx("h2",{className:"text-lg font-bold text-foreground mb-4",children:"Getrackte Events"}),s.jsx("div",{className:"space-y-3",children:[{event:"PageView",desc:"Jeder Seitenaufruf",auto:!0},{event:"ViewContent",desc:"Ticket-/Eventseite angesehen",auto:!0},{event:"InitiateCheckout",desc:"Ticket-Kauf gestartet",auto:!0},{event:"Purchase",desc:"Ticket-Kauf abgeschlossen",auto:!0}].map(({event:g,desc:w,auto:E})=>s.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[s.jsx("span",{className:"w-2 h-2 rounded-full bg-primary shrink-0"}),s.jsx("span",{className:"font-mono text-xs font-semibold text-foreground min-w-[140px]",children:g}),s.jsx("span",{className:"text-muted-foreground text-xs",children:w}),E&&s.jsx("span",{className:"ml-auto text-[10px] text-primary bg-primary/10 px-2 py-0.5 rounded-full font-medium",children:"Auto"})]},g))})]})})]})]})]})}function u9e(){const[e,t]=A.useState(""),[r,n]=A.useState(""),[i,a]=A.useState(""),[o,l]=A.useState(!1),[c,u]=A.useState(null),[d,x]=A.useState(!1),[f,h]=A.useState(!1);async function m(v){if(v.preventDefault(),u(null),i.length<6){u("Passwort muss mindestens 6 Zeichen lang sein.");return}x(!0);const{error:y}=await re.auth.signUp({email:r,password:i,options:{data:{full_name:e},emailRedirectTo:window.location.origin}});if(x(!1),y){u(y.message);return}h(!0)}async function p(){u(null);const v=await LE.auth.signInWithOAuth("google",{redirect_uri:window.location.origin});v!=null&&v.error&&u("Google-Registrierung fehlgeschlagen.")}return f?s.jsx("main",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:s.jsx("div",{className:"w-full max-w-sm text-center",children:s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-8 shadow-2xl shadow-black/40",children:[s.jsx(up,{size:48,className:"text-primary mx-auto mb-4"}),s.jsx("h1",{className:"font-display text-3xl mb-2",children:"FAST GESCHAFFT!"}),s.jsxs("p",{className:"text-sm text-muted-foreground mb-4",children:["Wir haben dir eine Bestätigungs-E-Mail an ",s.jsx("strong",{className:"text-foreground",children:r})," gesendet. Bitte klicke auf den Link in der E-Mail, um dein Konto zu aktivieren."]}),s.jsx(we,{to:"/admin/login",className:"text-primary text-sm hover:underline",children:"Zum Login â"})]})})}):s.jsx("main",{className:"min-h-screen flex items-center justify-center bg-background px-4","aria-label":"Registrierung",children:s.jsxs("div",{className:"w-full max-w-sm",children:[s.jsx("div",{className:"flex flex-col items-center gap-3 mb-8",children:s.jsx("img",{src:Gl,alt:"Spirit Festival Logo",className:"h-14 w-auto"})}),s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-8 shadow-2xl shadow-black/40",children:[s.jsx("h1",{className:"font-display text-3xl mb-1 text-center",children:"REGISTRIEREN"}),s.jsx("p",{className:"text-xs text-muted-foreground text-center mb-6",children:"Erstelle deinen Spirit Festival Account"}),c&&s.jsx("div",{role:"alert",className:"mb-4 px-4 py-3 rounded-xl bg-destructive/10 border border-destructive/30 text-destructive text-sm",children:c}),s.jsxs("button",{type:"button",onClick:p,className:"flex items-center justify-center gap-2.5 w-full py-2.5 rounded-xl border border-border bg-muted hover:bg-muted/80 text-sm font-semibold transition-colors mb-5",children:[s.jsx(cp,{size:16,"aria-hidden":"true"}),"Mit Google registrieren"]}),s.jsxs("div",{className:"relative mb-5","aria-hidden":"true",children:[s.jsx("div",{className:"absolute inset-0 flex items-center",children:s.jsx("div",{className:"w-full border-t border-border"})}),s.jsx("div",{className:"relative flex justify-center",children:s.jsx("span",{className:"px-3 bg-card text-xs text-muted-foreground",children:"oder per E-Mail"})})]}),s.jsxs("form",{onSubmit:m,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{htmlFor:"name",className:"block text-xs text-muted-foreground mb-1.5",children:"Name"}),s.jsxs("div",{className:"relative",children:[s.jsx(id,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}
987),s.jsx("input",{id:"name",type:"text",required:!0,value:e,onChange:v=>t(v.target.value),className:"w-full bg-background border border-border rounded-xl pl-9 pr-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50",placeholder:"Max Mustermann"})]})]}),s.jsxs("div",{children:[s.jsx("label",{htmlFor:"reg-email",className:"block text-xs text-muted-foreground mb-1.5",children:"E-Mail"}),s.jsxs("div",{className:"relative",children:[s.jsx($t,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{id:"reg-email",type:"email",required:!0,autoComplete:"email",value:r,onChange:v=>n(v.target.value),className:"w-full bg-background border border-border rounded-xl pl-9 pr-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50",placeholder:"[email protected]"})]})]}),s.jsxs("div",{children:[s.jsx("label",{htmlFor:"reg-password",className:"block text-xs text-muted-foreground mb-1.5",children:"Passwort"}),s.jsxs("div",{className:"relative",children:[s.jsx(dp,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{id:"reg-password",type:o?"text":"password",required:!0,autoComplete:"new-password",value:i,onChange:v=>a(v.target.value),className:"w-full bg-background border border-border rounded-xl pl-9 pr-10 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50",placeholder:"Min. 6 Zeichen"}),s.jsx("button",{type:"button",onClick:()=>l(v=>!v),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors","aria-label":o?"Passwort verbergen":"Passwort anzeigen",children:o?s.jsx(uo,{size:15}):s.jsx(ki,{size:15})})]})]}),s.jsx("button",{type:"submit",disabled:d,className:"w-full py-2.5 rounded-xl bg-primary text-primary-foreground font-bold text-sm hover:opacity-90 transition-opacity glow-primary disabled:opacity-50",children:d?"Wird erstellt â¦":"Account erstellen"})]})]}),s.jsxs("p",{className:"text-center text-xs text-muted-foreground mt-6",children:["Bereits registriert?"," ",s.jsx(we,{to:"/admin/login",className:"text-primary hover:underline",children:"Anmelden"})]})]})})}const d9e=()=>{const e=ms(),[t]=EL(),[r,n]=A.useState(""),[i,a]=A.useState(""),[o,l]=A.useState(!1),[c,u]=A.useState(""),[d,x]=A.useState(!1),[f,h]=A.useState(!1),[m,p]=A.useState(!1),[v,y]=A.useState(!0);A.useEffect(()=>{(async()=>{const w=t.get("token_hash"),E=t.get("type");if(w&&E==="invite"){const{error:S}=await re.auth.verifyOtp({token_hash:w,type:"invite"});if(S){console.error("Token verification error:",S),u("Der Einladungslink ist ungültig oder abgelaufen. Bitte fordere eine neue Einladung an."),y(!1);return}h(!0),y(!1);return}const{data:{subscription:C}}=re.auth.onAuthStateChange(S=>{(S==="SIGNED_IN"||S==="TOKEN_REFRESHED")&&(h(!0),y(!1))}),{data:{session:j}}=await re.auth.getSession();return j?(h(!0),y(!1)):setTimeout(()=>{f||(y(!1),u("Kein gültiger Einladungslink gefunden."))},3e3),()=>C.unsubscribe()})()},[t]);const b=async g=>{if(g.preventDefault(),u(""),r.length<6){u("Passwort muss mindestens 6 Zeichen lang sein.");return}if(r!==i){u("Passwörter stimmen nicht überein.");return}x(!0);const{error:w}=await re.auth.updateUser({password:r});if(x(!1),w)u(w.message);else{p(!0);const{data:{user:E}}=await re.auth.getUser();E!=null&&E.email&&await re.from("user_invitations").update({status:"accepted",accepted_at:new Date().toISOString()}).eq("email",E.email).eq("status","pending");let C="/";if(E){const{data:j}=await re.rpc("has_role",{_user_id:E.id,_role:"admin"}),{data:S}=await re.rpc("has_role",{_user_id:E.id,_role:"moderator"});(j||S)&&(C="/dashboard")}setTimeout(()=>e(C),2e3)}};return m?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:s.jsxs("div",{className:"w-full max-w-md text-center space-y-6",children:[s.jsx("img",{src:Gl,alt:"Spirit Festival",className:"h-12 mx-auto"}),s.jsxs("div",{className:"bg-card border border-border rounded-2xl p-8 space-y-4",children:[s.jsx("div",{className:"text-4xl",children:"â
"}),s.jsx("h1",{className:"text-xl font-bold text-foreground",children:"Konto aktiviert!"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Dein Passwort wurde gesetzt. Du wirst zum Dashboard weitergeleitetâ¦"})]})]})}):s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:s.jsxs("div",{className:"w-full max-w-md
987space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("img",{src:Gl,alt:"Spirit Festival",className:"h-12 mx-auto mb-4"}),s.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Konto aktivieren"}),s.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"Wähle ein Passwort für dein Spirit Festival Konto."})]}),s.jsxs("form",{onSubmit:b,className:"bg-card border border-border rounded-2xl p-8 space-y-5",children:[v&&s.jsx("p",{className:"text-center text-muted-foreground text-sm animate-pulse",children:"Einladung wird überprüftâ¦"}),!v&&!f&&c&&s.jsx("p",{className:"text-destructive text-sm text-center",children:c}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-sm font-medium text-foreground",children:"Neues Passwort"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:o?"text":"password",value:r,onChange:g=>n(g.target.value),className:"w-full px-4 py-3 rounded-lg bg-muted border border-border text-foreground focus:ring-2 focus:ring-primary outline-none",placeholder:"Mindestens 6 Zeichen",disabled:!f,required:!0}),s.jsx("button",{type:"button",onClick:()=>l(!o),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:o?s.jsx(uo,{size:18}):s.jsx(ki,{size:18})})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-sm font-medium text-foreground",children:"Passwort bestätigen"}),s.jsx("input",{type:o?"text":"password",value:i,onChange:g=>a(g.target.value),className:"w-full px-4 py-3 rounded-lg bg-muted border border-border text-foreground focus:ring-2 focus:ring-primary outline-none",placeholder:"Passwort wiederholen",disabled:!f,required:!0})]}),c&&f&&s.jsx("p",{className:"text-destructive text-sm text-center",children:c}),s.jsx("button",{type:"submit",disabled:d||!f,className:"w-full py-3 rounded-lg bg-primary text-primary-foreground font-bold hover:opacity-90 transition disabled:opacity-50",children:d?"Wird gespeichertâ¦":"Passwort setzen & loslegen"})]})]})})},bj={title:"",description:"",date_start:"",date_end:"",time_start:"",time_end:"",location:"",address:"",organizer_name:"",organizer_email:"",genre:"",expected_attendance:""},x9e=["Rock","Metal","Indie","Electronic","Folk","Jazz","Acoustic","Funk","Pop","Hip-Hop","Klassik","Sonstiges"];function xn({label:e,required:t,error:r,children:n}){return s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("label",{className:"block text-xs font-semibold text-foreground",children:[e,t&&s.jsx("span",{className:"text-destructive ml-0.5",children:"*"})]}),n,r&&s.jsxs("p",{className:"text-[10px] text-destructive flex items-center gap-1",children:[s.jsx(Ul,{size:9,"aria-hidden":"true"}),r]})]})}const fn=e=>`w-full rounded-xl border bg-background px-3 py-2.5 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50 transition-all ${e?"border-destructive":"border-border"}`;function f9e(){ms();const[e,t]=A.useState(null),[r,n]=A.useState(bj),[i,a]=A.useState({}),[o,l]=A.useState(!1),[c,u]=A.useState(!1),[d,x]=A.useState(null);A.useEffect(()=>{re.auth.getUser().then(({data:p})=>{t(p.user?{id:p.user.id,email:p.user.email}:null),p.user})},[]);function f(p,v){n(y=>({...y,[p]:v})),a(y=>({...y,[p]:void 0}))}function h(){const p={};return r.title.trim()||(p.title="Titel erforderlich"),r.date_start||(p.date_start="Startdatum erforderlich"),r.location.trim()||(p.location="Ort erforderlich"),r.organizer_name.trim()||(p.organizer_name="Veranstalter erforderlich"),r.organizer_email.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r.organizer_email)||(p.organizer_email="Ungültige E-Mail-Adresse"):p.organizer_email="E-Mail erforderlich",r.date_end&&r.date_start&&r.date_end<r.date_start&&(p.date_end="Enddatum vor Startdatum"),a(p),Object.keys(p).length===0}async function m(p){if(p.preventDefault(),!!h()){if(!e){x("Bitte zuerst einloggen.");return}l(!0),x(null);try{const{data:v,error:y}=await re.from("events").insert([{title:r.title.trim(),description:r.description.trim()||null,date_start:r.date_start,date_end:r.date_end||null,time_start:r.time_start||null,time_end:r.time_end||null,location:r.location.trim(),address:r.address.trim()||null,organizer_name:r.organizer_name.trim(),organizer_email:r.organizer_email.trim(),genre:r.genre||null,expected_attendance:r.expected_attendance?parseInt(r.expected_attendance):null,status:"pending",created_by:e.id}]).select("id").single();if(y)throw y;await re.from("event_audit_trail").insert([{event_id:v.id,action:"submitted",previous_status:null,new_status:"pending",changed_by:e.id,notes:"Event eingereicht â wartet auf Genehmigung"}]),u(!0)}
987catch(v){x(v.message??"Unbekannter Fehler")}l(!1)}}return c?s.jsxs(s.Fragment,{children:[s.jsx(Sr,{}),s.jsx("main",{id:"main-content",className:"pt-20 min-h-screen flex items-center justify-center",children:s.jsxs("div",{className:"max-w-md mx-auto text-center px-4 py-16",children:[s.jsx("div",{className:"w-20 h-20 rounded-full bg-primary/15 flex items-center justify-center mx-auto mb-6",children:s.jsx(ut,{size:36,className:"text-primary","aria-hidden":"true"})}),s.jsx("h1",{className:"font-grunge text-4xl mb-3",children:"EINGEREICHT!"}),s.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed mb-6",children:"Dein Event wurde erfolgreich eingereicht und wird von unserem Team geprüft. Du erhältst eine Rückmeldung per E-Mail."}),s.jsxs("div",{className:"flex gap-3 justify-center",children:[s.jsx(we,{to:"/",className:"px-5 py-2.5 rounded-xl border border-border text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Zur Startseite"}),s.jsx("button",{onClick:()=>{u(!1),n(bj)},className:"px-5 py-2.5 rounded-xl bg-primary text-primary-foreground text-sm font-bold hover:opacity-90 transition-opacity",children:"Weiteres Event einreichen"})]})]})}),s.jsx(Br,{})]}):s.jsxs(s.Fragment,{children:[s.jsx(Sr,{}),s.jsxs("main",{id:"main-content",className:"pt-20 min-h-screen",children:[s.jsx("section",{className:"py-12 bg-card/50 border-b border-border","aria-label":"Event einreichen",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-3xl",children:[s.jsxs(we,{to:"/",className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-primary transition-colors mb-4",children:[s.jsx(Sn,{size:12,"aria-hidden":"true"})," Zurück"]}),s.jsx("span",{className:"text-xs text-primary tracking-widest uppercase block mb-1",children:"Spirit Festival 2025"}),s.jsxs("h1",{className:"font-grunge text-5xl md:text-7xl leading-none",children:["EVENT",s.jsx("br",{}),"EINREICHEN"]}),s.jsx("p",{className:"text-muted-foreground mt-4 max-w-lg text-sm leading-relaxed",children:"Fülle das Formular aus, um dein Event zur Prüfung einzureichen. Nach der Genehmigung durch unser Team wird es im Programm veröffentlicht."}),!e&&s.jsxs("div",{role:"alert",className:"mt-5 flex items-start gap-3 p-4 rounded-xl border border-orange-500/30 bg-
987orange-500/8 text-orange-400 text-sm",children:[s.jsx(Ul,{size:16,className:"shrink-0 mt-0.5","aria-hidden":"true"}),s.jsxs("span",{children:["Du musst eingeloggt sein, um ein Event einzureichen. ",s.jsx(we,{to:"/admin/login",className:"underline font-semibold",children:"Jetzt anmelden"})]})]})]})}),s.jsx("div",{className:"container mx-auto px-4 max-w-3xl py-10",children:s.jsxs("form",{onSubmit:m,noValidate:!0,"aria-label":"Event-Einreichungsformular",children:[s.jsx(Ce,{children:s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6 mb-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[s.jsx(h0,{size:16,className:"text-primary","aria-hidden":"true"}),s.jsx("h2",{className:"font-bold text-sm text-foreground",children:"Event-Details"})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx(xn,{label:"Titel",required:!0,error:i.title,children:s.jsx("input",{value:r.title,onChange:p=>f("title",p.target.value),placeholder:"Name deines Events",className:fn(i.title),maxLength:120})}),s.jsx(xn,{label:"Beschreibung",error:i.description,children:s.jsx("textarea",{value:r.description,onChange:p=>f("description",p.target.value),placeholder:"Kurze Beschreibung des Events â¦",rows:3,className:`${fn()} resize-none`})}),s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsx(xn,{label:"Genre",error:i.genre,children:s.jsxs("div",{className:"relative",children:[s.jsx(ia,{size:13,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsxs("select",{value:r.genre,onChange:p=>f("genre",p.target.value),className:`${fn()} pl-8`,children:[s.jsx("option",{value:"",children:"Genre wählen â¦"}),x9e.map(p=>s.jsx("option",{value:p,children:p},p))]})]})}),s.jsx(xn,{label:"Erwartete Besucher",error:i.expected_attendance,children:s.jsxs("div",{className:"relative",children:[s.jsx(Je,{size:13,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{type:"number",min:"1",inputMode:"numeric",value:r.expected_attendance,onChange:p=>f("expected_attendance",p.target.value),placeholder:"z.B. 500",className:`${fn(i.expected_attendance)} pl-8`})]})})]})]})]})}),s.jsx(Ce,{children:s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6 mb-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[s.jsx(Lr,{size:16,className:"text-primary","aria-hidden":"true"}),s.jsx("h2",{className:"font-bold text-sm text-foreground",children:"Datum & Uhrzeit"})]}),s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsx(xn,{label:"Startdatum",required:!0,error:i.date_start,children:s.jsx("input",{type:"date",value:r.date_start,onChange:p=>f("date_start",p.target.value),className:fn(i.date_start)})}),s.jsx(xn,{label:"Enddatum",error:i.date_end,children:s.jsx("input",{type:"date",value:r.date_end,onChange:p=>f("date_end",p.target.value),className:fn(i.date_end),min:r.date_start})}),s.jsx(xn,{label:"Beginn",error:i.time_start,children:s.jsxs("div",{className:"relative",children:[s.jsx(gr,{size:13,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{type:"time",value:r.time_start,onChange:p=>f("time_start",p.target.value),className:`${fn(i.time_start)} pl-8`})]})}),s.jsx(xn,{label:"Ende",error:i.time_end,children:s.jsxs("div",{className:"relative",children:[s.jsx(gr,{size:13,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{type:"time",value:r.time_end,onChange:p=>f("time_end",p.target.value),className:`${fn(i.time_end)} pl-8`})]})})]})]})}),s.jsx(Ce,{children:s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6 mb-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[s.jsx(_r,{size:16,className:"text-primary","aria-hidden":"true"}),s.jsx("h2",{className:"font-bold text-sm text-foreground",children:"Veranstaltungsort"})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx(xn,{label:"Ortsname",required:!0,error:i.location,children:s.jsx("input",{value:r.location,onChange:p=>f("location",p.target.value),placeholder:"z.B. Festwiesen Loburg",className:fn(i.location)})}),s.jsx(xn,{label:"Adresse",error:i.address,children:s.jsx("input",{value:r.address,onChange:p=>f("address",p.target.value),placeholder:"StraÃe, PLZ, Ort",className:fn(i.address)})})]})]})}),s.jsx(Ce,{children:s.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6 mb-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[s.jsx(id,{size:16,className:"text-primary","aria-hidden":"true"}),s.jsx("h2",{className:"font-bold text-sm text-foreground",children:"Veranstalter"})]}),s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsx(xn,{label:"Name / Organisation",required:!0,error:i.organizer_name,children:s.jsxs("div",{className:"relative",children:[s.jsx(id,{size:13,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{value:r.organizer_name,onChange:p=>f("organizer_name",p.target.value),placeholder:"Vollständiger Name",className:`${fn(i.organizer_name)} pl-8`})]})}),s.jsx(xn,{label:"E-Mail-Adresse",required:!0,error:i.organizer_email,children:s.jsxs("div",{className:"relative",children:[s.jsx($t,{size:13,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),s.jsx("input",{type:"email",value:r.organizer_email,onChange:p=>f("organizer_email",p.target.value),placeholder:"[email protected]",className:`${fn(i.organizer_email)} pl-8`})]})})]})]})}),d&&s.jsxs("div",{role:"alert",className:"mb-4 flex items-center gap-2 p-4 rounded-xl border border-destructive/30 bg-destructive/8 text-destructive text-sm",children:[s.jsx(Ul,{size:15,"aria-hidden":"true"}),d]}),s.jsx(Ce,{children:s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(we,{to:"/",className:"px-5 py-2.5 rounded-xl border border-border text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Abbrechen"}),s.jsxs("button",{type:"submit",disabled:o||!e,className:"flex items-center gap-2 px-6 py-2.5 rounded-xl bg-primary text-primary-foreground text-sm font-bold hover:opacity-90 transition-opacity disabled:opacity-50",children:[o?s.jsx("span",{className:"animate-spin inline-block w-4 h-4 border-2 border-primary-foreground
987/30 border-t-primary-foreground rounded-full","aria-hidden":"true"}):s.jsx(os,{size:14,"aria-hidden":"true"}),"Event einreichen"]})]})})]})})]}),s.jsx(Br,{})]})}const h9e=e=>`${(e/100).toFixed(2).replace(".",",")} â¬`;function p9e(){const{orderId:e}=qR(),[t,r]=A.useState(null),[n,i]=A.useState([]),[a,o]=A.useState(null),[l,c]=A.useState(!0),[u,d]=A.useState(0);A.useEffect(()=>{let f=!0,h;async function m(){var y;const{data:p,error:v}=await re.functions.invoke("order-status",{body:{orderId:e}});f&&(v||p!=null&&p.error?o((p==null?void 0:p.error)??(v==null?void 0:v.message)??"Bestellung konnte nicht geladen werden."):(r(p.order),i(p.tickets??[]),o(null),((y=p.order)==null?void 0:y.status)==="open"&&u<12&&(h=window.setTimeout(()=>d(b=>b+1),3e3))),c(!1))}return m(),()=>{f=!1,h&&window.clearTimeout(h)}},[e,u]);const x=t==null?void 0:t.status;return s.jsx("main",{className:"min-h-screen pt-28 pb-20 px-4",children:s.jsxs("div",{className:"max-w-lg mx-auto",children:[s.jsxs(we,{to:"/events",className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-primary transition-colors mb-6",children:[s.jsx(Sn,{size:13})," Zurück zu den Events"]}),l?s.jsxs("div",{className:"flex items-center justify-center gap-2 py-20 text-muted-foreground",children:[s.jsx(ar,{size:18,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Bestellung wird geladenâ¦"})]}):a?s.jsxs("div",{className:"p-5 rounded-2xl border border-destructive/30 bg-destructive/10",children:[s.jsx("h1",{className:"font-display text-xl mb-1",children:"BESTELLUNG NICHT GEFUNDEN"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:a})]}):t?s.jsxs("div",{className:"space-y-5",children:[x==="paid"?s.jsxs("div",{className:"flex items-start gap-3 p-5 rounded-2xl border border-accent/30 bg-accent/10",children:[s.jsx(ut,{className:"text-primary shrink-0 mt-0.5",size:22}),s.jsxs("div",{children:[s.jsx("h1",{className:"font-display text-xl leading-none",children:"ZAHLUNG ERFOLGREICH"}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-1.5",children:["Deine Tickets wurden erstellt und per E-Mail an ",t.buyer_email," gesendet."]})]})]}):x==="open"?s.jsxs("div",{className:"flex items-start gap-3 p-5 rounded-2xl border border-border bg-muted/30",children:[s.jsx(gr,{className:"text-muted-foreground shrink-0 mt-0.5",size:22}),s.jsxs("div",{children:[s.jsx("h1",{className:"font-display text-xl leading-none",children:"ZAHLUNG IN BEARBEITUNG"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1.5",children:"Wir warten auf die Bestätigung deiner Zahlung. Diese Seite aktualisiert sich automatisch. Bei SEPA oder Klarna kann das etwas dauern â du erhältst die Tickets in jedem Fall per E-Mail."})]})]}):s.jsxs("div",{className:"flex items-start gap-3 p-5 rounded-2xl border border-destructive/30 bg-destructive/10",children:[s.jsx(Kt,{className:"text-destructive shrink-0 mt-0.5",size:22}),s.jsxs("div",{children:[s.jsx("h1",{className:"font-display text-xl leading-none",children:"ZAHLUNG NICHT ABGESCHLOSSEN"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1.5",children:"Die Zahlung wurde abgebrochen, abgelehnt oder ist abgelaufen. Es wurde kein Geld abgebucht â du kannst den Kauf jederzeit erneut starten."})]})]}),s.jsxs("div",{className:"p-5 rounded-2xl gradient-card border border-border space-y-2.5",children:[s.jsx("h2",{className:"font-display text-lg mb-1",children:"BESTELLDETAILS"}),[["Bestellnummer",t.order_number],["Event",t.event_title],["Datum",t.event_date??"â"],["Location",t.event_location??"â"],["Ticket-Typ",t.ticket_type],["Menge",String(t.quantity)],["Inhaber",t.buyer_name],["Zahlungsart",t.payment_method??"â"]].map(([f,h])=>s.jsxs("div",{className:"flex justify-between text-sm gap-4",children:[s.jsx("span",{className:"text-muted-foreground",children:f}),s.jsx("span",{className:"font-medium text-right truncate",children:h})]},f)),s.jsxs("div",{className:"flex justify-between text-sm pt-2.5 border-t border-border",children:[s.jsx("span",{className:"font-medium",children:"Gesamt"}),s.jsx("span",{className:"font-bold text-primary font-tech",children:h9e(t.total_amount_cents)})]})]}),n.length>0&&s.jsxs("div",{className:"p-5 rounded-2xl border border-border space-y-2.5",children:[s.jsxs("h2",{className:"font-display text-lg mb-1 flex items-center gap-2",children:[s.jsx(Pt,{size:16,className:"text-primary"})," DEINE TICKETS"]}),n.map(f=>s.jsxs("div",{className:"flex items-center justify-between text-sm gap-3 py-1.5 border-b border-border/50 last:border-0",children:[s.jsx("span",{className:"font-tech",children:f.ticket_number}),s.jsxs("span",{className:`text-xs flex items-center gap-1.5 ${f.delivery_status==="delivered"?"text-primary":"text-muted-foreground"}`,children:[s.jsx($t,{size:12}),f.delivery_status==="delivered"?"gesendet":f.delivery_status==="failed"?"Versand fehlgeschlagen":"wird gesendetâ¦"]})]},f.ticket_number)),s.jsx("p",{className:"text-xs text-muted-foreground pt-2",children:"Ticket-PDF und Rechnung findest du in der E-Mail. Bitte prüfe auch deinen Spam-Ordner."})]})]}):null]})})}const m9e=()=>{const e=ps();return A.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),s.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),s.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),s.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},g9e=[{key:"essential",label:"Notwendige Cookies",description:"Diese Cookies sind für den Betrieb der Website unbedingt erforderlich und können nicht deaktiviert werden. Sie werden ausschlieÃlich als Reaktion auf von Ihnen getätigte Aktionen gesetzt.",required:!0,cookies:[{name:"spirit-cookie-consent",provider:"Spirit Festival",purpose:"Speichert deine Cookie-Einstellungen",duration:"1 Jahr"},{name:"spirit-cookie-log",provider:"Spirit Festival",purpose:"Datenschutzkonforme Aufzeichnung des Einwilligungsverlaufs",duration:"1 Jahr"},{name:"session",provider:"Spirit Festival",purpose:"Session-Verwaltung",duration:"Sitzungsende"}]},{key:"functional",label:"Funktionale Cookies",description:"Diese Cookies ermöglichen verbesserte Funktionalität und Personalisierung, z. B. Spracheinstellungen oder Warenkorb. Bei Deaktivierung könnten manche Funktionen eingeschränkt sein.",required:!1,cookies:[{name:"lang",provider:"Spirit Festival",purpose:"Speichert deine Sprachpräferenz",duration:"1 Jahr"},{name:"cart_items",provider:"Spirit Festival",purpose:"Speichert Ticketauswahl im Warenkorb",duration:"7 Tage"}]},{key:"analytics",label:"Analyse-Cookies",description:"Diese Cookies helfen uns zu verstehe
987n, wie Besucher mit der Website interagieren. Alle Daten werden anonymisiert und dienen ausschlieÃlich der Verbesserung unseres Angebots.",required:!1,cookies:[{name:"_ga, _gid",provider:"Google Analytics 4",purpose:"Anonymisierte Nutzungsstatistiken",duration:"2 Jahre / 24 h"},{name:"_fbp",provider:"Meta Pixel (optional)",purpose:"Conversion-Tracking (erst nach Zustimmung aktiv)",duration:"3 Monate"}]},{key:"marketing",label:"Marketing-Cookies",description:"Diese Cookies werden verwendet, um Werbung relevanter für dich zu gestalten. Sie werden von Drittanbietern gesetzt und können Aktivitäten auf anderen Websites verfolgen.",required:!1,cookies:[{name:"ads/ga-audiences",provider:"Google Ads",purpose:"Remarketing & Zielgruppen",duration:"540 Tage"},{name:"fr",provider:"Meta / Facebook",purpose:"Personalisierte Werbung",duration:"3 Monate"},{name:"_ttp",provider:"TikTok",purpose:"Conversion-Tracking",duration:"13 Monate"}]}];function v9e({checked:e,onChange:t,disabled:r,ariaLabel:n}){return s.jsx("button",{role:"switch","aria-checked":e,"aria-label":n,disabled:r,onClick:()=>!r&&t(!e),className:`relative w-12 h-6 rounded-full transition-colors duration-300 shrink-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background ${e?"bg-primary":"bg-muted"} ${r?"opacity-50 cursor-not-allowed":"cursor-pointer hover:opacity-90"}`,children:s.jsx("span",{className:`absolute top-0.5 left-0.5 w-5 h-5 rounded-full bg-white shadow-md transition-transform duration-300 ${e?"translate-x-6":"translate-x-0"}`})})}function y9e({cat:e,checked:t,onChange:r}){const[n,i]=A.useState(!1);return s.jsxs("div",{className:"rounded-xl border border-border overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 gradient-card",children:[s.jsx(v9e,{checked:t,onChange:r,disabled:e.required,ariaLabel:`${e.label} ${e.required?"(immer aktiv)":t?"deaktivieren":"aktivieren"}`}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-semibold",children:e.label}),e.required&&s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-primary/15 text-primary font-medium",children:"Immer aktiv"}),!e.required&&s.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded font-medium ${t?"bg-primary/15 text-primary":"bg-muted text-muted-foreground"}`,children:t?"Aktiv":"Inaktiv"})]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 line-clamp-1",children:e.description})]}),s.jsx("button",{onClick:()=>i(!n),className:"p-1.5 rounded-md hover:bg-muted transition-colors shrink-0","aria-expanded":n,"aria-label":`Details für ${e.label} ${n?"ausblenden":"anzeigen"}`,children:n?s.jsx(na,{size:15}):s.jsx(mr,{size:15})})]}),n&&s.jsxs("div",{className:"border-t border-border px-4 py-3 bg-background/40 space-y-3",children:[s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:e.description}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-xs","aria-label":`Cookies in Kategorie ${e.label}`,children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-muted-foreground",children:[s.jsx("th",{className:"text-left font-medium pb-1.5 pr-4",children:"Name"}),s.jsx("th",{className:"text-left font-medium pb-1.5 pr-4",children:"Anbieter"}),s.jsx("th",{className:"text-left font-medium pb-1.5 pr-4",children:"Zweck"}),s.jsx("th",{className:"text-left font-medium pb-1.5",children:"Laufzeit"})]})}),s.jsx("tbody",{className:"divide-y divide-border",children:e.cookies.map(a=>s.jsxs("tr",{children:[s.jsx("td",{className:"py-1.5 pr-4 font-mono text-[10px] text-primary",children:a.name}),s.jsx("td",{className:"py-1.5 pr-4 text-foreground/80",children:a.provider}),s.jsx("td",{className:"py-1.5 pr-4 text-muted-foreground",children:a.purpose}),s.jsx("td",{className:"py-1.5 text-muted-foreground whitespace-nowrap",children:a.duration})]},a.name))})]})})]})]})}const b9e={accept_all:{label:"Alle akzeptiert",color:"text-primary bg-primary/10"},reject_all:{label:"Nur Notwendige",color:"text-muted-foreground bg-muted"},custom:{label:"Individuelle Auswahl",color:"text-gold bg-gold/10"},withdraw:{label:"Widerruf",color:"text-destructive bg-destructive/10"}};function E9e(){const{logEntries:e,withdrawConsent:t}=E0();if(e.length===0)return s.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[s.jsx(gr,{size:36,className:"mx-auto mb-3 opacity-40"}),s.jsx("p",{className:"text-sm",children:"Noch keine Einwilligungen gespeichert."})]});const r=[...e].reverse();return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start gap-2 p-3 rounded-lg bg-primary/5 border border-primary/20 text-xs text-muted-foreground",children:[s.jsx(C4,{size:14,className:"text-primary shrink-0 mt-0.5"}),s.jsx("span",{children:"Dieses Protokoll wird lokal in deinem Browser gespeichert und dient als Nachweis deiner Einwilligungen gemäà Art. 7 DSGVO."})]}),s.jsx("div",{className:"space-y-2.5 max-h-64 overflow-y-auto pr-1",children:r.map((n,i)=>{const a=b9e[n.method]??{label:n.method,color:"text-muted-foreground bg-muted"};return s.jsxs("article",{className:`rounded-xl border p-4 gradient-card ${i===0?"border-primary/30":"border-border"}`,children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[s.jsx("span",{className:`text-[10px] font-semibold px-2 py-0.5 rounded ${a.color}`,children:a.label}),i===0&&s.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded bg-primary/10 text-primary font-medium",children:"Aktuell gültig"}),s.jsx("time",{dateTime:n.timestamp,className:"text-[10px] text-muted-foreground ml-auto font-mono",children:new Date(n.timestamp).toLocaleStr
987ing("de-DE")})]}),s.jsx("div",{className:"flex flex-wrap gap-2 text-[10px]",children:Object.keys(n.choices).map(o=>s.jsxs("span",{className:`flex items-center gap-1 px-2 py-0.5 rounded-full border ${n.choices[o]?"border-primary/30 text-primary":"border-border text-muted-foreground line-through"}`,children:[n.choices[o]?s.jsx(up,{size:9,"aria-hidden":"true"}):s.jsx(Kt,{size:9,"aria-hidden":"true"}),o]},o))}),s.jsxs("p",{className:"text-[10px] text-muted-foreground mt-2 font-mono",children:["ID: ",n.id," · Version ",n.version]})]},n.id)})}),s.jsx("div",{className:"pt-2 border-t border-border",children:s.jsxs("button",{onClick:t,className:"w-full flex items-center justify-center gap-2 py-2.5 rounded-lg border border-destructive/40 text-destructive text-sm hover:bg-destructive/10 transition-colors",children:[s.jsx(Kt,{size:15}),"Einwilligung widerrufen (Art. 7 Abs. 3 DSGVO)"]})})]})}function w9e(){const{choices:e,acceptAll:t,rejectAll:r,saveCustom:n,closeManager:i}=E0(),[a,o]=A.useState("settings"),[l,c]=A.useState({...e});A.useEffect(()=>{c({...e})},[e]);const u=(d,x)=>{c(f=>({...f,[d]:x}))};return s.jsxs("div",{className:"fixed inset-0 z-[200] flex items-end sm:items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"cookie-manager-title",children:[s.jsx("div",{className:"absolute inset-0 bg-background/80 backdrop-blur-sm",onClick:i,"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-xl bg-card border border-border rounded-2xl shadow-2xl shadow-black/60 overflow-hidden flex flex-col max-h-[90vh]",children:[s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border shrink-0",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center text-primary",children:s.jsx(dE,{size:16})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h2",{id:"cookie-manager-title",className:"font-display text-lg leading-none",children:"DATENSCHUTZ-EINSTELLUNGEN"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Spirit Festival · spirit-festival.com"})]}),s.jsx("button",{onClick:i,className:"p-1.5 rounded-lg hover:bg-muted transition-colors text-muted-foreground hover:text-foreground","aria-label":"Dialog schlieÃen",children:s.jsx(_t,{size:18})})]}),s.jsx("div",{className:"flex border-b border-border shrink-0",children:["settings","log"].map(d=>s.jsx("button",{onClick:()=>o(d),className:`flex-1 flex items-center justify-center gap-2 py-3 text-sm font-medium transition-colors border-b-2 ${a===d?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"}`,"aria-selected":a===d,role:"tab",children:d==="settings"?s.jsxs(s.Fragment,{children:[s.jsx(k4,{size:14})," Einstellungen"]}):s.jsxs(s.Fragment,{children:[s.jsx(gr,{size:14})," Einwilligungsprotokoll"]})},d))}),s.jsx("div",{className:"overflow-y-auto flex-1 px-5 py-4",children:a==="settings"?s.jsxs("div",{className:"space-y-3",children:[s.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:["Wir verwenden Cookies und ähnliche Technologien. Einige sind notwendig, andere helfen uns, das Angebot zu verbessern und dir relevante Inhalte anzuzeigen."," ",s.jsxs("a",{href:"/datenschutz",className:"text-primary hover:underline inline-flex items-center gap-1",target:"_blank",rel:"noopener noreferrer",children:["Datenschutzerklärung ",s.jsx(w4,{size:10})]})]}),g9e.map(d=>s.jsx(y9e,{cat:d,checked:d.required?!0:l[d.key],onChange:x=>u(d.key,x)},d.key))]}):s.jsx(E9e,{})}),a==="settings"&&s.jsxs("div",{className:"border-t border-border px-5 py-4 flex flex-wrap gap-2 shrink-0",children:[s.jsx("button",{onClick:r,className:"flex-1 py-2.5 rounded-xl text-sm border border-border hover:border-primary/50 transition-colors",children:"Nur Notwendige"}),s.jsx("button",{onClick:()=>n(l),className:"flex-1 py-2.5 rounded-xl text-sm border border-primary text-primary hover:bg-primary/10 transition-colors font-medium",children:"Auswahl speichern"}),s.jsx("button",{onClick:t,className:"flex-1 py-2.5 rounded-xl text-sm bg-primary text-primary-foreground font-bold hover:opacity-90 transition-opacity glow-primary",children:"Alle akzeptieren"})]})]})]})}function C9e(){const{acceptAll:e,rejectAll:t,openManager:r}=E0();return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 z-[149] bg-background/70 backdrop-blur-sm","aria-hidden":"true"}),s.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-[150] glass border-t border-border shadow-xl shadow-black/40",role:"dialog","aria-modal":"true","aria-labelledby":"
987cookie-banner-title","aria-describedby":"cookie-banner-desc",children:s.jsx("div",{className:"container mx-auto px-4 py-5",children:s.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-4",children:[s.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center text-primary shrink-0 mt-0.5",children:s.jsx(dE,{size:16})}),s.jsxs("div",{children:[s.jsx("h2",{id:"cookie-banner-title",className:"font-display text-base text-foreground leading-tight",children:"DEINE PRIVATSPHÃRE, DEINE WAHL"}),s.jsxs("p",{id:"cookie-banner-desc",className:"text-xs text-muted-foreground mt-1 max-w-2xl",children:["Wir verwenden Cookies, um dir das beste Erlebnis zu bieten. Notwendige Cookies sind immer aktiv. Weitere Kategorien aktivierst du nur mit deiner Zustimmung."," ",s.jsx("a",{href:"/datenschutz",className:"text-primary hover:underline",children:"Datenschutzerklärung"})]})]})]}),s.jsxs("div",{className:"flex flex-wrap gap-2 shrink-0",children:[s.jsxs("button",{onClick:r,className:"flex items-center gap-1.5 px-4 py-2.5 text-sm border border-border rounded-xl hover:border-primary/50 hover:text-primary transition-all",children:[s.jsx(k4,{size:14}),"Einstellungen"]}),s.jsx("button",{onClick:t,className:"px-4 py-2.5 text-sm border border-border rounded-xl hover:border-primary/50 transition-colors",children:"Nur Notwendige"}),s.jsx("button",{onClick:e,className:"px-5 py-2.5 text-sm bg-primary text-primary-foreground rounded-xl font-bold hover:opacity-90 transition-opacity glow-primary",children:"Alle akzeptieren"})]})]})})})]})}function A9e(){const{bannerVisible:e,managerOpen:t}=E0();return s.jsxs(s.Fragment,{children:[e&&s.jsx(C9e,{}),t&&s.jsx(w9e,{})]})}let Ej=!1,Dx=null;async function j9e(){if(Dx)return Dx;try{const{data:e,error:t}=await re.functions.invoke("meta-capi",{method:"GET"});if(!t&&(e!=null&&e.pixel_id))return Dx=e.pixel_id,Dx}catch{}return null}function k9e(e){if(Ej)return;Ej=!0;const t=window,r=t.fbq=function(...i){r.callMethod?r.callMethod.apply(r,i):r.queue.push(i)};t._fbq||(t._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[];const n=document.createElement("script");n.async=!0,n.src="https://connect.facebook.net/en_US/fbevents.js",document.head.appendChild(n),window.fbq("init",e),window.fbq("track","PageView")}function _9e(){const e=A.useRef(!1);A.useEffect(()=>{e.current||(e.current=!0,j9e().then(t=>{t&&k9e(t)}))},[])}function S9e(){const e=A.useCallback((n,i)=>{typeof window.fbq=="function"&&window.fbq("track",n,i)},[]),t=A.useCallback(async(n,i)=>{try{await re.functions.invoke("meta-capi",{body:{event_name:n,event_time:Math.floor(Date.now()/1e3),action_source:"website",event_source_url:window.location.href,custom_data:i}})}catch{}},[]);return{track:A.useCallback((n,i)=>{e(n,i),t(n,i)},[e,t]),trackPixel:e,trackServer:t}}const qs=e=>`${(e/100).toFixed(2).replace(".",",")} â¬`;function B9e(){const{items:e,eventInfo:t,isOpen:r,closeCart:n,setQuantity:i,removeItem:a,subtotalCents:o,feeCents:l,totalCents:c,totalQuantity:u}=b0(),{track:d}=S9e(),[x,f]=A.useState("cart"),[h,m]=A.useState(""),[p,v]=A.useState(""),[y,b]=A.useState(""),[g,w]=A.useState(""),[E,C]=A.useState({}),[j,S]=A.useState(!1),[_,O]=A.useState(null);if(!r)return null;const I=()=>{const k={};return h.trim()||(k.name="Bitte deinen Namen eingeben."),/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p.trim())||(k.email="Bitte eine gültige E-Mail eingeben."),y.trim().replace(/\D/g,"").length<6&&(k.phone="Bitte eine gültige Telefonnummer eingeben."),g&&g.length<8&&(k.password="Passwort muss mindestens 8 Zeichen haben."),C(k),Object.keys(k).length===0};async function B(){if(!t||e.length===0)return;S(!0),O(null),g.length>=8&&await re.auth.signUp({email:p.trim(),password:g,options:{emailRedirectTo:window.location.origin,data:{full_name:h.trim(),phone:y.trim()}}});const{data:k,error:$}=await re.functions.invoke("create-mollie-payment",{body:{items:e.map(W=>({categoryId:W.categoryId,quantity:W.quantity})),buyerName:h.trim(),buyerEmail:p.trim(),buyerPhone:y.trim(),eventId:String(t.id),eventTitle:t.title,eventDate:t.date,eventDateLabel:t.dateLabel,eventTime:t.timeStart,eventLocation:t.location,eventAddress:t.address,returnBaseUrl:window.location.origin}});if($||k!=null&&k.error||!(k!=null&&k.checkoutUrl)){O((k==null?void 0:k.error)??($==null?void 0:$.message)??"Zahlung konnte nicht gestartet werden."),S(!1);return}window.location.href=k.checkoutUrl}const T=k=>`w-full bg-background border rounded-xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50 transition-all ${k?"border-destructive":"border-border focus:border-primary/50"}`;return s.jsxs("div",{className:"fixed inset-0 z-[210] flex justify-end",role:"dialog","aria-modal":"true","aria-label":"Warenkorb",children:[s.jsx("div",{className:"absolute inset-0 bg-background/80 backdrop-blur-sm",onClick:j?void 0:n,"aria-hidden":"true"}),s.jsxs("aside",{className:"relative w-full sm:max-w-md h-full bg-card border-l border-border flex flex-col shadow-2xl shadow-black/60 animate-in slide-in-from-right",children:[s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border shrink-0",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center text-primary",children:s.jsx(kn,{size:16})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h2",{className:"font-display text-lg leading-none uppercase",children:x==="cart"?"Warenkorb":x==="form"?"Deine Daten":"Bestellung prüfen"}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:[u," ",u===1?"Ticket":"Tickets",t?` · ${t.title}`:""]})]}),s.jsx("button",{onClick:n,disabled:j,className:"p-1.5 rounded-lg hover:bg-muted transition-colors text-muted-foreground disabled:opacity-40","aria-label":"Warenkorb schlieÃen",children:s.jsx(_t,{size:18})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-5 space-y-5",children:e.length===0?s.jsxs("div",{className:"text-center py-16",children:[s.jsx(kn,{size:30,className:"mx-auto text-muted-foreground mb-3"}),s.jsx("p",{className:"font-display text-xl uppercase",children:"Noch leer"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Wähle im Ticketshop deine Tickets â Wochenendticket, Caravan & Co. lassen sich beliebig kombinieren."})]}):x==="cart"?s.jsxs(s.Fragment,{children:[e.map(k=>s.jsxs("div",{className:"rounded-xl border border-border bg-background/40 p-4",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("h3",{className:"font-display text-sm uppercase leading-tight",children:k.category}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[qs(k.unitPriceCents)," pro Ticket"]})]}),s.jsx("button",{onClick:()=>a(k.categoryId),className:"p-1.5 rounded-lg text-muted-foreground hover:text-destructive transition-colors","aria-label":`${k.category} entfernen`,children:s.jsx(Vt,{size:15})})]}),s.jsxs("div",{className:"flex items-center justify-between mt-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:()=>i(k.categoryId,k.quantity-1),className:"w-8 h-8 rounded-lg border border-border flex items-center justify-center text-muted-foreground hover:border-primary/50","aria-label":"Anzahl verringern",children:s.jsx(DT,{size:13})}),s.jsx("span",{className:"font-tech font-bold w-6 text-center",children:k.quantity}),s.jsx("button",{onClick:()=>i(k.categoryId,k.quantity+1),disabled:k.quantity>=k.maxQuantity,className:"w-8 h-8 rounded-lg border border-border flex items-center justify-center text-muted-foreground hover:border-primary/50 disabled:opacity-40","aria-label":"Anzahl erhöhen",children:s.jsx(Ht,{size:13})})]}),s.jsx("span",{className:"font-tech font-bold text-primary",children:qs(k.unitPriceCents*k.quantity)})]})]},k.categoryId)),s.jsx(tv,{subtotal:o,fee:l,total:c})]}):x==="form"?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{htmlFor:"cart-name",className:"block text-xs font-medium text-muted-foreground mb-1.5",children:s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx(id,{size:11})," Vor- und Nachname *"]})}),s.jsx("input",{id:"cart-name",type:"text",value:h,placeholder:"Max Mustermann",onChange:k=>{m(k.target.value),C($=>({...$,name:void 0}))},className:T(!!E.name)}),E.name&&s.jsx("p",{className:"mt-1 text-xs text-destructive",children:E.name})]}),s.jsxs("div",{children:[s.jsx("label",{htmlFor:"cart-email",className:"block text-xs font-medium text-muted-foreground mb-1.5",children:s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx($t,{size:11})," E-Mail-Adresse *"]})}),s.jsx("input",{id:"cart-email",type:"email",value:p,placeholder:"[email protected]",onChange:k=>{v(k.target.value),C($=>({...$,email:void 0}))},className:T(!!E.email)}),E.email&&s.jsx("p",{className:"mt-1 text-xs text-destructive",children:E.email})]}),s.jsxs("div",{children:[s.jsx("label",{htmlFor:"cart-phone",className:"block text-xs font-medium text-muted-foreground mb-1.5",children:s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx($T,{size:11})," Telefonnummer *"]})}),s.jsx("input",{id:"cart-phone",type:"tel",value:y,placeholder:"+49 151 23456789",onCh
987ange:k=>{b(k.target.value),C($=>({...$,phone:void 0}))},className:T(!!E.phone)}),E.phone&&s.jsx("p",{className:"mt-1 text-xs text-destructive",children:E.phone})]}),s.jsxs("div",{children:[s.jsx("label",{htmlFor:"cart-password",className:"block text-xs font-medium text-muted-foreground mb-1.5",children:s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx(dp,{size:11})," Passwort (optional)"]})}),s.jsx("input",{id:"cart-password",type:"password",value:g,autoComplete:"new-password",placeholder:"Mindestens 8 Zeichen",onChange:k=>{w(k.target.value),C($=>({...$,password:void 0}))},className:T(!!E.password)}),E.password?s.jsx("p",{className:"mt-1 text-xs text-destructive",children:E.password}):s.jsx("p",{className:"mt-1.5 text-xs text-muted-foreground",children:'Mit Passwort wird automatisch ein Account angelegt â so siehst du deine Tickets jederzeit unter âMein Bereich".'})]}),s.jsx(tv,{subtotal:o,fee:l,total:c})]}):s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"rounded-xl border border-border bg-background/40 p-4 space-y-2.5",children:e.map(k=>s.jsxs("div",{className:"flex justify-between text-sm gap-3",children:[s.jsxs("span",{className:"text-muted-foreground truncate",children:[k.quantity,"à ",k.category]}),s.jsx("span",{className:"font-tech",children:qs(k.unitPriceCents*k.quantity)})]},k.categoryId))}),s.jsx("div",{className:"rounded-xl border border-border bg-background/40 p-4 space-y-2",children:[["Inhaber",h],["E-Mail",p],["Telefon",y],["Datum",(t==null?void 0:t.dateLabel)??"â"],["Location",(t==null?void 0:t.location)??"â"]].map(([k,$])=>s.jsxs("div",{className:"flex justify-between text-sm gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:k}),s.jsx("span",{className:"font-medium text-right max-w-[60%] truncate",children:$})]},k))}),s.jsx(tv,{subtotal:o,fee:l,total:c}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Du wirst zur sicheren Bezahlseite weitergeleitet (Kreditkarte, PayPal, SEPA, Klarna). Für jedes Ticket erhältst du ein eigenes PDF mit eigenem QR-Code. Mit dem Kauf stimmst du dem vorzeitigen Beginn der Leistung zu; das Widerrufsrecht entfällt bei Veranstaltungstickets gemäà § 312g Abs. 2 Nr. 9 BGB."}),_&&s.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-destructive/10 border border-destructive/30 text-xs text-destructive",children:[s.jsx(Ul,{size:13,className:"shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold",children:"Zahlung konnte nicht gestartet werden"}),s.jsx("p",{className:"text-destructive/80 mt-0.5",children:_})]})]})]})}),e.length>0&&s.jsxs("div",{className:"border-t border-border px-5 py-4 flex gap-2 shrink-0",children:[x!=="cart"&&s.jsx("button",{onClick:()=>f(x==="confirm"?"form":"cart"),disabled:j,className:"px-4 py-3 rounded-xl border border-border text-sm hover:border-primary/50 transition-colors disabled:opacity-50",children:s.jsx(Sn,{size:15})}),s.jsx("button",{onClick:()=>{x==="cart"?(d("InitiateCheckout",{content_type:"ticket",value:c/100,currency:"EUR",num_items:u}),f("form")):x==="form"?I()&&f("confirm"):B()},disabled:j,className:"flex-1 flex items-center justify-center gap-2 py-3 rounded-xl bg-primary text-primary-foreground text-sm font-bold hover:opacity-90 transition-opacity glow-primary disabled:opacity-50",children:x==="confirm"?j?s.jsxs(s.Fragment,{children:[s.jsx(ar,{size:16,className:"animate-spin"})," Weiterleitung â¦"]}):s.jsxs(s.Fragment,{children:[s.jsx(wT,{size:16})," ",qs(c)," bezahlen"]}):s.jsxs(s.Fragment,{children:[s.jsx(Af,{size:16})," Weiter"]})})]})]})]})}function tv({subtotal:e,fee:t,total:r}){return s.jsxs("div",{className:"rounded-xl border border-border bg-background/40 p-4 space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Zwischensumme"}),s.jsx("span",{className:"font-tech",children:qs(e)})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Bearbeitungsgebühr (10 %)"}),s.jsx("span",{className:"font-tech",children:qs(t)})]}),s.jsxs("div",{className:"flex justify-between text-sm pt-2 border-t border-border",children:[s.jsx("span",{className:"font-medium",children:"Gesamt"}),s.jsx("span",{className:"font-bold text-primary font-tech",children:qs(r)})]})]})}const N9e=new gR;function D9e(){return _9e(),null}const F9e=()=>s.jsx(yR,{client:N9e,children:s.jsxs(GM,{children:[s.jsx(S$,{}),s.jsx(sI,{}),s.jsx(dK,{children:s.jsx(aK,{children:s.jsxs(gL,{children:[s.jsx(D9e,{}),s.jsx("a",{href:"#main-content",className:"skip-link",children:"Zum Hauptinhalt springen"}),s.jsxs(cL,{children:[s.jsx(Re,{path:"/",element:s.jsxs(s.Fragment,{children:[s.jsx(Sr,{}),s.jsx(wU,{}),s.jsx(Br,{})]})}),s.jsx(Re,{path:"/events",element:s.jsx(CV,{})}),s.jsx(Re,{path:"/lineup",element:s.jsx(uZ,{})}),s.jsx(Re,{path:"/faq",element:s.jsx(fZ,{})}),s.jsx(Re,{path:"/impressum",element:s.jsx(hZ,{})}),s.jsx(Re,{path:"/datenschutz",element:s.jsx(pZ,{})}),s.jsx(Re,{path:"/widerruf",element:s.jsx(mZ,{})}),s.jsx(Re,{path:"/kontakt",element:s.jsx(gZ,{})}),s.jsx(Re,{path:"/my-tickets",element:s.jsx(UZ,{})}),s.jsx(Re,{path:"/mein-bereich",element:s.jsx(mX,{})}),s.jsx(Re,{path:"/tickets-abruf",element:s.jsx(vX,{})}),s.jsx(Re,{path:"/lageplan",element:s.jsx(yX,{})}),s.jsx(Re,{path:"/submit-event",element:s.jsx(f9e,{})}),s.jsx(Re,{path:"/bestellung/:orderId",element:s.jsxs(s.Fragment,{children:[s.jsx(Sr,{}),s.jsx(p9e,{}),s.jsx(Br,{})]})}),s.jsx(Re,{path:"/setup-account",element:s.jsx(d9e,{})}),s.jsx(Re,{path:"/register",element:s.jsx(u9e,{})}),s.jsx(Re,{path:"/login",element:s.jsx(m5,{})}),s.jsx(Re,{path:"/admin/login",element:s.jsx(m5,{})}),s.jsx(Re,{path:"/admin/scanner",element:s.jsx(dt,{allowedRoles:["admin","moderator"],children:s.jsx(U2e,{})})}),s.jsx(Re,{path:"/admin/analytics",element:s.jsx(dt,{allowedRoles:["admin","moderator"],children:s.jsx(g2e,{})})}),s.jsx(Re,{path:"/admin/refunds",element:s.jsx(dt,{children:s.jsx(C2e,{})})}),s.jsx(Re,{path:"/admin/events",element:s.jsx(dt,{allowedRoles:["admin","moderator"],children:s.jsx(k2e,{})})}),s.jsx(Re,{path:"/admin/roles",element:s.jsx(dt,{children:s.jsx(F2e,{})})}),s.jsx(Re,{path:"/admin/audit",element:s.jsx(dt,{children:s.jsx($2e,{})})}),s.jsx(Re,{path:"/admin/secrets",element:s.jsx(dt,{children:s.jsx(M2e,{})})}),s.jsx(Re,{path:"/dashboard",element:s.jsx(dt,{allowedRoles:["admin","moderator"],children:s.jsx(PX,{})})}),s.jsx(Re,{path:"/admin/customers",element:s.jsx(dt,{allowedRoles:["admin","moderator"],children:s.jsx(H2e,{})})}),s.jsx(Re,{path:"/admin/event-overview",element:s.jsx(dt,{allowedRoles:["admin","moderator"],children:s.jsx(V2e,{})})}),s.jsx(Re,{path:"/admin/newsletter",element:s.jsx(dt,{allowedRoles:["admin","moderator"],children:s.jsx(q2e,{})})}),s.jsx(Re,{path:"/admin/coupons",element:s.jsx(dt,{allowedRoles:["admin"],children:s.jsx(Q2e,{})})}),s.jsx(Re,{path:"/admin/event-manager",element:s.jsx(dt,{allowedRoles:["admin"],children:s.jsx(l9e,{})})}),s.jsx(Re,{path:"/admin/tracking",element:s.jsx(dt,{allowedRoles:["admin"],children:s.jsx(c9e,{})})}),s.jsx(Re,{path:"*",element:s.jsx(m9e,{})})]}),s.jsx(A9e,{}),s.jsx(B9e,{})]})})})]})}),P9e={nav:{events:"Ticketshop",lineup:"Line-Up",map:"Lageplan",faq:"FAQ",myTickets:"Meine Tickets",myArea:"Mein Bereich",login:"Login",tickets:"Tickets",register:"Registrieren",searchPlaceholder:"Events, Künstler suchen...",openMenu:"Menü öffnen",closeMenu:"Menü schlieÃen",openSearch:"Suche öffnen",home:"Startseite"},hero:{badge:"19. â 21. August 2027 · Festwiesen Loburg",subtitle:"3 Tage Punk, Oi!, Ska & Rock. Festwiesen Loburg, 2027. 40+ Bands. Eine Community.",buyTickets:"Tickets kaufen",lineup:"Line-Up 2027",scroll:"Scroll",secureTicket:"Jetzt Ticket sichern"},stats:{visitors:"Besucher",bands:"Bands",days:"Tage",yearsExp:"Jahre Punkrock statt Erfahrung"}
987,event:{saveTheDate:"Save the Date",title:"SPIRIT FESTIVAL 2027",description:"Das Spirit Festival 2027 kehrt zurück â gröÃer, lauter und geiler denn je. Mit über 40 Bands auf mehreren Bühnen, darunter Sondaschule, Perkele, Ignite, Knorkator, Discharge, The Casualties und viele weitere Legenden der Szene.",date:"19. â 21. August 2027",location:"Festwiesen Loburg",music:"Punk · Oi! · Ska · Rock · Hardcore",visitors:"6.000+ Fans (die letzten 3 Jahre Monate vorher ausverkauft)",fullLineup:"Vollständiges Line-Up",facebookEvent:"Facebook Event",labelDate:"Datum",labelLocation:"Location",labelMusic:"Musik",labelVisitors:"Besucher"},reviews:{subtitle:"Was Besucher sagen",heading:"STIMMEN AUS DER COMMUNITY"},gallery:{photoCredit:"Fotos: © Lysann Junge",heading:"IMPRESSIONEN"},map:{subtitle:"Orientierung vor Ort",heading:"GELÃNDEPLAN",description:"Mainstage, Stage II, Camping-Areas, Biergarten, Merch & mehr â hier findest du dich auf dem Festival-Gelände zurecht.",openFull:"Geländeplan öffnen"},footer:{newsletterHeading:"KEIN EVENT VERPASSEN",newsletterSub:"Trage dich jetzt in unseren Newsletter ein.",newsletterPlaceholder:"[email protected]",subscribe:"Anmelden",navigation:"NAVIGATION",legal:"RECHTLICHES",contact:"KONTAKT",legalLinks:{impressum:"Impressum",datenschutz:"Datenschutz",widerruf:"Widerrufsbelehrung",agb:"AGB",cookies:"Cookie-Einstellungen"},navLinks:{events:"Ticketshop",lineup:"Line-Up",map:"Lageplan",faq:"FAQ",contact:"Kontakt",newsletter:"Newsletter"},tagline:"Das Erlebnis, das bleibt. Musik, Menschen & unvergessliche Momente.",copyright:"© {{year}} Spirit-Festival.com â Alle Rechte vorbehalten",company:"GbR Werner Christian u. Peschke Susanne · Magdeburg"},faq:{pageSubtitle:"Häufige Fragen",pageHeading:"FAQ",pageDesc:"Alles was du wissen musst â auf einen Blick.",ticketNotReceived:"TICKET NICHT ERHALTEN?",ticketFormDesc:"Füll das Formular aus â wir senden dein Ticket automatisch erneut zu.",thankYou:"DANKE!",thankYouDesc:"Wir haben deine Anfrage erhalten und senden dein Ticket erneut zu. Das kann einige Minuten dauern.",form:{selectEvent:"Event auswählen",selectPlaceholder:"Bitte wählen...",firstName:"Vorname",lastName:"Nachname",email:"E-Mail-Adresse",submit:"Ticket erneut anfordern"}},common:{language:"Sprache",openNewTab:"öffnet in neuem Tab"}},O9e={nav:{events:"Ticketshop",lineup:"Line-Up",map:"Site Map",faq:"FAQ",myTickets:"My Tickets",myArea:"My Area",login:"Login",tickets:"Tickets",register:"Register",searchPlaceholder:"Search events, artists...",openMenu:"Open menu",closeMenu:"Close menu",openSearch:"Open search",home:"Home"},hero:{badge:"19 â 21 August 2027 · Festwiesen Loburg",subtitle:"3 Days of Punk, Oi!, Ska & Rock. Festwiesen Loburg, 2027. 40+ Bands. One Community.",buyTickets:"Buy Tickets",lineup:"Line-Up 2027",scroll:"Scroll",secureTicket:"Get your ticket now"},stats:{visitors:"Visitors",bands:"Bands",days:"Days",yearsExp:"Years of Punkrock instead of Experience"},event:{saveTheDate:"Save the Date",title:"SPIRIT FESTIVAL 2027",description:"Spirit Festival 2027 is back â bigger, louder and better than ever. With over 40 bands on multiple stages, including Sondaschule, Perkele, Ignite, Knorkator, Discharge, The Casualties and many more legends of the scene.",date:"19 â 21 August 2027",location:"Festwiesen Loburg",music:"Punk · Oi! · Ska · Rock · Hardcore",visitors:"6,000+ fans (sold out months in advance the last 3 years)",fullLineup:"Full Line-Up",facebookEvent:"Facebook Event",labelDate:"Date",labelLocation:"Location",labelMusic:"Music",labelVisitors:"Visitors"},reviews:{subtitle:"What visitors say",heading:"VOICES FROM THE COMMUNITY"},gallery:{photoCredit:"Photos: © Lysann Junge",heading:"IMPRESSIONS"},map:{subtitle:"Find your way around",heading:"SITE MAP",description:"Mainstage, Stage II, Camping Areas, Beer Garden, Merch & more â find your way around the festival grounds.",openFull:"Open site map"},footer:{newsletterHeading:"NEVER MISS AN EVENT",newsletterSub:"Sign up for our newsletter now.",newsletterPlaceholder:"[email protected]",subscribe:"Subscribe",navigation:"NAVIGATION",legal:"LEGAL",contact:"CONTACT",legalLinks:{impressum:"Legal Notice",datenschutz:"Privacy Policy",widerruf:"Right of Withdrawal",agb:"T&Cs",cookies:"Cookie Settings"},navLinks:{events:"Ticketshop",lineup:"Line-Up",map:"Site Map",faq:"FAQ",contact:"Contact",newsletter:"Newsletter"},tagline:"The experience that stays. Music, people & unforgettable moments.",copyright:"© {{year}} Spirit-Festival.com â All rights reserved",company:"GbR Werner Christian u. Peschke Susanne · Magdeburg"},faq:{pageSubtitle:"Frequently Asked Questions",pageHeading:"FAQ",pageDesc:"Everything you need to know â at a glance.",ticketNotReceived:"DIDN'T RECEIVE YOUR TICKET?",ticketFormDesc:"Fill out the form â we'll automatically resend your ticket.",thankYou:"THANK YOU!",thankYouDesc:"We've received your request and will resend your ticket. This may take a few minutes.",form:{selectEvent:"Select event",selectPlaceholder:"Please choose...",firstName:"First name",lastName:"Last name",email:"Email address",submit:"Resend ticket"}},common:{language:"Language",openNewTab:"opens in new tab"}},LD=localStorage.getItem("spirit-lang")??"de";yr.use(tz).init({resources:{de:{translation:P9e},en:{translation:O9e}},lng:LD,fallbackLng:"de",interpolation:{escapeValue:!1}});yr.on("languageChanged",e=>{localStorage.setItem("spirit-lang",e),document.documentElement.lang=e});document.documentElement.lang=LD;W_(document.getElementById("root")).render(s.jsx(F9e,{}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.