var XB=Object.defineProperty;var QB=(t,e,n)=>e in t?XB(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var eU=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ne=(t,e,n)=>(QB(t,typeof e!="symbol"?e+"":e,n),n);var K1e=eU((nwe,Mg)=>{function tU(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var vf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function to(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function nU(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var $D={exports:{}},db={},BD={exports:{}},vt={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Xh=Symbol.for("react.element"),rU=Symbol.for("react.portal"),sU=Symbol.for("react.fragment"),oU=Symbol.for("react.strict_mode"),iU=Symbol.for("react.profiler"),aU=Symbol.for("react.provider"),lU=Symbol.for("react.context"),cU=Symbol.for("react.forward_ref"),dU=Symbol.for("react.suspense"),uU=Symbol.for("react.memo"),fU=Symbol.for("react.lazy"),wN=Symbol.iterator;function hU(t){return t===null||typeof t!="object"?null:(t=wN&&t[wN]||t["@@iterator"],typeof t=="function"?t:null)}var UD={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},YD=Object.assign,HD={};function Qd(t,e,n){this.props=t,this.context=e,this.refs=HD,this.updater=n||UD}Qd.prototype.isReactComponent={};Qd.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};Qd.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function GD(){}GD.prototype=Qd.prototype;function Px(t,e,n){this.props=t,this.context=e,this.refs=HD,this.updater=n||UD}var Ox=Px.prototype=new GD;Ox.constructor=Px;YD(Ox,Qd.prototype);Ox.isPureReactComponent=!0;var xN=Array.isArray,WD=Object.prototype.hasOwnProperty,Fx={current:null},VD={key:!0,ref:!0,__self:!0,__source:!0};function KD(t,e,n){var r,s={},o=null,a=null;if(e!=null)for(r in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(o=""+e.key),e)WD.call(e,r)&&!VD.hasOwnProperty(r)&&(s[r]=e[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var c=Array(l),d=0;d<l;d++)c[d]=arguments[d+2];s.children=c}if(t&&t.defaultProps)for(r in l=t.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:Xh,type:t,key:o,ref:a,props:s,_owner:Fx.current}}function pU(t,e){return{$$typeof:Xh,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Dx(t){return typeof t=="object"&&t!==null&&t.$$typeof===Xh}function mU(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var CN=/\/+/g;function n0(t,e){return typeof t=="object"&&t!==null&&t.key!=null?mU(""+t.key):e.toString(36)}function og(t,e,n,r,s){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var a=!1;if(t===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case Xh:case rU:a=!0}}if(a)return a=t,s=s(a),t=r===""?"."+n0(a,0):r,xN(s)?(n="",t!=null&&(n=t.replace(CN,"$&/")+"/"),og(s,e,n,"",function(d){return d})):s!=null&&(Dx(s)&&(s=pU(s,n+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(CN,"$&/")+"/")+t)),e.push(s)),1;if(a=0,r=r===""?".":r+":",xN(t))for(var l=0;l<t.length;l++){o=t[l];var c=r+n0(o,l);a+=og(o,e,n,c,s)}else if(c=hU(t),typeof c=="function")for(t=c.call(t),l=0;!(o=t.next()).done;)o=o.value,c=r+n0(o,l++),a+=og(o,e,n,c,s);else if(o==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return a}function nm(t,e,n){if(t==null)return t;var r=[],s=0;return og(t,r,"","",function(o){return e.call(n,o,s++)}),r}function gU(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Pr={current:null},ig={transition:null},yU={ReactCurrentDispatcher:Pr,ReactCurrentBatchConfig:ig,ReactCurrentOwner:Fx};vt.Children={map:nm,forEach:function(t,e,n){nm(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return nm(t,function(){e++}),e},toArray:function(t){return nm(t,function(e){return e})||[]},only:function(t){if(!Dx(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};vt.Component=Qd;vt.Fragment=sU;vt.Profiler=iU;vt.PureComponent=Px;vt.StrictMode=oU;vt.Suspense=dU;vt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yU;vt.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=YD({},t.props),s=t.key,o=t.ref,a=t._owner;if(e!=null){if(e.ref!==void 0&&(o=e.ref,a=Fx.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(c in e)WD.call(e,c)&&!VD.hasOwnProperty(c)&&(r[c]=e[c]===void 0&&l!==void 0?l[c]:e[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var d=0;d<c;d++)l[d]=arguments[d+2];r.children=l}return{$$typeof:Xh,type:t.type,key:s,ref:o,props:r,_owner:a}};vt.createContext=function(t){return t={$$typeof:lU,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:aU,_context:t},t.Consumer=t};vt.createElement=KD;vt.createFactory=function(t){var e=KD.bind(null,t);return e.type=t,e};vt.createRef=function(){return{current:null}};vt.forwardRef=function(t){return{$$typeof:cU,render:t}};vt.isValidElement=Dx;vt.lazy=function(t){return{$$typeof:fU,_payload:{_status:-1,_result:t},_init:gU}};vt.memo=function(t,e){return{$$typeof:uU,type:t,compare:e===void 0?null:e}};vt.startTransition=function(t){var e=ig.transition;ig.transition={};try{t()}finally{ig.transition=e}};vt.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};vt.useCallback=function(t,e){return Pr.current.useCallback(t,e)};vt.useContext=function(t){return Pr.current.useContext(t)};vt.useDebugValue=function(){};vt.useDeferredValue=function(t){return Pr.current.useDeferredValue(t)};vt.useEffect=function(t,e){return Pr.current.useEffect(t,e)};vt.useId=function(){return Pr.current.useId()};vt.useImperativeHandle=function(t,e,n){return Pr.current.useImperativeHandle(t,e,n)};vt.useInsertionEffect=function(t,e){return Pr.current.useInsertionEffect(t,e)};vt.useLayoutEffect=function(t,e){return Pr.current.useLayoutEffect(t,e)};vt.useMemo=function(t,e){return Pr.current.useMemo(t,e)};vt.useReducer=function(t,e,n){return Pr.current.useReducer(t,e,n)};vt.useRef=function(t){return Pr.current.useRef(t)};vt.useState=function(t){return Pr.current.useState(t)};vt.useSyncExternalStore=function(t,e,n){return Pr.current.useSyncExternalStore(t,e,n)};vt.useTransition=function(){return Pr.current.useTransition()};vt.version="18.2.0";BD.exports=vt;var C=BD.exports;const Fe=to(C),n1=tU({__proto__:null,default:Fe},[C]);/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var bU=C,vU=Symbol.for("react.element"),_U=Symbol.for("react.fragment"),wU=Object.prototype.hasOwnProperty,xU=bU.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,CU={key:!0,ref:!0,__self:!0,__source:!0};function ZD(t,e,n){var r,s={},o=null,a=null;n!==void 0&&(o=""+n),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(a=e.ref);for(r in e)wU.call(e,r)&&!CU.hasOwnProperty(r)&&(s[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)s[r]===void 0&&(s[r]=e[r]);return{$$typeof:vU,type:t,key:o,ref:a,props:s,_owner:xU.current}}db.Fragment=_U;db.jsx=ZD;db.jsxs=ZD;$D.exports=db;var kx=$D.exports;const ee=kx.Fragment,i=kx.jsx,p=kx.jsxs;var r1={},JD={exports:{}},os={},XD={exports:{}},QD={};/** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */(function(t){function e(H,j){var U=H.length;H.push(j);e:for(;0<U;){var L=U-1>>>1,K=H[L];if(0<s(K,j))H[L]=j,H[U]=K,U=L;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var j=H[0],U=H.pop();if(U!==j){H[0]=U;e:for(var L=0,K=H.length,Y=K>>>1;L<Y;){var te=2*(L+1)-1,J=H[te],Q=te+1,oe=H[Q];if(0>s(J,U))Q<K&&0>s(oe,J)?(H[L]=oe,H[Q]=U,L=Q):(H[L]=J,H[te]=U,L=te);else if(Q<K&&0>s(oe,U))H[L]=oe,H[Q]=U,L=Q;else break e}}return j}function s(H,j){var U=H.sortIndex-j.sortIndex;return U!==0?U:H.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],d=[],u=1,f=null,g=3,E=!1,S=!1,w=!1,_=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(H){for(var j=n(d);j!==null;){if(j.callback===null)r(d);else if(j.startTime<=H)r(d),j.sortIndex=j.expirationTime,e(c,j);else break;j=n(d)}}function k(H){if(w=!1,A(H),!S)if(n(c)!==null)S=!0,W(R);else{var j=n(d);j!==null&&G(k,j.startTime-H)}}function R(H,j){S=!1,w&&(w=!1,h(y),y=-1),E=!0;var U=g;try{for(A(j),f=n(c);f!==null&&(!(f.expirationTime>j)||H&&!P());){var L=f.callback;if(typeof L=="function"){f.callback=null,g=f.priorityLevel;var K=L(f.expirationTime<=j);j=t.unstable_now(),typeof K=="function"?f.callback=K:f===n(c)&&r(c),A(j)}else r(c);f=n(c)}if(f!==null)var Y=!0;else{var te=n(d);te!==null&&G(k,te.startTime-j),Y=!1}return Y}finally{f=null,g=U,E=!1}}var O=!1,N=null,y=-1,v=5,b=-1;function P(){return!(t.unstable_now()-b<v)}function F(){if(N!==null){var H=t.unstable_now();b=H;var j=!0;try{j=N(!0,H)}finally{j?I():(O=!1,N=null)}}else O=!1}var I;if(typeof m=="function")I=function(){m(F)};else if(typeof MessageChannel<"u"){var T=new MessageChannel,q=T.port2;T.port1.onmessage=F,I=function(){q.postMessage(null)}}else I=function(){_(F,0)};function W(H){N=H,O||(O=!0,I())}function G(H,j){y=_(function(){H(t.unstable_now())},j)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(H){H.callback=null},t.unstable_continueExecution=function(){S||E||(S=!0,W(R))},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return g},t.unstable_getFirstCallbackNode=function(){return n(c)},t.unstable_next=function(H){switch(g){case 1:case 2:case 3:var j=3;break;default:j=g}var U=g;g=j;try{return H()}finally{g=U}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(H,j){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var U=g;g=H;try{return j()}finally{g=U}},t.unstable_scheduleCallback=function(H,j,U){var L=t.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?L+U:L):U=L,H){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=U+K,H={id:u++,callback:j,priorityLevel:H,startTime:U,expirationTime:K,sortIndex:-1},U>L?(H.sortIndex=U,e(d,H),n(c)===null&&H===n(d)&&(w?(h(y),y=-1):w=!0,G(k,U-L))):(H.sortIndex=K,e(c,H),S||E||(S=!0,W(R))),H},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(H){var j=g;return function(){var U=g;g=j;try{return H.apply(this,arguments)}finally{g=U}}}})(QD);XD.exports=QD;var EU=XD.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ek=C,ns=EU;function _e(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var tk=new Set,Xf={};function ec(t,e){Ad(t,e),Ad(t+"Capture",e)}function Ad(t,e){for(Xf[t]=e,t=0;t<e.length;t++)tk.add(e[t])}var Ci=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),s1=Object.prototype.hasOwnProperty,SU=/^[: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]*$/,EN={},SN={};function AU(t){return s1.call(SN,t)?!0:s1.call(EN,t)?!1:SU.test(t)?SN[t]=!0:(EN[t]=!0,!1)}function NU(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function RU(t,e,n,r){if(e===null||typeof e>"u"||NU(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Or(t,e,n,r,s,o,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var er={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){er[t]=new Or(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];er[e]=new Or(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){er[t]=new Or(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){er[t]=new Or(t,2,!1,t,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(t){er[t]=new Or(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){er[t]=new Or(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){er[t]=new Or(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){er[t]=new Or(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){er[t]=new Or(t,5,!1,t.toLowerCase(),null,!1,!1)});var Tx=/[\-:]([a-z])/g;function Ix(t){return t[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(t){var e=t.replace(Tx,Ix);er[e]=new Or(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Tx,Ix);er[e]=new Or(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Tx,Ix);er[e]=new Or(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){er[t]=new Or(t,1,!1,t.toLowerCase(),null,!1,!1)});er.xlinkHref=new Or("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){er[t]=new Or(t,1,!1,t.toLowerCase(),null,!0,!0)});function Mx(t,e,n,r){var s=er.hasOwnProperty(e)?er[e]:null;(s!==null?s.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(RU(e,n,s,r)&&(n=null),r||s===null?AU(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):s.mustUseProperty?t[s.propertyName]=n===null?s.type===3?!1:"":n:(e=s.attributeName,r=s.attributeNamespace,n===null?t.removeAttribute(e):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var ki=ek.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,rm=Symbol.for("react.element"),Bc=Symbol.for("react.portal"),Uc=Symbol.for("react.fragment"),Lx=Symbol.for("react.strict_mode"),o1=Symbol.for("react.profiler"),nk=Symbol.for("react.provider"),rk=Symbol.for("react.context"),zx=Symbol.for("react.forward_ref"),i1=Symbol.for("react.suspense"),a1=Symbol.for("react.suspense_list"),qx=Symbol.for("react.memo"),Ki=Symbol.for("react.lazy"),sk=Symbol.for("react.offscreen"),AN=Symbol.iterator;function Ou(t){return t===null||typeof t!="object"?null:(t=AN&&t[AN]||t["@@iterator"],typeof t=="function"?t:null)}var bn=Object.assign,r0;function sf(t){if(r0===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);r0=e&&e[1]||""}return` `+r0+t}var s0=!1;function o0(t,e){if(!t||s0)return"";s0=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(d){var r=d}Reflect.construct(t,[],e)}else{try{e.call()}catch(d){r=d}t.call(e.prototype)}else{try{throw Error()}catch(d){r=d}t()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var s=d.stack.split(` `),o=r.stack.split(` `),a=s.length-1,l=o.length-1;1<=a&&0<=l&&s[a]!==o[l];)l--;for(;1<=a&&0<=l;a--,l--)if(s[a]!==o[l]){if(a!==1||l!==1)do if(a--,l--,0>l||s[a]!==o[l]){var c=` `+s[a].replace(" at new "," at ");return t.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",t.displayName)),c}while(1<=a&&0<=l);break}}}finally{s0=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?sf(t):""}function PU(t){switch(t.tag){case 5:return sf(t.type);case 16:return sf("Lazy");case 13:return sf("Suspense");case 19:return sf("SuspenseList");case 0:case 2:case 15:return t=o0(t.type,!1),t;case 11:return t=o0(t.type.render,!1),t;case 1:return t=o0(t.type,!0),t;default:return""}}function l1(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Uc:return"Fragment";case Bc:return"Portal";case o1:return"Profiler";case Lx:return"StrictMode";case i1:return"Suspense";case a1:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case rk:return(t.displayName||"Context")+".Consumer";case nk:return(t._context.displayName||"Context")+".Provider";case zx:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case qx:return e=t.displayName||null,e!==null?e:l1(t.type)||"Memo";case Ki:e=t._payload,t=t._init;try{return l1(t(e))}catch{}}return null}function OU(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return l1(e);case 8:return e===Lx?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Aa(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ok(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function FU(t){var e=ok(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function sm(t){t._valueTracker||(t._valueTracker=FU(t))}function ik(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=ok(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Lg(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function c1(t,e){var n=e.checked;return bn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function NN(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Aa(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function ak(t,e){e=e.checked,e!=null&&Mx(t,"checked",e,!1)}function d1(t,e){ak(t,e);var n=Aa(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?u1(t,e.type,n):e.hasOwnProperty("defaultValue")&&u1(t,e.type,Aa(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function RN(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function u1(t,e,n){(e!=="number"||Lg(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var of=Array.isArray;function ad(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s<n.length;s++)e["$"+n[s]]=!0;for(n=0;n<t.length;n++)s=e.hasOwnProperty("$"+t[n].value),t[n].selected!==s&&(t[n].selected=s),s&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Aa(n),e=null,s=0;s<t.length;s++){if(t[s].value===n){t[s].selected=!0,r&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function f1(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(_e(91));return bn({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function PN(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(_e(92));if(of(n)){if(1<n.length)throw Error(_e(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Aa(n)}}function lk(t,e){var n=Aa(e.value),r=Aa(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function ON(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function ck(t){switch(t){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 h1(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?ck(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var om,dk=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,s){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(om=om||document.createElement("div"),om.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=om.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Qf(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var _f={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},DU=["Webkit","ms","Moz","O"];Object.keys(_f).forEach(function(t){DU.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),_f[e]=_f[t]})});function uk(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||_f.hasOwnProperty(t)&&_f[t]?(""+e).trim():e+"px"}function fk(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=uk(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var kU=bn({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 p1(t,e){if(e){if(kU[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(_e(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(_e(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(_e(61))}if(e.style!=null&&typeof e.style!="object")throw Error(_e(62))}}function m1(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var g1=null;function jx(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var y1=null,ld=null,cd=null;function FN(t){if(t=tp(t)){if(typeof y1!="function")throw Error(_e(280));var e=t.stateNode;e&&(e=mb(e),y1(t.stateNode,t.type,e))}}function hk(t){ld?cd?cd.push(t):cd=[t]:ld=t}function pk(){if(ld){var t=ld,e=cd;if(cd=ld=null,FN(t),e)for(t=0;t<e.length;t++)FN(e[t])}}function mk(t,e){return t(e)}function gk(){}var i0=!1;function yk(t,e,n){if(i0)return t(e,n);i0=!0;try{return mk(t,e,n)}finally{i0=!1,(ld!==null||cd!==null)&&(gk(),pk())}}function eh(t,e){var n=t.stateNode;if(n===null)return null;var r=mb(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(_e(231,e,typeof n));return n}var b1=!1;if(Ci)try{var Fu={};Object.defineProperty(Fu,"passive",{get:function(){b1=!0}}),window.addEventListener("test",Fu,Fu),window.removeEventListener("test",Fu,Fu)}catch{b1=!1}function TU(t,e,n,r,s,o,a,l,c){var d=Array.prototype.slice.call(arguments,3);try{e.apply(n,d)}catch(u){this.onError(u)}}var wf=!1,zg=null,qg=!1,v1=null,IU={onError:function(t){wf=!0,zg=t}};function MU(t,e,n,r,s,o,a,l,c){wf=!1,zg=null,TU.apply(IU,arguments)}function LU(t,e,n,r,s,o,a,l,c){if(MU.apply(this,arguments),wf){if(wf){var d=zg;wf=!1,zg=null}else throw Error(_e(198));qg||(qg=!0,v1=d)}}function tc(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function bk(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function DN(t){if(tc(t)!==t)throw Error(_e(188))}function zU(t){var e=t.alternate;if(!e){if(e=tc(t),e===null)throw Error(_e(188));return e!==t?null:t}for(var n=t,r=e;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return DN(s),t;if(o===r)return DN(s),e;o=o.sibling}throw Error(_e(188))}if(n.return!==r.return)n=s,r=o;else{for(var a=!1,l=s.child;l;){if(l===n){a=!0,n=s,r=o;break}if(l===r){a=!0,r=s,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,r=s;break}if(l===r){a=!0,r=o,n=s;break}l=l.sibling}if(!a)throw Error(_e(189))}}if(n.alternate!==r)throw Error(_e(190))}if(n.tag!==3)throw Error(_e(188));return n.stateNode.current===n?t:e}function vk(t){return t=zU(t),t!==null?_k(t):null}function _k(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=_k(t);if(e!==null)return e;t=t.sibling}return null}var wk=ns.unstable_scheduleCallback,kN=ns.unstable_cancelCallback,qU=ns.unstable_shouldYield,jU=ns.unstable_requestPaint,Rn=ns.unstable_now,$U=ns.unstable_getCurrentPriorityLevel,$x=ns.unstable_ImmediatePriority,xk=ns.unstable_UserBlockingPriority,jg=ns.unstable_NormalPriority,BU=ns.unstable_LowPriority,Ck=ns.unstable_IdlePriority,ub=null,go=null;function UU(t){if(go&&typeof go.onCommitFiberRoot=="function")try{go.onCommitFiberRoot(ub,t,void 0,(t.current.flags&128)===128)}catch{}}var Vs=Math.clz32?Math.clz32:GU,YU=Math.log,HU=Math.LN2;function GU(t){return t>>>=0,t===0?32:31-(YU(t)/HU|0)|0}var im=64,am=4194304;function af(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function $g(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,o=t.pingedLanes,a=n&268435455;if(a!==0){var l=a&~s;l!==0?r=af(l):(o&=a,o!==0&&(r=af(o)))}else a=n&~s,a!==0?r=af(a):o!==0&&(r=af(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,o=e&-e,s>=o||s===16&&(o&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Vs(e),s=1<<n,r|=t[n],e&=~s;return r}function WU(t,e){switch(t){case 1:case 2:case 4:return e+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 e+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 VU(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,s=t.expirationTimes,o=t.pendingLanes;0<o;){var a=31-Vs(o),l=1<<a,c=s[a];c===-1?(!(l&n)||l&r)&&(s[a]=WU(l,e)):c<=e&&(t.expiredLanes|=l),o&=~l}}function _1(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Ek(){var t=im;return im<<=1,!(im&4194240)&&(im=64),t}function a0(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Qh(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Vs(e),t[e]=n}function KU(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var s=31-Vs(n),o=1<<s;e[s]=0,r[s]=-1,t[s]=-1,n&=~o}}function Bx(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Vs(n),s=1<<r;s&e|t[r]&e&&(t[r]|=e),n&=~s}}var kt=0;function Sk(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Ak,Ux,Nk,Rk,Pk,w1=!1,lm=[],ua=null,fa=null,ha=null,th=new Map,nh=new Map,Qi=[],ZU="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 TN(t,e){switch(t){case"focusin":case"focusout":ua=null;break;case"dragenter":case"dragleave":fa=null;break;case"mouseover":case"mouseout":ha=null;break;case"pointerover":case"pointerout":th.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":nh.delete(e.pointerId)}}function Du(t,e,n,r,s,o){return t===null||t.nativeEvent!==o?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},e!==null&&(e=tp(e),e!==null&&Ux(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function JU(t,e,n,r,s){switch(e){case"focusin":return ua=Du(ua,t,e,n,r,s),!0;case"dragenter":return fa=Du(fa,t,e,n,r,s),!0;case"mouseover":return ha=Du(ha,t,e,n,r,s),!0;case"pointerover":var o=s.pointerId;return th.set(o,Du(th.get(o)||null,t,e,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,nh.set(o,Du(nh.get(o)||null,t,e,n,r,s)),!0}return!1}function Ok(t){var e=bl(t.target);if(e!==null){var n=tc(e);if(n!==null){if(e=n.tag,e===13){if(e=bk(n),e!==null){t.blockedOn=e,Pk(t.priority,function(){Nk(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ag(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=x1(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);g1=r,n.target.dispatchEvent(r),g1=null}else return e=tp(n),e!==null&&Ux(e),t.blockedOn=n,!1;e.shift()}return!0}function IN(t,e,n){ag(t)&&n.delete(e)}function XU(){w1=!1,ua!==null&&ag(ua)&&(ua=null),fa!==null&&ag(fa)&&(fa=null),ha!==null&&ag(ha)&&(ha=null),th.forEach(IN),nh.forEach(IN)}function ku(t,e){t.blockedOn===e&&(t.blockedOn=null,w1||(w1=!0,ns.unstable_scheduleCallback(ns.unstable_NormalPriority,XU)))}function rh(t){function e(s){return ku(s,t)}if(0<lm.length){ku(lm[0],t);for(var n=1;n<lm.length;n++){var r=lm[n];r.blockedOn===t&&(r.blockedOn=null)}}for(ua!==null&&ku(ua,t),fa!==null&&ku(fa,t),ha!==null&&ku(ha,t),th.forEach(e),nh.forEach(e),n=0;n<Qi.length;n++)r=Qi[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Qi.length&&(n=Qi[0],n.blockedOn===null);)Ok(n),n.blockedOn===null&&Qi.shift()}var dd=ki.ReactCurrentBatchConfig,Bg=!0;function QU(t,e,n,r){var s=kt,o=dd.transition;dd.transition=null;try{kt=1,Yx(t,e,n,r)}finally{kt=s,dd.transition=o}}function eY(t,e,n,r){var s=kt,o=dd.transition;dd.transition=null;try{kt=4,Yx(t,e,n,r)}finally{kt=s,dd.transition=o}}function Yx(t,e,n,r){if(Bg){var s=x1(t,e,n,r);if(s===null)y0(t,e,r,Ug,n),TN(t,r);else if(JU(s,t,e,n,r))r.stopPropagation();else if(TN(t,r),e&4&&-1<ZU.indexOf(t)){for(;s!==null;){var o=tp(s);if(o!==null&&Ak(o),o=x1(t,e,n,r),o===null&&y0(t,e,r,Ug,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else y0(t,e,r,null,n)}}var Ug=null;function x1(t,e,n,r){if(Ug=null,t=jx(r),t=bl(t),t!==null)if(e=tc(t),e===null)t=null;else if(n=e.tag,n===13){if(t=bk(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Ug=t,null}function Fk(t){switch(t){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($U()){case $x:return 1;case xk:return 4;case jg:case BU:return 16;case Ck:return 536870912;default:return 16}default:return 16}}var na=null,Hx=null,lg=null;function Dk(){if(lg)return lg;var t,e=Hx,n=e.length,r,s="value"in na?na.value:na.textContent,o=s.length;for(t=0;t<n&&e[t]===s[t];t++);var a=n-t;for(r=1;r<=a&&e[n-r]===s[o-r];r++);return lg=s.slice(t,1<r?1-r:void 0)}function cg(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function cm(){return!0}function MN(){return!1}function is(t){function e(n,r,s,o,a){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var l in t)t.hasOwnProperty(l)&&(n=t[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?cm:MN,this.isPropagationStopped=MN,this}return bn(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=cm)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=cm)},persist:function(){},isPersistent:cm}),e}var eu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gx=is(eu),ep=bn({},eu,{view:0,detail:0}),tY=is(ep),l0,c0,Tu,fb=bn({},ep,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wx,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Tu&&(Tu&&t.type==="mousemove"?(l0=t.screenX-Tu.screenX,c0=t.screenY-Tu.screenY):c0=l0=0,Tu=t),l0)},movementY:function(t){return"movementY"in t?t.movementY:c0}}),LN=is(fb),nY=bn({},fb,{dataTransfer:0}),rY=is(nY),sY=bn({},ep,{relatedTarget:0}),d0=is(sY),oY=bn({},eu,{animationName:0,elapsedTime:0,pseudoElement:0}),iY=is(oY),aY=bn({},eu,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),lY=is(aY),cY=bn({},eu,{data:0}),zN=is(cY),dY={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uY={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"},fY={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hY(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=fY[t])?!!e[t]:!1}function Wx(){return hY}var pY=bn({},ep,{key:function(t){if(t.key){var e=dY[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=cg(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?uY[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wx,charCode:function(t){return t.type==="keypress"?cg(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?cg(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),mY=is(pY),gY=bn({},fb,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qN=is(gY),yY=bn({},ep,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wx}),bY=is(yY),vY=bn({},eu,{propertyName:0,elapsedTime:0,pseudoElement:0}),_Y=is(vY),wY=bn({},fb,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),xY=is(wY),CY=[9,13,27,32],Vx=Ci&&"CompositionEvent"in window,xf=null;Ci&&"documentMode"in document&&(xf=document.documentMode);var EY=Ci&&"TextEvent"in window&&!xf,kk=Ci&&(!Vx||xf&&8<xf&&11>=xf),jN=String.fromCharCode(32),$N=!1;function Tk(t,e){switch(t){case"keyup":return CY.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ik(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Yc=!1;function SY(t,e){switch(t){case"compositionend":return Ik(e);case"keypress":return e.which!==32?null:($N=!0,jN);case"textInput":return t=e.data,t===jN&&$N?null:t;default:return null}}function AY(t,e){if(Yc)return t==="compositionend"||!Vx&&Tk(t,e)?(t=Dk(),lg=Hx=na=null,Yc=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return kk&&e.locale!=="ko"?null:e.data;default:return null}}var NY={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 BN(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!NY[t.type]:e==="textarea"}function Mk(t,e,n,r){hk(r),e=Yg(e,"onChange"),0<e.length&&(n=new Gx("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Cf=null,sh=null;function RY(t){Wk(t,0)}function hb(t){var e=Wc(t);if(ik(e))return t}function PY(t,e){if(t==="change")return e}var Lk=!1;if(Ci){var u0;if(Ci){var f0="oninput"in document;if(!f0){var UN=document.createElement("div");UN.setAttribute("oninput","return;"),f0=typeof UN.oninput=="function"}u0=f0}else u0=!1;Lk=u0&&(!document.documentMode||9<document.documentMode)}function YN(){Cf&&(Cf.detachEvent("onpropertychange",zk),sh=Cf=null)}function zk(t){if(t.propertyName==="value"&&hb(sh)){var e=[];Mk(e,sh,t,jx(t)),yk(RY,e)}}function OY(t,e,n){t==="focusin"?(YN(),Cf=e,sh=n,Cf.attachEvent("onpropertychange",zk)):t==="focusout"&&YN()}function FY(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return hb(sh)}function DY(t,e){if(t==="click")return hb(e)}function kY(t,e){if(t==="input"||t==="change")return hb(e)}function TY(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Xs=typeof Object.is=="function"?Object.is:TY;function oh(t,e){if(Xs(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!s1.call(e,s)||!Xs(t[s],e[s]))return!1}return!0}function HN(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function GN(t,e){var n=HN(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=HN(n)}}function qk(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?qk(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function jk(){for(var t=window,e=Lg();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Lg(t.document)}return e}function Kx(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function IY(t){var e=jk(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&qk(n.ownerDocument.documentElement,n)){if(r!==null&&Kx(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!t.extend&&o>r&&(s=r,r=o,o=s),s=GN(n,o);var a=GN(n,r);s&&a&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var MY=Ci&&"documentMode"in document&&11>=document.documentMode,Hc=null,C1=null,Ef=null,E1=!1;function WN(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;E1||Hc==null||Hc!==Lg(r)||(r=Hc,"selectionStart"in r&&Kx(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ef&&oh(Ef,r)||(Ef=r,r=Yg(C1,"onSelect"),0<r.length&&(e=new Gx("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=Hc)))}function dm(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Gc={animationend:dm("Animation","AnimationEnd"),animationiteration:dm("Animation","AnimationIteration"),animationstart:dm("Animation","AnimationStart"),transitionend:dm("Transition","TransitionEnd")},h0={},$k={};Ci&&($k=document.createElement("div").style,"AnimationEvent"in window||(delete Gc.animationend.animation,delete Gc.animationiteration.animation,delete Gc.animationstart.animation),"TransitionEvent"in window||delete Gc.transitionend.transition);function pb(t){if(h0[t])return h0[t];if(!Gc[t])return t;var e=Gc[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in $k)return h0[t]=e[n];return t}var Bk=pb("animationend"),Uk=pb("animationiteration"),Yk=pb("animationstart"),Hk=pb("transitionend"),Gk=new Map,VN="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 qa(t,e){Gk.set(t,e),ec(e,[t])}for(var p0=0;p0<VN.length;p0++){var m0=VN[p0],LY=m0.toLowerCase(),zY=m0[0].toUpperCase()+m0.slice(1);qa(LY,"on"+zY)}qa(Bk,"onAnimationEnd");qa(Uk,"onAnimationIteration");qa(Yk,"onAnimationStart");qa("dblclick","onDoubleClick");qa("focusin","onFocus");qa("focusout","onBlur");qa(Hk,"onTransitionEnd");Ad("onMouseEnter",["mouseout","mouseover"]);Ad("onMouseLeave",["mouseout","mouseover"]);Ad("onPointerEnter",["pointerout","pointerover"]);Ad("onPointerLeave",["pointerout","pointerover"]);ec("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ec("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ec("onBeforeInput",["compositionend","keypress","textInput","paste"]);ec("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ec("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ec("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lf="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(" "),qY=new Set("cancel close invalid load scroll toggle".split(" ").concat(lf));function KN(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,LU(r,e,void 0,t),t.currentTarget=null}function Wk(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],s=r.event;r=r.listeners;e:{var o=void 0;if(e)for(var a=r.length-1;0<=a;a--){var l=r[a],c=l.instance,d=l.currentTarget;if(l=l.listener,c!==o&&s.isPropagationStopped())break e;KN(s,l,d),o=c}else for(a=0;a<r.length;a++){if(l=r[a],c=l.instance,d=l.currentTarget,l=l.listener,c!==o&&s.isPropagationStopped())break e;KN(s,l,d),o=c}}}if(qg)throw t=v1,qg=!1,v1=null,t}function Qt(t,e){var n=e[P1];n===void 0&&(n=e[P1]=new Set);var r=t+"__bubble";n.has(r)||(Vk(e,t,2,!1),n.add(r))}function g0(t,e,n){var r=0;e&&(r|=4),Vk(n,t,r,e)}var um="_reactListening"+Math.random().toString(36).slice(2);function ih(t){if(!t[um]){t[um]=!0,tk.forEach(function(n){n!=="selectionchange"&&(qY.has(n)||g0(n,!1,t),g0(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[um]||(e[um]=!0,g0("selectionchange",!1,e))}}function Vk(t,e,n,r){switch(Fk(e)){case 1:var s=QU;break;case 4:s=eY;break;default:s=Yx}n=s.bind(null,e,n,t),s=void 0,!b1||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),r?s!==void 0?t.addEventListener(e,n,{capture:!0,passive:s}):t.addEventListener(e,n,!0):s!==void 0?t.addEventListener(e,n,{passive:s}):t.addEventListener(e,n,!1)}function y0(t,e,n,r,s){var o=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(a===4)for(a=r.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;a=a.return}for(;l!==null;){if(a=bl(l),a===null)return;if(c=a.tag,c===5||c===6){r=o=a;continue e}l=l.parentNode}}r=r.return}yk(function(){var d=o,u=jx(n),f=[];e:{var g=Gk.get(t);if(g!==void 0){var E=Gx,S=t;switch(t){case"keypress":if(cg(n)===0)break e;case"keydown":case"keyup":E=mY;break;case"focusin":S="focus",E=d0;break;case"focusout":S="blur",E=d0;break;case"beforeblur":case"afterblur":E=d0;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":E=LN;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":E=rY;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":E=bY;break;case Bk:case Uk:case Yk:E=iY;break;case Hk:E=_Y;break;case"scroll":E=tY;break;case"wheel":E=xY;break;case"copy":case"cut":case"paste":E=lY;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":E=qN}var w=(e&4)!==0,_=!w&&t==="scroll",h=w?g!==null?g+"Capture":null:g;w=[];for(var m=d,A;m!==null;){A=m;var k=A.stateNode;if(A.tag===5&&k!==null&&(A=k,h!==null&&(k=eh(m,h),k!=null&&w.push(ah(m,k,A)))),_)break;m=m.return}0<w.length&&(g=new E(g,S,null,n,u),f.push({event:g,listeners:w}))}}if(!(e&7)){e:{if(g=t==="mouseover"||t==="pointerover",E=t==="mouseout"||t==="pointerout",g&&n!==g1&&(S=n.relatedTarget||n.fromElement)&&(bl(S)||S[Ei]))break e;if((E||g)&&(g=u.window===u?u:(g=u.ownerDocument)?g.defaultView||g.parentWindow:window,E?(S=n.relatedTarget||n.toElement,E=d,S=S?bl(S):null,S!==null&&(_=tc(S),S!==_||S.tag!==5&&S.tag!==6)&&(S=null)):(E=null,S=d),E!==S)){if(w=LN,k="onMouseLeave",h="onMouseEnter",m="mouse",(t==="pointerout"||t==="pointerover")&&(w=qN,k="onPointerLeave",h="onPointerEnter",m="pointer"),_=E==null?g:Wc(E),A=S==null?g:Wc(S),g=new w(k,m+"leave",E,n,u),g.target=_,g.relatedTarget=A,k=null,bl(u)===d&&(w=new w(h,m+"enter",S,n,u),w.target=A,w.relatedTarget=_,k=w),_=k,E&&S)t:{for(w=E,h=S,m=0,A=w;A;A=gc(A))m++;for(A=0,k=h;k;k=gc(k))A++;for(;0<m-A;)w=gc(w),m--;for(;0<A-m;)h=gc(h),A--;for(;m--;){if(w===h||h!==null&&w===h.alternate)break t;w=gc(w),h=gc(h)}w=null}else w=null;E!==null&&ZN(f,g,E,w,!1),S!==null&&_!==null&&ZN(f,_,S,w,!0)}}e:{if(g=d?Wc(d):window,E=g.nodeName&&g.nodeName.toLowerCase(),E==="select"||E==="input"&&g.type==="file")var R=PY;else if(BN(g))if(Lk)R=kY;else{R=FY;var O=OY}else(E=g.nodeName)&&E.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(R=DY);if(R&&(R=R(t,d))){Mk(f,R,n,u);break e}O&&O(t,g,d),t==="focusout"&&(O=g._wrapperState)&&O.controlled&&g.type==="number"&&u1(g,"number",g.value)}switch(O=d?Wc(d):window,t){case"focusin":(BN(O)||O.contentEditable==="true")&&(Hc=O,C1=d,Ef=null);break;case"focusout":Ef=C1=Hc=null;break;case"mousedown":E1=!0;break;case"contextmenu":case"mouseup":case"dragend":E1=!1,WN(f,n,u);break;case"selectionchange":if(MY)break;case"keydown":case"keyup":WN(f,n,u)}var N;if(Vx)e:{switch(t){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else Yc?Tk(t,n)&&(y="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(y="onCompositionStart");y&&(kk&&n.locale!=="ko"&&(Yc||y!=="onCompositionStart"?y==="onCompositionEnd"&&Yc&&(N=Dk()):(na=u,Hx="value"in na?na.value:na.textContent,Yc=!0)),O=Yg(d,y),0<O.length&&(y=new zN(y,t,null,n,u),f.push({event:y,listeners:O}),N?y.data=N:(N=Ik(n),N!==null&&(y.data=N)))),(N=EY?SY(t,n):AY(t,n))&&(d=Yg(d,"onBeforeInput"),0<d.length&&(u=new zN("onBeforeInput","beforeinput",null,n,u),f.push({event:u,listeners:d}),u.data=N))}Wk(f,e)})}function ah(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Yg(t,e){for(var n=e+"Capture",r=[];t!==null;){var s=t,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=eh(t,n),o!=null&&r.unshift(ah(t,o,s)),o=eh(t,e),o!=null&&r.push(ah(t,o,s))),t=t.return}return r}function gc(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function ZN(t,e,n,r,s){for(var o=e._reactName,a=[];n!==null&&n!==r;){var l=n,c=l.alternate,d=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&d!==null&&(l=d,s?(c=eh(n,o),c!=null&&a.unshift(ah(n,c,l))):s||(c=eh(n,o),c!=null&&a.push(ah(n,c,l)))),n=n.return}a.length!==0&&t.push({event:e,listeners:a})}var jY=/\r\n?/g,$Y=/\u0000|\uFFFD/g;function JN(t){return(typeof t=="string"?t:""+t).replace(jY,` `).replace($Y,"")}function fm(t,e,n){if(e=JN(e),JN(t)!==e&&n)throw Error(_e(425))}function Hg(){}var S1=null,A1=null;function N1(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var R1=typeof setTimeout=="function"?setTimeout:void 0,BY=typeof clearTimeout=="function"?clearTimeout:void 0,XN=typeof Promise=="function"?Promise:void 0,UY=typeof queueMicrotask=="function"?queueMicrotask:typeof XN<"u"?function(t){return XN.resolve(null).then(t).catch(YY)}:R1;function YY(t){setTimeout(function(){throw t})}function b0(t,e){var n=e,r=0;do{var s=n.nextSibling;if(t.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){t.removeChild(s),rh(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);rh(e)}function pa(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function QN(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var tu=Math.random().toString(36).slice(2),ho="__reactFiber$"+tu,lh="__reactProps$"+tu,Ei="__reactContainer$"+tu,P1="__reactEvents$"+tu,HY="__reactListeners$"+tu,GY="__reactHandles$"+tu;function bl(t){var e=t[ho];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Ei]||n[ho]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=QN(t);t!==null;){if(n=t[ho])return n;t=QN(t)}return e}t=n,n=t.parentNode}return null}function tp(t){return t=t[ho]||t[Ei],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Wc(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(_e(33))}function mb(t){return t[lh]||null}var O1=[],Vc=-1;function ja(t){return{current:t}}function sn(t){0>Vc||(t.current=O1[Vc],O1[Vc]=null,Vc--)}function Gt(t,e){Vc++,O1[Vc]=t.current,t.current=e}var Na={},mr=ja(Na),jr=ja(!1),Ll=Na;function Nd(t,e){var n=t.type.contextTypes;if(!n)return Na;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function $r(t){return t=t.childContextTypes,t!=null}function Gg(){sn(jr),sn(mr)}function eR(t,e,n){if(mr.current!==Na)throw Error(_e(168));Gt(mr,e),Gt(jr,n)}function Kk(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(_e(108,OU(t)||"Unknown",s));return bn({},n,r)}function Wg(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Na,Ll=mr.current,Gt(mr,t),Gt(jr,jr.current),!0}function tR(t,e,n){var r=t.stateNode;if(!r)throw Error(_e(169));n?(t=Kk(t,e,Ll),r.__reactInternalMemoizedMergedChildContext=t,sn(jr),sn(mr),Gt(mr,t)):sn(jr),Gt(jr,n)}var Wo=null,gb=!1,v0=!1;function Zk(t){Wo===null?Wo=[t]:Wo.push(t)}function WY(t){gb=!0,Zk(t)}function $a(){if(!v0&&Wo!==null){v0=!0;var t=0,e=kt;try{var n=Wo;for(kt=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Wo=null,gb=!1}catch(s){throw Wo!==null&&(Wo=Wo.slice(t+1)),wk($x,$a),s}finally{kt=e,v0=!1}}return null}var Kc=[],Zc=0,Vg=null,Kg=0,hs=[],ps=0,zl=null,ei=1,ti="";function cl(t,e){Kc[Zc++]=Kg,Kc[Zc++]=Vg,Vg=t,Kg=e}function Jk(t,e,n){hs[ps++]=ei,hs[ps++]=ti,hs[ps++]=zl,zl=t;var r=ei;t=ti;var s=32-Vs(r)-1;r&=~(1<<s),n+=1;var o=32-Vs(e)+s;if(30<o){var a=s-s%5;o=(r&(1<<a)-1).toString(32),r>>=a,s-=a,ei=1<<32-Vs(e)+s|n<<s|r,ti=o+t}else ei=1<<o|n<<s|r,ti=t}function Zx(t){t.return!==null&&(cl(t,1),Jk(t,1,0))}function Jx(t){for(;t===Vg;)Vg=Kc[--Zc],Kc[Zc]=null,Kg=Kc[--Zc],Kc[Zc]=null;for(;t===zl;)zl=hs[--ps],hs[ps]=null,ti=hs[--ps],hs[ps]=null,ei=hs[--ps],hs[ps]=null}var es=null,Qr=null,hn=!1,zs=null;function Xk(t,e){var n=ys(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function nR(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,es=t,Qr=pa(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,es=t,Qr=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=zl!==null?{id:ei,overflow:ti}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=ys(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,es=t,Qr=null,!0):!1;default:return!1}}function F1(t){return(t.mode&1)!==0&&(t.flags&128)===0}function D1(t){if(hn){var e=Qr;if(e){var n=e;if(!nR(t,e)){if(F1(t))throw Error(_e(418));e=pa(n.nextSibling);var r=es;e&&nR(t,e)?Xk(r,n):(t.flags=t.flags&-4097|2,hn=!1,es=t)}}else{if(F1(t))throw Error(_e(418));t.flags=t.flags&-4097|2,hn=!1,es=t}}}function rR(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;es=t}function hm(t){if(t!==es)return!1;if(!hn)return rR(t),hn=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!N1(t.type,t.memoizedProps)),e&&(e=Qr)){if(F1(t))throw Qk(),Error(_e(418));for(;e;)Xk(t,e),e=pa(e.nextSibling)}if(rR(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(_e(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){Qr=pa(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}Qr=null}}else Qr=es?pa(t.stateNode.nextSibling):null;return!0}function Qk(){for(var t=Qr;t;)t=pa(t.nextSibling)}function Rd(){Qr=es=null,hn=!1}function Xx(t){zs===null?zs=[t]:zs.push(t)}var VY=ki.ReactCurrentBatchConfig;function Is(t,e){if(t&&t.defaultProps){e=bn({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}var Zg=ja(null),Jg=null,Jc=null,Qx=null;function eC(){Qx=Jc=Jg=null}function tC(t){var e=Zg.current;sn(Zg),t._currentValue=e}function k1(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function ud(t,e){Jg=t,Qx=Jc=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Lr=!0),t.firstContext=null)}function ws(t){var e=t._currentValue;if(Qx!==t)if(t={context:t,memoizedValue:e,next:null},Jc===null){if(Jg===null)throw Error(_e(308));Jc=t,Jg.dependencies={lanes:0,firstContext:t}}else Jc=Jc.next=t;return e}var vl=null;function nC(t){vl===null?vl=[t]:vl.push(t)}function eT(t,e,n,r){var s=e.interleaved;return s===null?(n.next=n,nC(e)):(n.next=s.next,s.next=n),e.interleaved=n,Si(t,r)}function Si(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Zi=!1;function rC(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function tT(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function pi(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ma(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Et&2){var s=r.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),r.pending=e,Si(t,n)}return s=r.interleaved,s===null?(e.next=e,nC(r)):(e.next=s.next,s.next=e),r.interleaved=e,Si(t,n)}function dg(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Bx(t,n)}}function sR(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?s=o=e:o=o.next=e}else s=o=e;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Xg(t,e,n,r){var s=t.updateQueue;Zi=!1;var o=s.firstBaseUpdate,a=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,d=c.next;c.next=null,a===null?o=d:a.next=d,a=c;var u=t.alternate;u!==null&&(u=u.updateQueue,l=u.lastBaseUpdate,l!==a&&(l===null?u.firstBaseUpdate=d:l.next=d,u.lastBaseUpdate=c))}if(o!==null){var f=s.baseState;a=0,u=d=c=null,l=o;do{var g=l.lane,E=l.eventTime;if((r&g)===g){u!==null&&(u=u.next={eventTime:E,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var S=t,w=l;switch(g=e,E=n,w.tag){case 1:if(S=w.payload,typeof S=="function"){f=S.call(E,f,g);break e}f=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=w.payload,g=typeof S=="function"?S.call(E,f,g):S,g==null)break e;f=bn({},f,g);break e;case 2:Zi=!0}}l.callback!==null&&l.lane!==0&&(t.flags|=64,g=s.effects,g===null?s.effects=[l]:g.push(l))}else E={eventTime:E,lane:g,tag:l.tag,payload:l.payload,callback:l.callback,next:null},u===null?(d=u=E,c=f):u=u.next=E,a|=g;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;g=l,l=g.next,g.next=null,s.lastBaseUpdate=g,s.shared.pending=null}}while(1);if(u===null&&(c=f),s.baseState=c,s.firstBaseUpdate=d,s.lastBaseUpdate=u,e=s.shared.interleaved,e!==null){s=e;do a|=s.lane,s=s.next;while(s!==e)}else o===null&&(s.shared.lanes=0);jl|=a,t.lanes=a,t.memoizedState=f}}function oR(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(_e(191,s));s.call(r)}}}var nT=new ek.Component().refs;function T1(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:bn({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var yb={isMounted:function(t){return(t=t._reactInternals)?tc(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Sr(),s=ya(t),o=pi(r,s);o.payload=e,n!=null&&(o.callback=n),e=ma(t,o,s),e!==null&&(Ks(e,t,s,r),dg(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Sr(),s=ya(t),o=pi(r,s);o.tag=1,o.payload=e,n!=null&&(o.callback=n),e=ma(t,o,s),e!==null&&(Ks(e,t,s,r),dg(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Sr(),r=ya(t),s=pi(n,r);s.tag=2,e!=null&&(s.callback=e),e=ma(t,s,r),e!==null&&(Ks(e,t,r,n),dg(e,t,r))}};function iR(t,e,n,r,s,o,a){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,o,a):e.prototype&&e.prototype.isPureReactComponent?!oh(n,r)||!oh(s,o):!0}function rT(t,e,n){var r=!1,s=Na,o=e.contextType;return typeof o=="object"&&o!==null?o=ws(o):(s=$r(e)?Ll:mr.current,r=e.contextTypes,o=(r=r!=null)?Nd(t,s):Na),e=new e(n,o),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=yb,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=o),e}function aR(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&yb.enqueueReplaceState(e,e.state,null)}function I1(t,e,n,r){var s=t.stateNode;s.props=n,s.state=t.memoizedState,s.refs=nT,rC(t);var o=e.contextType;typeof o=="object"&&o!==null?s.context=ws(o):(o=$r(e)?Ll:mr.current,s.context=Nd(t,o)),s.state=t.memoizedState,o=e.getDerivedStateFromProps,typeof o=="function"&&(T1(t,e,o,n),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&yb.enqueueReplaceState(s,s.state,null),Xg(t,n,s,r),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function Iu(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(_e(309));var r=n.stateNode}if(!r)throw Error(_e(147,t));var s=r,o=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===o?e.ref:(e=function(a){var l=s.refs;l===nT&&(l=s.refs={}),a===null?delete l[o]:l[o]=a},e._stringRef=o,e)}if(typeof t!="string")throw Error(_e(284));if(!n._owner)throw Error(_e(290,t))}return t}function pm(t,e){throw t=Object.prototype.toString.call(e),Error(_e(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function lR(t){var e=t._init;return e(t._payload)}function sT(t){function e(h,m){if(t){var A=h.deletions;A===null?(h.deletions=[m],h.flags|=16):A.push(m)}}function n(h,m){if(!t)return null;for(;m!==null;)e(h,m),m=m.sibling;return null}function r(h,m){for(h=new Map;m!==null;)m.key!==null?h.set(m.key,m):h.set(m.index,m),m=m.sibling;return h}function s(h,m){return h=ba(h,m),h.index=0,h.sibling=null,h}function o(h,m,A){return h.index=A,t?(A=h.alternate,A!==null?(A=A.index,A<m?(h.flags|=2,m):A):(h.flags|=2,m)):(h.flags|=1048576,m)}function a(h){return t&&h.alternate===null&&(h.flags|=2),h}function l(h,m,A,k){return m===null||m.tag!==6?(m=A0(A,h.mode,k),m.return=h,m):(m=s(m,A),m.return=h,m)}function c(h,m,A,k){var R=A.type;return R===Uc?u(h,m,A.props.children,k,A.key):m!==null&&(m.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ki&&lR(R)===m.type)?(k=s(m,A.props),k.ref=Iu(h,m,A),k.return=h,k):(k=gg(A.type,A.key,A.props,null,h.mode,k),k.ref=Iu(h,m,A),k.return=h,k)}function d(h,m,A,k){return m===null||m.tag!==4||m.stateNode.containerInfo!==A.containerInfo||m.stateNode.implementation!==A.implementation?(m=N0(A,h.mode,k),m.return=h,m):(m=s(m,A.children||[]),m.return=h,m)}function u(h,m,A,k,R){return m===null||m.tag!==7?(m=Rl(A,h.mode,k,R),m.return=h,m):(m=s(m,A),m.return=h,m)}function f(h,m,A){if(typeof m=="string"&&m!==""||typeof m=="number")return m=A0(""+m,h.mode,A),m.return=h,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case rm:return A=gg(m.type,m.key,m.props,null,h.mode,A),A.ref=Iu(h,null,m),A.return=h,A;case Bc:return m=N0(m,h.mode,A),m.return=h,m;case Ki:var k=m._init;return f(h,k(m._payload),A)}if(of(m)||Ou(m))return m=Rl(m,h.mode,A,null),m.return=h,m;pm(h,m)}return null}function g(h,m,A,k){var R=m!==null?m.key:null;if(typeof A=="string"&&A!==""||typeof A=="number")return R!==null?null:l(h,m,""+A,k);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case rm:return A.key===R?c(h,m,A,k):null;case Bc:return A.key===R?d(h,m,A,k):null;case Ki:return R=A._init,g(h,m,R(A._payload),k)}if(of(A)||Ou(A))return R!==null?null:u(h,m,A,k,null);pm(h,A)}return null}function E(h,m,A,k,R){if(typeof k=="string"&&k!==""||typeof k=="number")return h=h.get(A)||null,l(m,h,""+k,R);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case rm:return h=h.get(k.key===null?A:k.key)||null,c(m,h,k,R);case Bc:return h=h.get(k.key===null?A:k.key)||null,d(m,h,k,R);case Ki:var O=k._init;return E(h,m,A,O(k._payload),R)}if(of(k)||Ou(k))return h=h.get(A)||null,u(m,h,k,R,null);pm(m,k)}return null}function S(h,m,A,k){for(var R=null,O=null,N=m,y=m=0,v=null;N!==null&&y<A.length;y++){N.index>y?(v=N,N=null):v=N.sibling;var b=g(h,N,A[y],k);if(b===null){N===null&&(N=v);break}t&&N&&b.alternate===null&&e(h,N),m=o(b,m,y),O===null?R=b:O.sibling=b,O=b,N=v}if(y===A.length)return n(h,N),hn&&cl(h,y),R;if(N===null){for(;y<A.length;y++)N=f(h,A[y],k),N!==null&&(m=o(N,m,y),O===null?R=N:O.sibling=N,O=N);return hn&&cl(h,y),R}for(N=r(h,N);y<A.length;y++)v=E(N,h,y,A[y],k),v!==null&&(t&&v.alternate!==null&&N.delete(v.key===null?y:v.key),m=o(v,m,y),O===null?R=v:O.sibling=v,O=v);return t&&N.forEach(function(P){return e(h,P)}),hn&&cl(h,y),R}function w(h,m,A,k){var R=Ou(A);if(typeof R!="function")throw Error(_e(150));if(A=R.call(A),A==null)throw Error(_e(151));for(var O=R=null,N=m,y=m=0,v=null,b=A.next();N!==null&&!b.done;y++,b=A.next()){N.index>y?(v=N,N=null):v=N.sibling;var P=g(h,N,b.value,k);if(P===null){N===null&&(N=v);break}t&&N&&P.alternate===null&&e(h,N),m=o(P,m,y),O===null?R=P:O.sibling=P,O=P,N=v}if(b.done)return n(h,N),hn&&cl(h,y),R;if(N===null){for(;!b.done;y++,b=A.next())b=f(h,b.value,k),b!==null&&(m=o(b,m,y),O===null?R=b:O.sibling=b,O=b);return hn&&cl(h,y),R}for(N=r(h,N);!b.done;y++,b=A.next())b=E(N,h,y,b.value,k),b!==null&&(t&&b.alternate!==null&&N.delete(b.key===null?y:b.key),m=o(b,m,y),O===null?R=b:O.sibling=b,O=b);return t&&N.forEach(function(F){return e(h,F)}),hn&&cl(h,y),R}function _(h,m,A,k){if(typeof A=="object"&&A!==null&&A.type===Uc&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case rm:e:{for(var R=A.key,O=m;O!==null;){if(O.key===R){if(R=A.type,R===Uc){if(O.tag===7){n(h,O.sibling),m=s(O,A.props.children),m.return=h,h=m;break e}}else if(O.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ki&&lR(R)===O.type){n(h,O.sibling),m=s(O,A.props),m.ref=Iu(h,O,A),m.return=h,h=m;break e}n(h,O);break}else e(h,O);O=O.sibling}A.type===Uc?(m=Rl(A.props.children,h.mode,k,A.key),m.return=h,h=m):(k=gg(A.type,A.key,A.props,null,h.mode,k),k.ref=Iu(h,m,A),k.return=h,h=k)}return a(h);case Bc:e:{for(O=A.key;m!==null;){if(m.key===O)if(m.tag===4&&m.stateNode.containerInfo===A.containerInfo&&m.stateNode.implementation===A.implementation){n(h,m.sibling),m=s(m,A.children||[]),m.return=h,h=m;break e}else{n(h,m);break}else e(h,m);m=m.sibling}m=N0(A,h.mode,k),m.return=h,h=m}return a(h);case Ki:return O=A._init,_(h,m,O(A._payload),k)}if(of(A))return S(h,m,A,k);if(Ou(A))return w(h,m,A,k);pm(h,A)}return typeof A=="string"&&A!==""||typeof A=="number"?(A=""+A,m!==null&&m.tag===6?(n(h,m.sibling),m=s(m,A),m.return=h,h=m):(n(h,m),m=A0(A,h.mode,k),m.return=h,h=m),a(h)):n(h,m)}return _}var Pd=sT(!0),oT=sT(!1),np={},yo=ja(np),ch=ja(np),dh=ja(np);function _l(t){if(t===np)throw Error(_e(174));return t}function sC(t,e){switch(Gt(dh,e),Gt(ch,t),Gt(yo,np),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:h1(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=h1(e,t)}sn(yo),Gt(yo,e)}function Od(){sn(yo),sn(ch),sn(dh)}function iT(t){_l(dh.current);var e=_l(yo.current),n=h1(e,t.type);e!==n&&(Gt(ch,t),Gt(yo,n))}function oC(t){ch.current===t&&(sn(yo),sn(ch))}var pn=ja(0);function Qg(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var _0=[];function iC(){for(var t=0;t<_0.length;t++)_0[t]._workInProgressVersionPrimary=null;_0.length=0}var ug=ki.ReactCurrentDispatcher,w0=ki.ReactCurrentBatchConfig,ql=0,yn=null,Mn=null,Gn=null,ey=!1,Sf=!1,uh=0,KY=0;function sr(){throw Error(_e(321))}function aC(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Xs(t[n],e[n]))return!1;return!0}function lC(t,e,n,r,s,o){if(ql=o,yn=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,ug.current=t===null||t.memoizedState===null?QY:e8,t=n(r,s),Sf){o=0;do{if(Sf=!1,uh=0,25<=o)throw Error(_e(301));o+=1,Gn=Mn=null,e.updateQueue=null,ug.current=t8,t=n(r,s)}while(Sf)}if(ug.current=ty,e=Mn!==null&&Mn.next!==null,ql=0,Gn=Mn=yn=null,ey=!1,e)throw Error(_e(300));return t}function cC(){var t=uh!==0;return uh=0,t}function uo(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Gn===null?yn.memoizedState=Gn=t:Gn=Gn.next=t,Gn}function xs(){if(Mn===null){var t=yn.alternate;t=t!==null?t.memoizedState:null}else t=Mn.next;var e=Gn===null?yn.memoizedState:Gn.next;if(e!==null)Gn=e,Mn=t;else{if(t===null)throw Error(_e(310));Mn=t,t={memoizedState:Mn.memoizedState,baseState:Mn.baseState,baseQueue:Mn.baseQueue,queue:Mn.queue,next:null},Gn===null?yn.memoizedState=Gn=t:Gn=Gn.next=t}return Gn}function fh(t,e){return typeof e=="function"?e(t):e}function x0(t){var e=xs(),n=e.queue;if(n===null)throw Error(_e(311));n.lastRenderedReducer=t;var r=Mn,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var a=s.next;s.next=o.next,o.next=a}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var l=a=null,c=null,d=o;do{var u=d.lane;if((ql&u)===u)c!==null&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:t(r,d.action);else{var f={lane:u,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};c===null?(l=c=f,a=r):c=c.next=f,yn.lanes|=u,jl|=u}d=d.next}while(d!==null&&d!==o);c===null?a=r:c.next=l,Xs(r,e.memoizedState)||(Lr=!0),e.memoizedState=r,e.baseState=a,e.baseQueue=c,n.lastRenderedState=r}if(t=n.interleaved,t!==null){s=t;do o=s.lane,yn.lanes|=o,jl|=o,s=s.next;while(s!==t)}else s===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function C0(t){var e=xs(),n=e.queue;if(n===null)throw Error(_e(311));n.lastRenderedReducer=t;var r=n.dispatch,s=n.pending,o=e.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do o=t(o,a.action),a=a.next;while(a!==s);Xs(o,e.memoizedState)||(Lr=!0),e.memoizedState=o,e.baseQueue===null&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function aT(){}function lT(t,e){var n=yn,r=xs(),s=e(),o=!Xs(r.memoizedState,s);if(o&&(r.memoizedState=s,Lr=!0),r=r.queue,dC(uT.bind(null,n,r,t),[t]),r.getSnapshot!==e||o||Gn!==null&&Gn.memoizedState.tag&1){if(n.flags|=2048,hh(9,dT.bind(null,n,r,s,e),void 0,null),Zn===null)throw Error(_e(349));ql&30||cT(n,e,s)}return s}function cT(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=yn.updateQueue,e===null?(e={lastEffect:null,stores:null},yn.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function dT(t,e,n,r){e.value=n,e.getSnapshot=r,fT(e)&&hT(t)}function uT(t,e,n){return n(function(){fT(e)&&hT(t)})}function fT(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Xs(t,n)}catch{return!0}}function hT(t){var e=Si(t,1);e!==null&&Ks(e,t,1,-1)}function cR(t){var e=uo();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:fh,lastRenderedState:t},e.queue=t,t=t.dispatch=XY.bind(null,yn,t),[e.memoizedState,t]}function hh(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=yn.updateQueue,e===null?(e={lastEffect:null,stores:null},yn.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function pT(){return xs().memoizedState}function fg(t,e,n,r){var s=uo();yn.flags|=t,s.memoizedState=hh(1|e,n,void 0,r===void 0?null:r)}function bb(t,e,n,r){var s=xs();r=r===void 0?null:r;var o=void 0;if(Mn!==null){var a=Mn.memoizedState;if(o=a.destroy,r!==null&&aC(r,a.deps)){s.memoizedState=hh(e,n,o,r);return}}yn.flags|=t,s.memoizedState=hh(1|e,n,o,r)}function dR(t,e){return fg(8390656,8,t,e)}function dC(t,e){return bb(2048,8,t,e)}function mT(t,e){return bb(4,2,t,e)}function gT(t,e){return bb(4,4,t,e)}function yT(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function bT(t,e,n){return n=n!=null?n.concat([t]):null,bb(4,4,yT.bind(null,e,t),n)}function uC(){}function vT(t,e){var n=xs();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&aC(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function _T(t,e){var n=xs();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&aC(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function wT(t,e,n){return ql&21?(Xs(n,e)||(n=Ek(),yn.lanes|=n,jl|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Lr=!0),t.memoizedState=n)}function ZY(t,e){var n=kt;kt=n!==0&&4>n?n:4,t(!0);var r=w0.transition;w0.transition={};try{t(!1),e()}finally{kt=n,w0.transition=r}}function xT(){return xs().memoizedState}function JY(t,e,n){var r=ya(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},CT(t))ET(e,n);else if(n=eT(t,e,n,r),n!==null){var s=Sr();Ks(n,t,r,s),ST(n,e,r)}}function XY(t,e,n){var r=ya(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(CT(t))ET(e,s);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var a=e.lastRenderedState,l=o(a,n);if(s.hasEagerState=!0,s.eagerState=l,Xs(l,a)){var c=e.interleaved;c===null?(s.next=s,nC(e)):(s.next=c.next,c.next=s),e.interleaved=s;return}}catch{}finally{}n=eT(t,e,s,r),n!==null&&(s=Sr(),Ks(n,t,r,s),ST(n,e,r))}}function CT(t){var e=t.alternate;return t===yn||e!==null&&e===yn}function ET(t,e){Sf=ey=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function ST(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Bx(t,n)}}var ty={readContext:ws,useCallback:sr,useContext:sr,useEffect:sr,useImperativeHandle:sr,useInsertionEffect:sr,useLayoutEffect:sr,useMemo:sr,useReducer:sr,useRef:sr,useState:sr,useDebugValue:sr,useDeferredValue:sr,useTransition:sr,useMutableSource:sr,useSyncExternalStore:sr,useId:sr,unstable_isNewReconciler:!1},QY={readContext:ws,useCallback:function(t,e){return uo().memoizedState=[t,e===void 0?null:e],t},useContext:ws,useEffect:dR,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,fg(4194308,4,yT.bind(null,e,t),n)},useLayoutEffect:function(t,e){return fg(4194308,4,t,e)},useInsertionEffect:function(t,e){return fg(4,2,t,e)},useMemo:function(t,e){var n=uo();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=uo();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=JY.bind(null,yn,t),[r.memoizedState,t]},useRef:function(t){var e=uo();return t={current:t},e.memoizedState=t},useState:cR,useDebugValue:uC,useDeferredValue:function(t){return uo().memoizedState=t},useTransition:function(){var t=cR(!1),e=t[0];return t=ZY.bind(null,t[1]),uo().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=yn,s=uo();if(hn){if(n===void 0)throw Error(_e(407));n=n()}else{if(n=e(),Zn===null)throw Error(_e(349));ql&30||cT(r,e,n)}s.memoizedState=n;var o={value:n,getSnapshot:e};return s.queue=o,dR(uT.bind(null,r,o,t),[t]),r.flags|=2048,hh(9,dT.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=uo(),e=Zn.identifierPrefix;if(hn){var n=ti,r=ei;n=(r&~(1<<32-Vs(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=uh++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=KY++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},e8={readContext:ws,useCallback:vT,useContext:ws,useEffect:dC,useImperativeHandle:bT,useInsertionEffect:mT,useLayoutEffect:gT,useMemo:_T,useReducer:x0,useRef:pT,useState:function(){return x0(fh)},useDebugValue:uC,useDeferredValue:function(t){var e=xs();return wT(e,Mn.memoizedState,t)},useTransition:function(){var t=x0(fh)[0],e=xs().memoizedState;return[t,e]},useMutableSource:aT,useSyncExternalStore:lT,useId:xT,unstable_isNewReconciler:!1},t8={readContext:ws,useCallback:vT,useContext:ws,useEffect:dC,useImperativeHandle:bT,useInsertionEffect:mT,useLayoutEffect:gT,useMemo:_T,useReducer:C0,useRef:pT,useState:function(){return C0(fh)},useDebugValue:uC,useDeferredValue:function(t){var e=xs();return Mn===null?e.memoizedState=t:wT(e,Mn.memoizedState,t)},useTransition:function(){var t=C0(fh)[0],e=xs().memoizedState;return[t,e]},useMutableSource:aT,useSyncExternalStore:lT,useId:xT,unstable_isNewReconciler:!1};function Fd(t,e){try{var n="",r=e;do n+=PU(r),r=r.return;while(r);var s=n}catch(o){s=` Error generating stack: `+o.message+` `+o.stack}return{value:t,source:e,stack:s,digest:null}}function E0(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function M1(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var n8=typeof WeakMap=="function"?WeakMap:Map;function AT(t,e,n){n=pi(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){ry||(ry=!0,G1=r),M1(t,e)},n}function NT(t,e,n){n=pi(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var s=e.value;n.payload=function(){return r(s)},n.callback=function(){M1(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){M1(t,e),typeof r!="function"&&(ga===null?ga=new Set([this]):ga.add(this));var a=e.stack;this.componentDidCatch(e.value,{componentStack:a!==null?a:""})}),n}function uR(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new n8;var s=new Set;r.set(e,s)}else s=r.get(e),s===void 0&&(s=new Set,r.set(e,s));s.has(n)||(s.add(n),t=g8.bind(null,t,e,n),e.then(t,t))}function fR(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function hR(t,e,n,r,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=pi(-1,1),e.tag=2,ma(n,e,1))),n.lanes|=1),t)}var r8=ki.ReactCurrentOwner,Lr=!1;function xr(t,e,n,r){e.child=t===null?oT(e,null,n,r):Pd(e,t.child,n,r)}function pR(t,e,n,r,s){n=n.render;var o=e.ref;return ud(e,s),r=lC(t,e,n,r,o,s),n=cC(),t!==null&&!Lr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Ai(t,e,s)):(hn&&n&&Zx(e),e.flags|=1,xr(t,e,r,s),e.child)}function mR(t,e,n,r,s){if(t===null){var o=n.type;return typeof o=="function"&&!vC(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=o,RT(t,e,o,r,s)):(t=gg(n.type,null,r,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&s)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:oh,n(a,r)&&t.ref===e.ref)return Ai(t,e,s)}return e.flags|=1,t=ba(o,r),t.ref=e.ref,t.return=e,e.child=t}function RT(t,e,n,r,s){if(t!==null){var o=t.memoizedProps;if(oh(o,r)&&t.ref===e.ref)if(Lr=!1,e.pendingProps=r=o,(t.lanes&s)!==0)t.flags&131072&&(Lr=!0);else return e.lanes=t.lanes,Ai(t,e,s)}return L1(t,e,n,r,s)}function PT(t,e,n){var r=e.pendingProps,s=r.children,o=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Gt(Qc,Zr),Zr|=n;else{if(!(n&1073741824))return t=o!==null?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Gt(Qc,Zr),Zr|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Gt(Qc,Zr),Zr|=r}else o!==null?(r=o.baseLanes|n,e.memoizedState=null):r=n,Gt(Qc,Zr),Zr|=r;return xr(t,e,s,n),e.child}function OT(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function L1(t,e,n,r,s){var o=$r(n)?Ll:mr.current;return o=Nd(e,o),ud(e,s),n=lC(t,e,n,r,o,s),r=cC(),t!==null&&!Lr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Ai(t,e,s)):(hn&&r&&Zx(e),e.flags|=1,xr(t,e,n,s),e.child)}function gR(t,e,n,r,s){if($r(n)){var o=!0;Wg(e)}else o=!1;if(ud(e,s),e.stateNode===null)hg(t,e),rT(e,n,r),I1(e,n,r,s),r=!0;else if(t===null){var a=e.stateNode,l=e.memoizedProps;a.props=l;var c=a.context,d=n.contextType;typeof d=="object"&&d!==null?d=ws(d):(d=$r(n)?Ll:mr.current,d=Nd(e,d));var u=n.getDerivedStateFromProps,f=typeof u=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||c!==d)&&aR(e,a,r,d),Zi=!1;var g=e.memoizedState;a.state=g,Xg(e,r,a,s),c=e.memoizedState,l!==r||g!==c||jr.current||Zi?(typeof u=="function"&&(T1(e,n,u,r),c=e.memoizedState),(l=Zi||iR(e,n,l,r,g,c,d))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(e.flags|=4194308)):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=c),a.props=r,a.state=c,a.context=d,r=l):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{a=e.stateNode,tT(t,e),l=e.memoizedProps,d=e.type===e.elementType?l:Is(e.type,l),a.props=d,f=e.pendingProps,g=a.context,c=n.contextType,typeof c=="object"&&c!==null?c=ws(c):(c=$r(n)?Ll:mr.current,c=Nd(e,c));var E=n.getDerivedStateFromProps;(u=typeof E=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==f||g!==c)&&aR(e,a,r,c),Zi=!1,g=e.memoizedState,a.state=g,Xg(e,r,a,s);var S=e.memoizedState;l!==f||g!==S||jr.current||Zi?(typeof E=="function"&&(T1(e,n,E,r),S=e.memoizedState),(d=Zi||iR(e,n,d,r,g,S,c)||!1)?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,S,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,S,c)),typeof a.componentDidUpdate=="function"&&(e.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===t.memoizedProps&&g===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&g===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=S),a.props=r,a.state=S,a.context=c,r=d):(typeof a.componentDidUpdate!="function"||l===t.memoizedProps&&g===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&g===t.memoizedState||(e.flags|=1024),r=!1)}return z1(t,e,n,r,o,s)}function z1(t,e,n,r,s,o){OT(t,e);var a=(e.flags&128)!==0;if(!r&&!a)return s&&tR(e,n,!1),Ai(t,e,o);r=e.stateNode,r8.current=e;var l=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&a?(e.child=Pd(e,t.child,null,o),e.child=Pd(e,null,l,o)):xr(t,e,l,o),e.memoizedState=r.state,s&&tR(e,n,!0),e.child}function FT(t){var e=t.stateNode;e.pendingContext?eR(t,e.pendingContext,e.pendingContext!==e.context):e.context&&eR(t,e.context,!1),sC(t,e.containerInfo)}function yR(t,e,n,r,s){return Rd(),Xx(s),e.flags|=256,xr(t,e,n,r),e.child}var q1={dehydrated:null,treeContext:null,retryLane:0};function j1(t){return{baseLanes:t,cachePool:null,transitions:null}}function DT(t,e,n){var r=e.pendingProps,s=pn.current,o=!1,a=(e.flags&128)!==0,l;if((l=a)||(l=t!==null&&t.memoizedState===null?!1:(s&2)!==0),l?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),Gt(pn,s&1),t===null)return D1(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(a=r.children,t=r.fallback,o?(r=e.mode,o=e.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=wb(a,r,0,null),t=Rl(t,r,n,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=j1(n),e.memoizedState=q1,t):fC(e,a));if(s=t.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return s8(t,e,a,r,l,s,n);if(o){o=r.fallback,a=e.mode,s=t.child,l=s.sibling;var c={mode:"hidden",children:r.children};return!(a&1)&&e.child!==s?(r=e.child,r.childLanes=0,r.pendingProps=c,e.deletions=null):(r=ba(s,c),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?o=ba(l,o):(o=Rl(o,a,n,null),o.flags|=2),o.return=e,r.return=e,r.sibling=o,e.child=r,r=o,o=e.child,a=t.child.memoizedState,a=a===null?j1(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=t.childLanes&~n,e.memoizedState=q1,r}return o=t.child,t=o.sibling,r=ba(o,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function fC(t,e){return e=wb({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function mm(t,e,n,r){return r!==null&&Xx(r),Pd(e,t.child,null,n),t=fC(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function s8(t,e,n,r,s,o,a){if(n)return e.flags&256?(e.flags&=-257,r=E0(Error(_e(422))),mm(t,e,a,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=r.fallback,s=e.mode,r=wb({mode:"visible",children:r.children},s,0,null),o=Rl(o,s,a,null),o.flags|=2,r.return=e,o.return=e,r.sibling=o,e.child=r,e.mode&1&&Pd(e,t.child,null,a),e.child.memoizedState=j1(a),e.memoizedState=q1,o);if(!(e.mode&1))return mm(t,e,a,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(_e(419)),r=E0(o,r,void 0),mm(t,e,a,r)}if(l=(a&t.childLanes)!==0,Lr||l){if(r=Zn,r!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|a)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Si(t,s),Ks(r,t,s,-1))}return bC(),r=E0(Error(_e(421))),mm(t,e,a,r)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=y8.bind(null,t),s._reactRetry=e,null):(t=o.treeContext,Qr=pa(s.nextSibling),es=e,hn=!0,zs=null,t!==null&&(hs[ps++]=ei,hs[ps++]=ti,hs[ps++]=zl,ei=t.id,ti=t.overflow,zl=e),e=fC(e,r.children),e.flags|=4096,e)}function bR(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),k1(t.return,e,n)}function S0(t,e,n,r,s){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function kT(t,e,n){var r=e.pendingProps,s=r.revealOrder,o=r.tail;if(xr(t,e,r.children,n),r=pn.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&bR(t,n,e);else if(t.tag===19)bR(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Gt(pn,r),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(n=e.child,s=null;n!==null;)t=n.alternate,t!==null&&Qg(t)===null&&(s=n),n=n.sibling;n=s,n===null?(s=e.child,e.child=null):(s=n.sibling,n.sibling=null),S0(e,!1,s,n,o);break;case"backwards":for(n=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&Qg(t)===null){e.child=s;break}t=s.sibling,s.sibling=n,n=s,s=t}S0(e,!0,n,null,o);break;case"together":S0(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function hg(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Ai(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),jl|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(_e(153));if(e.child!==null){for(t=e.child,n=ba(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=ba(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function o8(t,e,n){switch(e.tag){case 3:FT(e),Rd();break;case 5:iT(e);break;case 1:$r(e.type)&&Wg(e);break;case 4:sC(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,s=e.memoizedProps.value;Gt(Zg,r._currentValue),r._currentValue=s;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Gt(pn,pn.current&1),e.flags|=128,null):n&e.child.childLanes?DT(t,e,n):(Gt(pn,pn.current&1),t=Ai(t,e,n),t!==null?t.sibling:null);Gt(pn,pn.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return kT(t,e,n);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Gt(pn,pn.current),r)break;return null;case 22:case 23:return e.lanes=0,PT(t,e,n)}return Ai(t,e,n)}var TT,$1,IT,MT;TT=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};$1=function(){};IT=function(t,e,n,r){var s=t.memoizedProps;if(s!==r){t=e.stateNode,_l(yo.current);var o=null;switch(n){case"input":s=c1(t,s),r=c1(t,r),o=[];break;case"select":s=bn({},s,{value:void 0}),r=bn({},r,{value:void 0}),o=[];break;case"textarea":s=f1(t,s),r=f1(t,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=Hg)}p1(n,r);var a;n=null;for(d in s)if(!r.hasOwnProperty(d)&&s.hasOwnProperty(d)&&s[d]!=null)if(d==="style"){var l=s[d];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(Xf.hasOwnProperty(d)?o||(o=[]):(o=o||[]).push(d,null));for(d in r){var c=r[d];if(l=s!=null?s[d]:void 0,r.hasOwnProperty(d)&&c!==l&&(c!=null||l!=null))if(d==="style")if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(o||(o=[]),o.push(d,n)),n=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(Xf.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&Qt("scroll",t),o||l===c||(o=[])):(o=o||[]).push(d,c))}n&&(o=o||[]).push("style",n);var d=o;(e.updateQueue=d)&&(e.flags|=4)}};MT=function(t,e,n,r){n!==r&&(e.flags|=4)};function Mu(t,e){if(!hn)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function or(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function i8(t,e,n){var r=e.pendingProps;switch(Jx(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return or(e),null;case 1:return $r(e.type)&&Gg(),or(e),null;case 3:return r=e.stateNode,Od(),sn(jr),sn(mr),iC(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(hm(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,zs!==null&&(K1(zs),zs=null))),$1(t,e),or(e),null;case 5:oC(e);var s=_l(dh.current);if(n=e.type,t!==null&&e.stateNode!=null)IT(t,e,n,r,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(_e(166));return or(e),null}if(t=_l(yo.current),hm(e)){r=e.stateNode,n=e.type;var o=e.memoizedProps;switch(r[ho]=e,r[lh]=o,t=(e.mode&1)!==0,n){case"dialog":Qt("cancel",r),Qt("close",r);break;case"iframe":case"object":case"embed":Qt("load",r);break;case"video":case"audio":for(s=0;s<lf.length;s++)Qt(lf[s],r);break;case"source":Qt("error",r);break;case"img":case"image":case"link":Qt("error",r),Qt("load",r);break;case"details":Qt("toggle",r);break;case"input":NN(r,o),Qt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Qt("invalid",r);break;case"textarea":PN(r,o),Qt("invalid",r)}p1(n,o),s=null;for(var a in o)if(o.hasOwnProperty(a)){var l=o[a];a==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&fm(r.textContent,l,t),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&fm(r.textContent,l,t),s=["children",""+l]):Xf.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&Qt("scroll",r)}switch(n){case"input":sm(r),RN(r,o,!0);break;case"textarea":sm(r),ON(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Hg)}r=s,e.updateQueue=r,r!==null&&(e.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=ck(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=a.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=a.createElement(n,{is:r.is}):(t=a.createElement(n),n==="select"&&(a=t,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):t=a.createElementNS(t,n),t[ho]=e,t[lh]=r,TT(t,e,!1,!1),e.stateNode=t;e:{switch(a=m1(n,r),n){case"dialog":Qt("cancel",t),Qt("close",t),s=r;break;case"iframe":case"object":case"embed":Qt("load",t),s=r;break;case"video":case"audio":for(s=0;s<lf.length;s++)Qt(lf[s],t);s=r;break;case"source":Qt("error",t),s=r;break;case"img":case"image":case"link":Qt("error",t),Qt("load",t),s=r;break;case"details":Qt("toggle",t),s=r;break;case"input":NN(t,r),s=c1(t,r),Qt("invalid",t);break;case"option":s=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},s=bn({},r,{value:void 0}),Qt("invalid",t);break;case"textarea":PN(t,r),s=f1(t,r),Qt("invalid",t);break;default:s=r}p1(n,s),l=s;for(o in l)if(l.hasOwnProperty(o)){var c=l[o];o==="style"?fk(t,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&dk(t,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Qf(t,c):typeof c=="number"&&Qf(t,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Xf.hasOwnProperty(o)?c!=null&&o==="onScroll"&&Qt("scroll",t):c!=null&&Mx(t,o,c,a))}switch(n){case"input":sm(t),RN(t,r,!1);break;case"textarea":sm(t),ON(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Aa(r.value));break;case"select":t.multiple=!!r.multiple,o=r.value,o!=null?ad(t,!!r.multiple,o,!1):r.defaultValue!=null&&ad(t,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=Hg)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return or(e),null;case 6:if(t&&e.stateNode!=null)MT(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(_e(166));if(n=_l(dh.current),_l(yo.current),hm(e)){if(r=e.stateNode,n=e.memoizedProps,r[ho]=e,(o=r.nodeValue!==n)&&(t=es,t!==null))switch(t.tag){case 3:fm(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&fm(r.nodeValue,n,(t.mode&1)!==0)}o&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ho]=e,e.stateNode=r}return or(e),null;case 13:if(sn(pn),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(hn&&Qr!==null&&e.mode&1&&!(e.flags&128))Qk(),Rd(),e.flags|=98560,o=!1;else if(o=hm(e),r!==null&&r.dehydrated!==null){if(t===null){if(!o)throw Error(_e(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(_e(317));o[ho]=e}else Rd(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;or(e),o=!1}else zs!==null&&(K1(zs),zs=null),o=!0;if(!o)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||pn.current&1?qn===0&&(qn=3):bC())),e.updateQueue!==null&&(e.flags|=4),or(e),null);case 4:return Od(),$1(t,e),t===null&&ih(e.stateNode.containerInfo),or(e),null;case 10:return tC(e.type._context),or(e),null;case 17:return $r(e.type)&&Gg(),or(e),null;case 19:if(sn(pn),o=e.memoizedState,o===null)return or(e),null;if(r=(e.flags&128)!==0,a=o.rendering,a===null)if(r)Mu(o,!1);else{if(qn!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(a=Qg(t),a!==null){for(e.flags|=128,Mu(o,!1),r=a.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)o=n,t=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=t,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,t=a.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Gt(pn,pn.current&1|2),e.child}t=t.sibling}o.tail!==null&&Rn()>Dd&&(e.flags|=128,r=!0,Mu(o,!1),e.lanes=4194304)}else{if(!r)if(t=Qg(a),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Mu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!hn)return or(e),null}else 2*Rn()-o.renderingStartTime>Dd&&n!==1073741824&&(e.flags|=128,r=!0,Mu(o,!1),e.lanes=4194304);o.isBackwards?(a.sibling=e.child,e.child=a):(n=o.last,n!==null?n.sibling=a:e.child=a,o.last=a)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Rn(),e.sibling=null,n=pn.current,Gt(pn,r?n&1|2:n&1),e):(or(e),null);case 22:case 23:return yC(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Zr&1073741824&&(or(e),e.subtreeFlags&6&&(e.flags|=8192)):or(e),null;case 24:return null;case 25:return null}throw Error(_e(156,e.tag))}function a8(t,e){switch(Jx(e),e.tag){case 1:return $r(e.type)&&Gg(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Od(),sn(jr),sn(mr),iC(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return oC(e),null;case 13:if(sn(pn),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(_e(340));Rd()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return sn(pn),null;case 4:return Od(),null;case 10:return tC(e.type._context),null;case 22:case 23:return yC(),null;case 24:return null;default:return null}}var gm=!1,dr=!1,l8=typeof WeakSet=="function"?WeakSet:Set,Te=null;function Xc(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Cn(t,e,r)}else n.current=null}function B1(t,e,n){try{n()}catch(r){Cn(t,e,r)}}var vR=!1;function c8(t,e){if(S1=Bg,t=jk(),Kx(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,l=-1,c=-1,d=0,u=0,f=t,g=null;t:for(;;){for(var E;f!==n||s!==0&&f.nodeType!==3||(l=a+s),f!==o||r!==0&&f.nodeType!==3||(c=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(E=f.firstChild)!==null;)g=f,f=E;for(;;){if(f===t)break t;if(g===n&&++d===s&&(l=a),g===o&&++u===r&&(c=a),(E=f.nextSibling)!==null)break;f=g,g=f.parentNode}f=E}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(A1={focusedElem:t,selectionRange:n},Bg=!1,Te=e;Te!==null;)if(e=Te,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Te=t;else for(;Te!==null;){e=Te;try{var S=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,_=S.memoizedState,h=e.stateNode,m=h.getSnapshotBeforeUpdate(e.elementType===e.type?w:Is(e.type,w),_);h.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var A=e.stateNode.containerInfo;A.nodeType===1?A.textContent="":A.nodeType===9&&A.documentElement&&A.removeChild(A.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_e(163))}}catch(k){Cn(e,e.return,k)}if(t=e.sibling,t!==null){t.return=e.return,Te=t;break}Te=e.return}return S=vR,vR=!1,S}function Af(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var o=s.destroy;s.destroy=void 0,o!==void 0&&B1(e,n,o)}s=s.next}while(s!==r)}}function vb(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function U1(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function LT(t){var e=t.alternate;e!==null&&(t.alternate=null,LT(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ho],delete e[lh],delete e[P1],delete e[HY],delete e[GY])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function zT(t){return t.tag===5||t.tag===3||t.tag===4}function _R(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||zT(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Y1(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Hg));else if(r!==4&&(t=t.child,t!==null))for(Y1(t,e,n),t=t.sibling;t!==null;)Y1(t,e,n),t=t.sibling}function H1(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(H1(t,e,n),t=t.sibling;t!==null;)H1(t,e,n),t=t.sibling}var Jn=null,Ms=!1;function Hi(t,e,n){for(n=n.child;n!==null;)qT(t,e,n),n=n.sibling}function qT(t,e,n){if(go&&typeof go.onCommitFiberUnmount=="function")try{go.onCommitFiberUnmount(ub,n)}catch{}switch(n.tag){case 5:dr||Xc(n,e);case 6:var r=Jn,s=Ms;Jn=null,Hi(t,e,n),Jn=r,Ms=s,Jn!==null&&(Ms?(t=Jn,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Jn.removeChild(n.stateNode));break;case 18:Jn!==null&&(Ms?(t=Jn,n=n.stateNode,t.nodeType===8?b0(t.parentNode,n):t.nodeType===1&&b0(t,n),rh(t)):b0(Jn,n.stateNode));break;case 4:r=Jn,s=Ms,Jn=n.stateNode.containerInfo,Ms=!0,Hi(t,e,n),Jn=r,Ms=s;break;case 0:case 11:case 14:case 15:if(!dr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&B1(n,e,a),s=s.next}while(s!==r)}Hi(t,e,n);break;case 1:if(!dr&&(Xc(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Cn(n,e,l)}Hi(t,e,n);break;case 21:Hi(t,e,n);break;case 22:n.mode&1?(dr=(r=dr)||n.memoizedState!==null,Hi(t,e,n),dr=r):Hi(t,e,n);break;default:Hi(t,e,n)}}function wR(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new l8),e.forEach(function(r){var s=b8.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Ts(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=t,a=e,l=a;e:for(;l!==null;){switch(l.tag){case 5:Jn=l.stateNode,Ms=!1;break e;case 3:Jn=l.stateNode.containerInfo,Ms=!0;break e;case 4:Jn=l.stateNode.containerInfo,Ms=!0;break e}l=l.return}if(Jn===null)throw Error(_e(160));qT(o,a,s),Jn=null,Ms=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(d){Cn(s,e,d)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)jT(e,t),e=e.sibling}function jT(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ts(e,t),ao(t),r&4){try{Af(3,t,t.return),vb(3,t)}catch(w){Cn(t,t.return,w)}try{Af(5,t,t.return)}catch(w){Cn(t,t.return,w)}}break;case 1:Ts(e,t),ao(t),r&512&&n!==null&&Xc(n,n.return);break;case 5:if(Ts(e,t),ao(t),r&512&&n!==null&&Xc(n,n.return),t.flags&32){var s=t.stateNode;try{Qf(s,"")}catch(w){Cn(t,t.return,w)}}if(r&4&&(s=t.stateNode,s!=null)){var o=t.memoizedProps,a=n!==null?n.memoizedProps:o,l=t.type,c=t.updateQueue;if(t.updateQueue=null,c!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&ak(s,o),m1(l,a);var d=m1(l,o);for(a=0;a<c.length;a+=2){var u=c[a],f=c[a+1];u==="style"?fk(s,f):u==="dangerouslySetInnerHTML"?dk(s,f):u==="children"?Qf(s,f):Mx(s,u,f,d)}switch(l){case"input":d1(s,o);break;case"textarea":lk(s,o);break;case"select":var g=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var E=o.value;E!=null?ad(s,!!o.multiple,E,!1):g!==!!o.multiple&&(o.defaultValue!=null?ad(s,!!o.multiple,o.defaultValue,!0):ad(s,!!o.multiple,o.multiple?[]:"",!1))}s[lh]=o}catch(w){Cn(t,t.return,w)}}break;case 6:if(Ts(e,t),ao(t),r&4){if(t.stateNode===null)throw Error(_e(162));s=t.stateNode,o=t.memoizedProps;try{s.nodeValue=o}catch(w){Cn(t,t.return,w)}}break;case 3:if(Ts(e,t),ao(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{rh(e.containerInfo)}catch(w){Cn(t,t.return,w)}break;case 4:Ts(e,t),ao(t);break;case 13:Ts(e,t),ao(t),s=t.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(mC=Rn())),r&4&&wR(t);break;case 22:if(u=n!==null&&n.memoizedState!==null,t.mode&1?(dr=(d=dr)||u,Ts(e,t),dr=d):Ts(e,t),ao(t),r&8192){if(d=t.memoizedState!==null,(t.stateNode.isHidden=d)&&!u&&t.mode&1)for(Te=t,u=t.child;u!==null;){for(f=Te=u;Te!==null;){switch(g=Te,E=g.child,g.tag){case 0:case 11:case 14:case 15:Af(4,g,g.return);break;case 1:Xc(g,g.return);var S=g.stateNode;if(typeof S.componentWillUnmount=="function"){r=g,n=g.return;try{e=r,S.props=e.memoizedProps,S.state=e.memoizedState,S.componentWillUnmount()}catch(w){Cn(r,n,w)}}break;case 5:Xc(g,g.return);break;case 22:if(g.memoizedState!==null){CR(f);continue}}E!==null?(E.return=g,Te=E):CR(f)}u=u.sibling}e:for(u=null,f=t;;){if(f.tag===5){if(u===null){u=f;try{s=f.stateNode,d?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=f.stateNode,c=f.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=uk("display",a))}catch(w){Cn(t,t.return,w)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=d?"":f.memoizedProps}catch(w){Cn(t,t.return,w)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ts(e,t),ao(t),r&4&&wR(t);break;case 21:break;default:Ts(e,t),ao(t)}}function ao(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(zT(n)){var r=n;break e}n=n.return}throw Error(_e(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Qf(s,""),r.flags&=-33);var o=_R(t);H1(t,o,s);break;case 3:case 4:var a=r.stateNode.containerInfo,l=_R(t);Y1(t,l,a);break;default:throw Error(_e(161))}}catch(c){Cn(t,t.return,c)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function d8(t,e,n){Te=t,$T(t)}function $T(t,e,n){for(var r=(t.mode&1)!==0;Te!==null;){var s=Te,o=s.child;if(s.tag===22&&r){var a=s.memoizedState!==null||gm;if(!a){var l=s.alternate,c=l!==null&&l.memoizedState!==null||dr;l=gm;var d=dr;if(gm=a,(dr=c)&&!d)for(Te=s;Te!==null;)a=Te,c=a.child,a.tag===22&&a.memoizedState!==null?ER(s):c!==null?(c.return=a,Te=c):ER(s);for(;o!==null;)Te=o,$T(o),o=o.sibling;Te=s,gm=l,dr=d}xR(t)}else s.subtreeFlags&8772&&o!==null?(o.return=s,Te=o):xR(t)}}function xR(t){for(;Te!==null;){var e=Te;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:dr||vb(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!dr)if(n===null)r.componentDidMount();else{var s=e.elementType===e.type?n.memoizedProps:Is(e.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;o!==null&&oR(e,o,r);break;case 3:var a=e.updateQueue;if(a!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}oR(e,a,n)}break;case 5:var l=e.stateNode;if(n===null&&e.flags&4){n=l;var c=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var d=e.alternate;if(d!==null){var u=d.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&rh(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(_e(163))}dr||e.flags&512&&U1(e)}catch(g){Cn(e,e.return,g)}}if(e===t){Te=null;break}if(n=e.sibling,n!==null){n.return=e.return,Te=n;break}Te=e.return}}function CR(t){for(;Te!==null;){var e=Te;if(e===t){Te=null;break}var n=e.sibling;if(n!==null){n.return=e.return,Te=n;break}Te=e.return}}function ER(t){for(;Te!==null;){var e=Te;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{vb(4,e)}catch(c){Cn(e,n,c)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var s=e.return;try{r.componentDidMount()}catch(c){Cn(e,s,c)}}var o=e.return;try{U1(e)}catch(c){Cn(e,o,c)}break;case 5:var a=e.return;try{U1(e)}catch(c){Cn(e,a,c)}}}catch(c){Cn(e,e.return,c)}if(e===t){Te=null;break}var l=e.sibling;if(l!==null){l.return=e.return,Te=l;break}Te=e.return}}var u8=Math.ceil,ny=ki.ReactCurrentDispatcher,hC=ki.ReactCurrentOwner,vs=ki.ReactCurrentBatchConfig,Et=0,Zn=null,Fn=null,Qn=0,Zr=0,Qc=ja(0),qn=0,ph=null,jl=0,_b=0,pC=0,Nf=null,Ir=null,mC=0,Dd=1/0,Ho=null,ry=!1,G1=null,ga=null,ym=!1,ra=null,sy=0,Rf=0,W1=null,pg=-1,mg=0;function Sr(){return Et&6?Rn():pg!==-1?pg:pg=Rn()}function ya(t){return t.mode&1?Et&2&&Qn!==0?Qn&-Qn:VY.transition!==null?(mg===0&&(mg=Ek()),mg):(t=kt,t!==0||(t=window.event,t=t===void 0?16:Fk(t.type)),t):1}function Ks(t,e,n,r){if(50<Rf)throw Rf=0,W1=null,Error(_e(185));Qh(t,n,r),(!(Et&2)||t!==Zn)&&(t===Zn&&(!(Et&2)&&(_b|=n),qn===4&&ea(t,Qn)),Br(t,r),n===1&&Et===0&&!(e.mode&1)&&(Dd=Rn()+500,gb&&$a()))}function Br(t,e){var n=t.callbackNode;VU(t,e);var r=$g(t,t===Zn?Qn:0);if(r===0)n!==null&&kN(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&kN(n),e===1)t.tag===0?WY(SR.bind(null,t)):Zk(SR.bind(null,t)),UY(function(){!(Et&6)&&$a()}),n=null;else{switch(Sk(r)){case 1:n=$x;break;case 4:n=xk;break;case 16:n=jg;break;case 536870912:n=Ck;break;default:n=jg}n=KT(n,BT.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function BT(t,e){if(pg=-1,mg=0,Et&6)throw Error(_e(327));var n=t.callbackNode;if(fd()&&t.callbackNode!==n)return null;var r=$g(t,t===Zn?Qn:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=oy(t,r);else{e=r;var s=Et;Et|=2;var o=YT();(Zn!==t||Qn!==e)&&(Ho=null,Dd=Rn()+500,Nl(t,e));do try{p8();break}catch(l){UT(t,l)}while(1);eC(),ny.current=o,Et=s,Fn!==null?e=0:(Zn=null,Qn=0,e=qn)}if(e!==0){if(e===2&&(s=_1(t),s!==0&&(r=s,e=V1(t,s))),e===1)throw n=ph,Nl(t,0),ea(t,r),Br(t,Rn()),n;if(e===6)ea(t,r);else{if(s=t.current.alternate,!(r&30)&&!f8(s)&&(e=oy(t,r),e===2&&(o=_1(t),o!==0&&(r=o,e=V1(t,o))),e===1))throw n=ph,Nl(t,0),ea(t,r),Br(t,Rn()),n;switch(t.finishedWork=s,t.finishedLanes=r,e){case 0:case 1:throw Error(_e(345));case 2:dl(t,Ir,Ho);break;case 3:if(ea(t,r),(r&130023424)===r&&(e=mC+500-Rn(),10<e)){if($g(t,0)!==0)break;if(s=t.suspendedLanes,(s&r)!==r){Sr(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=R1(dl.bind(null,t,Ir,Ho),e);break}dl(t,Ir,Ho);break;case 4:if(ea(t,r),(r&4194240)===r)break;for(e=t.eventTimes,s=-1;0<r;){var a=31-Vs(r);o=1<<a,a=e[a],a>s&&(s=a),r&=~o}if(r=s,r=Rn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*u8(r/1960))-r,10<r){t.timeoutHandle=R1(dl.bind(null,t,Ir,Ho),r);break}dl(t,Ir,Ho);break;case 5:dl(t,Ir,Ho);break;default:throw Error(_e(329))}}}return Br(t,Rn()),t.callbackNode===n?BT.bind(null,t):null}function V1(t,e){var n=Nf;return t.current.memoizedState.isDehydrated&&(Nl(t,e).flags|=256),t=oy(t,e),t!==2&&(e=Ir,Ir=n,e!==null&&K1(e)),t}function K1(t){Ir===null?Ir=t:Ir.push.apply(Ir,t)}function f8(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],o=s.getSnapshot;s=s.value;try{if(!Xs(o(),s))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function ea(t,e){for(e&=~pC,e&=~_b,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Vs(e),r=1<<n;t[n]=-1,e&=~r}}function SR(t){if(Et&6)throw Error(_e(327));fd();var e=$g(t,0);if(!(e&1))return Br(t,Rn()),null;var n=oy(t,e);if(t.tag!==0&&n===2){var r=_1(t);r!==0&&(e=r,n=V1(t,r))}if(n===1)throw n=ph,Nl(t,0),ea(t,e),Br(t,Rn()),n;if(n===6)throw Error(_e(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,dl(t,Ir,Ho),Br(t,Rn()),null}function gC(t,e){var n=Et;Et|=1;try{return t(e)}finally{Et=n,Et===0&&(Dd=Rn()+500,gb&&$a())}}function $l(t){ra!==null&&ra.tag===0&&!(Et&6)&&fd();var e=Et;Et|=1;var n=vs.transition,r=kt;try{if(vs.transition=null,kt=1,t)return t()}finally{kt=r,vs.transition=n,Et=e,!(Et&6)&&$a()}}function yC(){Zr=Qc.current,sn(Qc)}function Nl(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,BY(n)),Fn!==null)for(n=Fn.return;n!==null;){var r=n;switch(Jx(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Gg();break;case 3:Od(),sn(jr),sn(mr),iC();break;case 5:oC(r);break;case 4:Od();break;case 13:sn(pn);break;case 19:sn(pn);break;case 10:tC(r.type._context);break;case 22:case 23:yC()}n=n.return}if(Zn=t,Fn=t=ba(t.current,null),Qn=Zr=e,qn=0,ph=null,pC=_b=jl=0,Ir=Nf=null,vl!==null){for(e=0;e<vl.length;e++)if(n=vl[e],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=s,r.next=a}n.pending=r}vl=null}return t}function UT(t,e){do{var n=Fn;try{if(eC(),ug.current=ty,ey){for(var r=yn.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}ey=!1}if(ql=0,Gn=Mn=yn=null,Sf=!1,uh=0,hC.current=null,n===null||n.return===null){qn=1,ph=e,Fn=null;break}e:{var o=t,a=n.return,l=n,c=e;if(e=Qn,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=c,u=l,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var g=u.alternate;g?(u.updateQueue=g.updateQueue,u.memoizedState=g.memoizedState,u.lanes=g.lanes):(u.updateQueue=null,u.memoizedState=null)}var E=fR(a);if(E!==null){E.flags&=-257,hR(E,a,l,o,e),E.mode&1&&uR(o,d,e),e=E,c=d;var S=e.updateQueue;if(S===null){var w=new Set;w.add(c),e.updateQueue=w}else S.add(c);break e}else{if(!(e&1)){uR(o,d,e),bC();break e}c=Error(_e(426))}}else if(hn&&l.mode&1){var _=fR(a);if(_!==null){!(_.flags&65536)&&(_.flags|=256),hR(_,a,l,o,e),Xx(Fd(c,l));break e}}o=c=Fd(c,l),qn!==4&&(qn=2),Nf===null?Nf=[o]:Nf.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e;var h=AT(o,c,e);sR(o,h);break e;case 1:l=c;var m=o.type,A=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||A!==null&&typeof A.componentDidCatch=="function"&&(ga===null||!ga.has(A)))){o.flags|=65536,e&=-e,o.lanes|=e;var k=NT(o,l,e);sR(o,k);break e}}o=o.return}while(o!==null)}GT(n)}catch(R){e=R,Fn===n&&n!==null&&(Fn=n=n.return);continue}break}while(1)}function YT(){var t=ny.current;return ny.current=ty,t===null?ty:t}function bC(){(qn===0||qn===3||qn===2)&&(qn=4),Zn===null||!(jl&268435455)&&!(_b&268435455)||ea(Zn,Qn)}function oy(t,e){var n=Et;Et|=2;var r=YT();(Zn!==t||Qn!==e)&&(Ho=null,Nl(t,e));do try{h8();break}catch(s){UT(t,s)}while(1);if(eC(),Et=n,ny.current=r,Fn!==null)throw Error(_e(261));return Zn=null,Qn=0,qn}function h8(){for(;Fn!==null;)HT(Fn)}function p8(){for(;Fn!==null&&!qU();)HT(Fn)}function HT(t){var e=VT(t.alternate,t,Zr);t.memoizedProps=t.pendingProps,e===null?GT(t):Fn=e,hC.current=null}function GT(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=a8(n,e),n!==null){n.flags&=32767,Fn=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{qn=6,Fn=null;return}}else if(n=i8(n,e,Zr),n!==null){Fn=n;return}if(e=e.sibling,e!==null){Fn=e;return}Fn=e=t}while(e!==null);qn===0&&(qn=5)}function dl(t,e,n){var r=kt,s=vs.transition;try{vs.transition=null,kt=1,m8(t,e,n,r)}finally{vs.transition=s,kt=r}return null}function m8(t,e,n,r){do fd();while(ra!==null);if(Et&6)throw Error(_e(327));n=t.finishedWork;var s=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(_e(177));t.callbackNode=null,t.callbackPriority=0;var o=n.lanes|n.childLanes;if(KU(t,o),t===Zn&&(Fn=Zn=null,Qn=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ym||(ym=!0,KT(jg,function(){return fd(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=vs.transition,vs.transition=null;var a=kt;kt=1;var l=Et;Et|=4,hC.current=null,c8(t,n),jT(n,t),IY(A1),Bg=!!S1,A1=S1=null,t.current=n,d8(n),jU(),Et=l,kt=a,vs.transition=o}else t.current=n;if(ym&&(ym=!1,ra=t,sy=s),o=t.pendingLanes,o===0&&(ga=null),UU(n.stateNode),Br(t,Rn()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)s=e[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(ry)throw ry=!1,t=G1,G1=null,t;return sy&1&&t.tag!==0&&fd(),o=t.pendingLanes,o&1?t===W1?Rf++:(Rf=0,W1=t):Rf=0,$a(),null}function fd(){if(ra!==null){var t=Sk(sy),e=vs.transition,n=kt;try{if(vs.transition=null,kt=16>t?16:t,ra===null)var r=!1;else{if(t=ra,ra=null,sy=0,Et&6)throw Error(_e(331));var s=Et;for(Et|=4,Te=t.current;Te!==null;){var o=Te,a=o.child;if(Te.flags&16){var l=o.deletions;if(l!==null){for(var c=0;c<l.length;c++){var d=l[c];for(Te=d;Te!==null;){var u=Te;switch(u.tag){case 0:case 11:case 15:Af(8,u,o)}var f=u.child;if(f!==null)f.return=u,Te=f;else for(;Te!==null;){u=Te;var g=u.sibling,E=u.return;if(LT(u),u===d){Te=null;break}if(g!==null){g.return=E,Te=g;break}Te=E}}}var S=o.alternate;if(S!==null){var w=S.child;if(w!==null){S.child=null;do{var _=w.sibling;w.sibling=null,w=_}while(w!==null)}}Te=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,Te=a;else e:for(;Te!==null;){if(o=Te,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Af(9,o,o.return)}var h=o.sibling;if(h!==null){h.return=o.return,Te=h;break e}Te=o.return}}var m=t.current;for(Te=m;Te!==null;){a=Te;var A=a.child;if(a.subtreeFlags&2064&&A!==null)A.return=a,Te=A;else e:for(a=m;Te!==null;){if(l=Te,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:vb(9,l)}}catch(R){Cn(l,l.return,R)}if(l===a){Te=null;break e}var k=l.sibling;if(k!==null){k.return=l.return,Te=k;break e}Te=l.return}}if(Et=s,$a(),go&&typeof go.onPostCommitFiberRoot=="function")try{go.onPostCommitFiberRoot(ub,t)}catch{}r=!0}return r}finally{kt=n,vs.transition=e}}return!1}function AR(t,e,n){e=Fd(n,e),e=AT(t,e,1),t=ma(t,e,1),e=Sr(),t!==null&&(Qh(t,1,e),Br(t,e))}function Cn(t,e,n){if(t.tag===3)AR(t,t,n);else for(;e!==null;){if(e.tag===3){AR(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ga===null||!ga.has(r))){t=Fd(n,t),t=NT(e,t,1),e=ma(e,t,1),t=Sr(),e!==null&&(Qh(e,1,t),Br(e,t));break}}e=e.return}}function g8(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=Sr(),t.pingedLanes|=t.suspendedLanes&n,Zn===t&&(Qn&n)===n&&(qn===4||qn===3&&(Qn&130023424)===Qn&&500>Rn()-mC?Nl(t,0):pC|=n),Br(t,e)}function WT(t,e){e===0&&(t.mode&1?(e=am,am<<=1,!(am&130023424)&&(am=4194304)):e=1);var n=Sr();t=Si(t,e),t!==null&&(Qh(t,e,n),Br(t,n))}function y8(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),WT(t,n)}function b8(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(_e(314))}r!==null&&r.delete(e),WT(t,n)}var VT;VT=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||jr.current)Lr=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Lr=!1,o8(t,e,n);Lr=!!(t.flags&131072)}else Lr=!1,hn&&e.flags&1048576&&Jk(e,Kg,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;hg(t,e),t=e.pendingProps;var s=Nd(e,mr.current);ud(e,n),s=lC(null,e,r,t,s,n);var o=cC();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,$r(r)?(o=!0,Wg(e)):o=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,rC(e),s.updater=yb,e.stateNode=s,s._reactInternals=e,I1(e,r,t,n),e=z1(null,e,r,!0,o,n)):(e.tag=0,hn&&o&&Zx(e),xr(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(hg(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=_8(r),t=Is(r,t),s){case 0:e=L1(null,e,r,t,n);break e;case 1:e=gR(null,e,r,t,n);break e;case 11:e=pR(null,e,r,t,n);break e;case 14:e=mR(null,e,r,Is(r.type,t),n);break e}throw Error(_e(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Is(r,s),L1(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Is(r,s),gR(t,e,r,s,n);case 3:e:{if(FT(e),t===null)throw Error(_e(387));r=e.pendingProps,o=e.memoizedState,s=o.element,tT(t,e),Xg(e,r,null,n);var a=e.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){s=Fd(Error(_e(423)),e),e=yR(t,e,r,n,s);break e}else if(r!==s){s=Fd(Error(_e(424)),e),e=yR(t,e,r,n,s);break e}else for(Qr=pa(e.stateNode.containerInfo.firstChild),es=e,hn=!0,zs=null,n=oT(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Rd(),r===s){e=Ai(t,e,n);break e}xr(t,e,r,n)}e=e.child}return e;case 5:return iT(e),t===null&&D1(e),r=e.type,s=e.pendingProps,o=t!==null?t.memoizedProps:null,a=s.children,N1(r,s)?a=null:o!==null&&N1(r,o)&&(e.flags|=32),OT(t,e),xr(t,e,a,n),e.child;case 6:return t===null&&D1(e),null;case 13:return DT(t,e,n);case 4:return sC(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Pd(e,null,r,n):xr(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Is(r,s),pR(t,e,r,s,n);case 7:return xr(t,e,e.pendingProps,n),e.child;case 8:return xr(t,e,e.pendingProps.children,n),e.child;case 12:return xr(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,s=e.pendingProps,o=e.memoizedProps,a=s.value,Gt(Zg,r._currentValue),r._currentValue=a,o!==null)if(Xs(o.value,a)){if(o.children===s.children&&!jr.current){e=Ai(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var l=o.dependencies;if(l!==null){a=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=pi(-1,n&-n),c.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var u=d.pending;u===null?c.next=c:(c.next=u.next,u.next=c),d.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),k1(o.return,n,e),l.lanes|=n;break}c=c.next}}else if(o.tag===10)a=o.type===e.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(_e(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),k1(a,n,e),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===e){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}xr(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,ud(e,n),s=ws(s),r=r(s),e.flags|=1,xr(t,e,r,n),e.child;case 14:return r=e.type,s=Is(r,e.pendingProps),s=Is(r.type,s),mR(t,e,r,s,n);case 15:return RT(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:Is(r,s),hg(t,e),e.tag=1,$r(r)?(t=!0,Wg(e)):t=!1,ud(e,n),rT(e,r,s),I1(e,r,s,n),z1(null,e,r,!0,t,n);case 19:return kT(t,e,n);case 22:return PT(t,e,n)}throw Error(_e(156,e.tag))};function KT(t,e){return wk(t,e)}function v8(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ys(t,e,n,r){return new v8(t,e,n,r)}function vC(t){return t=t.prototype,!(!t||!t.isReactComponent)}function _8(t){if(typeof t=="function")return vC(t)?1:0;if(t!=null){if(t=t.$$typeof,t===zx)return 11;if(t===qx)return 14}return 2}function ba(t,e){var n=t.alternate;return n===null?(n=ys(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function gg(t,e,n,r,s,o){var a=2;if(r=t,typeof t=="function")vC(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case Uc:return Rl(n.children,s,o,e);case Lx:a=8,s|=8;break;case o1:return t=ys(12,n,e,s|2),t.elementType=o1,t.lanes=o,t;case i1:return t=ys(13,n,e,s),t.elementType=i1,t.lanes=o,t;case a1:return t=ys(19,n,e,s),t.elementType=a1,t.lanes=o,t;case sk:return wb(n,s,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case nk:a=10;break e;case rk:a=9;break e;case zx:a=11;break e;case qx:a=14;break e;case Ki:a=16,r=null;break e}throw Error(_e(130,t==null?t:typeof t,""))}return e=ys(a,n,e,s),e.elementType=t,e.type=r,e.lanes=o,e}function Rl(t,e,n,r){return t=ys(7,t,r,e),t.lanes=n,t}function wb(t,e,n,r){return t=ys(22,t,r,e),t.elementType=sk,t.lanes=n,t.stateNode={isHidden:!1},t}function A0(t,e,n){return t=ys(6,t,null,e),t.lanes=n,t}function N0(t,e,n){return e=ys(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function w8(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=a0(0),this.expirationTimes=a0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=a0(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function _C(t,e,n,r,s,o,a,l,c){return t=new w8(t,e,n,l,c),e===1?(e=1,o===!0&&(e|=8)):e=0,o=ys(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},rC(o),t}function x8(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Bc,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function ZT(t){if(!t)return Na;t=t._reactInternals;e:{if(tc(t)!==t||t.tag!==1)throw Error(_e(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if($r(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(_e(171))}if(t.tag===1){var n=t.type;if($r(n))return Kk(t,n,e)}return e}function JT(t,e,n,r,s,o,a,l,c){return t=_C(n,r,!0,t,s,o,a,l,c),t.context=ZT(null),n=t.current,r=Sr(),s=ya(n),o=pi(r,s),o.callback=e??null,ma(n,o,s),t.current.lanes=s,Qh(t,s,r),Br(t,r),t}function xb(t,e,n,r){var s=e.current,o=Sr(),a=ya(s);return n=ZT(n),e.context===null?e.context=n:e.pendingContext=n,e=pi(o,a),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=ma(s,e,a),t!==null&&(Ks(t,s,a,o),dg(t,s,a)),a}function iy(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function NR(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function wC(t,e){NR(t,e),(t=t.alternate)&&NR(t,e)}function C8(){return null}var XT=typeof reportError=="function"?reportError:function(t){console.error(t)};function xC(t){this._internalRoot=t}Cb.prototype.render=xC.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(_e(409));xb(t,e,null,null)};Cb.prototype.unmount=xC.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;$l(function(){xb(null,t,null,null)}),e[Ei]=null}};function Cb(t){this._internalRoot=t}Cb.prototype.unstable_scheduleHydration=function(t){if(t){var e=Rk();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Qi.length&&e!==0&&e<Qi[n].priority;n++);Qi.splice(n,0,t),n===0&&Ok(t)}};function CC(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Eb(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function RR(){}function E8(t,e,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var d=iy(a);o.call(d)}}var a=JT(e,r,t,0,null,!1,!1,"",RR);return t._reactRootContainer=a,t[Ei]=a.current,ih(t.nodeType===8?t.parentNode:t),$l(),a}for(;s=t.lastChild;)t.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var d=iy(c);l.call(d)}}var c=_C(t,0,!1,null,null,!1,!1,"",RR);return t._reactRootContainer=c,t[Ei]=c.current,ih(t.nodeType===8?t.parentNode:t),$l(function(){xb(e,c,n,r)}),c}function Sb(t,e,n,r,s){var o=n._reactRootContainer;if(o){var a=o;if(typeof s=="function"){var l=s;s=function(){var c=iy(a);l.call(c)}}xb(e,a,t,s)}else a=E8(n,e,t,s,r);return iy(a)}Ak=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=af(e.pendingLanes);n!==0&&(Bx(e,n|1),Br(e,Rn()),!(Et&6)&&(Dd=Rn()+500,$a()))}break;case 13:$l(function(){var r=Si(t,1);if(r!==null){var s=Sr();Ks(r,t,1,s)}}),wC(t,1)}};Ux=function(t){if(t.tag===13){var e=Si(t,134217728);if(e!==null){var n=Sr();Ks(e,t,134217728,n)}wC(t,134217728)}};Nk=function(t){if(t.tag===13){var e=ya(t),n=Si(t,e);if(n!==null){var r=Sr();Ks(n,t,e,r)}wC(t,e)}};Rk=function(){return kt};Pk=function(t,e){var n=kt;try{return kt=t,e()}finally{kt=n}};y1=function(t,e,n){switch(e){case"input":if(d1(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var s=mb(r);if(!s)throw Error(_e(90));ik(r),d1(r,s)}}}break;case"textarea":lk(t,n);break;case"select":e=n.value,e!=null&&ad(t,!!n.multiple,e,!1)}};mk=gC;gk=$l;var S8={usingClientEntryPoint:!1,Events:[tp,Wc,mb,hk,pk,gC]},Lu={findFiberByHostInstance:bl,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},A8={bundleType:Lu.bundleType,version:Lu.version,rendererPackageName:Lu.rendererPackageName,rendererConfig:Lu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ki.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=vk(t),t===null?null:t.stateNode},findFiberByHostInstance:Lu.findFiberByHostInstance||C8,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bm.isDisabled&&bm.supportsFiber)try{ub=bm.inject(A8),go=bm}catch{}}os.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=S8;os.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!CC(e))throw Error(_e(200));return x8(t,e,null,n)};os.createRoot=function(t,e){if(!CC(t))throw Error(_e(299));var n=!1,r="",s=XT;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=_C(t,1,!1,null,null,n,!1,r,s),t[Ei]=e.current,ih(t.nodeType===8?t.parentNode:t),new xC(e)};os.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(_e(188)):(t=Object.keys(t).join(","),Error(_e(268,t)));return t=vk(e),t=t===null?null:t.stateNode,t};os.flushSync=function(t){return $l(t)};os.hydrate=function(t,e,n){if(!Eb(e))throw Error(_e(200));return Sb(null,t,e,!0,n)};os.hydrateRoot=function(t,e,n){if(!CC(t))throw Error(_e(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",a=XT;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),e=JT(e,null,t,1,n??null,s,!1,o,a),t[Ei]=e.current,ih(t),r)for(t=0;t<r.length;t++)n=r[t],s=n._getVersion,s=s(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,s]:e.mutableSourceEagerHydrationData.push(n,s);return new Cb(e)};os.render=function(t,e,n){if(!Eb(e))throw Error(_e(200));return Sb(null,t,e,!1,n)};os.unmountComponentAtNode=function(t){if(!Eb(t))throw Error(_e(40));return t._reactRootContainer?($l(function(){Sb(null,null,t,!1,function(){t._reactRootContainer=null,t[Ei]=null})}),!0):!1};os.unstable_batchedUpdates=gC;os.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Eb(n))throw Error(_e(200));if(t==null||t._reactInternals===void 0)throw Error(_e(38));return Sb(t,e,n,!1,r)};os.version="18.2.0-next-9e3b772b8-20220608";function QT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(QT)}catch(t){console.error(t)}}QT(),JD.exports=os;var eI=JD.exports;const wl=to(eI);var PR=eI;r1.createRoot=PR.createRoot,r1.hydrateRoot=PR.hydrateRoot;/** * @remix-run/router v1.2.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function ay(){return ay=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ay.apply(this,arguments)}var sa;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(sa||(sa={}));const OR="popstate";function N8(t){t===void 0&&(t={});function e(r,s){let{pathname:o,search:a,hash:l}=r.location;return Z1("",{pathname:o,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:mh(s)}return O8(e,n,null,t)}function $n(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function R8(){return Math.random().toString(36).substr(2,8)}function FR(t){return{usr:t.state,key:t.key}}function Z1(t,e,n,r){return n===void 0&&(n=null),ay({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?nu(e):e,{state:n,key:e&&e.key||r||R8()})}function mh(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function nu(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function P8(t){let e=typeof window<"u"&&typeof window.location<"u"&&window.location.origin!=="null"?window.location.origin:window.location.href,n=typeof t=="string"?t:mh(t);return $n(e,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,e)}function O8(t,e,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,a=s.history,l=sa.Pop,c=null;function d(){l=sa.Pop,c&&c({action:l,location:g.location})}function u(E,S){l=sa.Push;let w=Z1(g.location,E,S);n&&n(w,E);let _=FR(w),h=g.createHref(w);try{a.pushState(_,"",h)}catch{s.location.assign(h)}o&&c&&c({action:l,location:g.location})}function f(E,S){l=sa.Replace;let w=Z1(g.location,E,S);n&&n(w,E);let _=FR(w),h=g.createHref(w);a.replaceState(_,"",h),o&&c&&c({action:l,location:g.location})}let g={get action(){return l},get location(){return t(s,a)},listen(E){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(OR,d),c=E,()=>{s.removeEventListener(OR,d),c=null}},createHref(E){return e(s,E)},encodeLocation(E){let S=P8(typeof E=="string"?E:mh(E));return{pathname:S.pathname,search:S.search,hash:S.hash}},push:u,replace:f,go(E){return a.go(E)}};return g}var DR;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(DR||(DR={}));function F8(t,e,n){n===void 0&&(n="/");let r=typeof e=="string"?nu(e):e,s=rI(r.pathname||"/",n);if(s==null)return null;let o=tI(t);D8(o);let a=null;for(let l=0;a==null&&l<o.length;++l)a=$8(o[l],Y8(s));return a}function tI(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(o,a,l)=>{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};c.relativePath.startsWith("/")&&($n(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let d=va([r,c.relativePath]),u=n.concat(c);o.children&&o.children.length>0&&($n(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),tI(o.children,e,u,d)),!(o.path==null&&!o.index)&&e.push({path:d,score:q8(d,o.index),routesMeta:u})};return t.forEach((o,a)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))s(o,a);else for(let c of nI(o.path))s(o,a,c)}),e}function nI(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let a=nI(r.join("/")),l=[];return l.push(...a.map(c=>c===""?o:[o,c].join("/"))),s&&l.push(...a),l.map(c=>t.startsWith("/")&&c===""?"/":c)}function D8(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:j8(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const k8=/^:\w+$/,T8=3,I8=2,M8=1,L8=10,z8=-2,kR=t=>t==="*";function q8(t,e){let n=t.split("/"),r=n.length;return n.some(kR)&&(r+=z8),e&&(r+=I8),n.filter(s=>!kR(s)).reduce((s,o)=>s+(k8.test(o)?T8:o===""?M8:L8),r)}function j8(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function $8(t,e){let{routesMeta:n}=t,r={},s="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],c=a===n.length-1,d=s==="/"?e:e.slice(s.length)||"/",u=B8({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d);if(!u)return null;Object.assign(r,u.params);let f=l.route;o.push({params:r,pathname:va([s,u.pathname]),pathnameBase:V8(va([s,u.pathnameBase])),route:f}),u.pathnameBase!=="/"&&(s=va([s,u.pathnameBase]))}return o}function B8(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=U8(t.path,t.caseSensitive,t.end),s=e.match(n);if(!s)return null;let o=s[0],a=o.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:r.reduce((d,u,f)=>{if(u==="*"){let g=l[f]||"";a=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}return d[u]=H8(l[f]||"",u),d},{}),pathname:o,pathnameBase:a,pattern:t}}function U8(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),EC(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(a,l)=>(r.push(l),"/([^\\/]+)"));return t.endsWith("*")?(r.push("*"),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function Y8(t){try{return decodeURI(t)}catch(e){return EC(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function H8(t,e){try{return decodeURIComponent(t)}catch(n){return EC(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),t}}function rI(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function EC(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function G8(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?nu(t):t;return{pathname:n?n.startsWith("/")?n:W8(n,e):e,search:K8(r),hash:Z8(s)}}function W8(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function R0(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function sI(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function oI(t,e,n,r){r===void 0&&(r=!1);let s;typeof t=="string"?s=nu(t):(s=ay({},t),$n(!s.pathname||!s.pathname.includes("?"),R0("?","pathname","search",s)),$n(!s.pathname||!s.pathname.includes("#"),R0("#","pathname","hash",s)),$n(!s.search||!s.search.includes("#"),R0("#","search","hash",s)));let o=t===""||s.pathname==="",a=o?"/":s.pathname,l;if(r||a==null)l=n;else{let f=e.length-1;if(a.startsWith("..")){let g=a.split("/");for(;g[0]==="..";)g.shift(),f-=1;s.pathname=g.join("/")}l=f>=0?e[f]:"/"}let c=G8(s,l),d=a&&a!=="/"&&a.endsWith("/"),u=(o||a===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||u)&&(c.pathname+="/"),c}const va=t=>t.join("/").replace(/\/\/+/g,"/"),V8=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),K8=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Z8=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class J8{constructor(e,n,r,s){s===void 0&&(s=!1),this.status=e,this.statusText=n||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function X8(t){return t instanceof J8}const iI=["post","put","patch","delete"];new Set(iI);const Q8=["get",...iI];new Set(Q8);/** * React Router v6.6.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function J1(){return J1=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},J1.apply(this,arguments)}function eH(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}const tH=typeof Object.is=="function"?Object.is:eH,{useState:nH,useEffect:rH,useLayoutEffect:sH,useDebugValue:oH}=n1;function iH(t,e,n){const r=e(),[{inst:s},o]=nH({inst:{value:r,getSnapshot:e}});return sH(()=>{s.value=r,s.getSnapshot=e,P0(s)&&o({inst:s})},[t,r,e]),rH(()=>(P0(s)&&o({inst:s}),t(()=>{P0(s)&&o({inst:s})})),[t]),oH(r),r}function P0(t){const e=t.getSnapshot,n=t.value;try{const r=e();return!tH(n,r)}catch{return!0}}function aH(t,e,n){return e()}const lH=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",cH=!lH,dH=cH?aH:iH;"useSyncExternalStore"in n1&&(t=>t.useSyncExternalStore)(n1);const uH=C.createContext(null),fH=C.createContext(null),SC=C.createContext(null),rp=C.createContext(null),Ab=C.createContext(null),ru=C.createContext({outlet:null,matches:[]}),aI=C.createContext(null);function hH(t,e){let{relative:n}=e===void 0?{}:e;sp()||$n(!1);let{basename:r,navigator:s}=C.useContext(rp),{hash:o,pathname:a,search:l}=AC(t,{relative:n}),c=a;return r!=="/"&&(c=a==="/"?r:va([r,a])),s.createHref({pathname:c,search:l,hash:o})}function sp(){return C.useContext(Ab)!=null}function Ss(){return sp()||$n(!1),C.useContext(Ab).location}function Rt(){sp()||$n(!1);let{basename:t,navigator:e}=C.useContext(rp),{matches:n}=C.useContext(ru),{pathname:r}=Ss(),s=JSON.stringify(sI(n).map(l=>l.pathnameBase)),o=C.useRef(!1);return C.useEffect(()=>{o.current=!0}),C.useCallback(function(l,c){if(c===void 0&&(c={}),!o.current)return;if(typeof l=="number"){e.go(l);return}let d=oI(l,JSON.parse(s),r,c.relative==="path");t!=="/"&&(d.pathname=d.pathname==="/"?t:va([t,d.pathname])),(c.replace?e.replace:e.push)(d,c.state,c)},[t,e,s,r])}function AC(t,e){let{relative:n}=e===void 0?{}:e,{matches:r}=C.useContext(ru),{pathname:s}=Ss(),o=JSON.stringify(sI(r).map(a=>a.pathnameBase));return C.useMemo(()=>oI(t,JSON.parse(o),s,n==="path"),[t,o,s,n])}function pH(t,e){sp()||$n(!1);let{navigator:n}=C.useContext(rp),r=C.useContext(SC),{matches:s}=C.useContext(ru),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Ss(),d;if(e){var u;let w=typeof e=="string"?nu(e):e;l==="/"||(u=w.pathname)!=null&&u.startsWith(l)||$n(!1),d=w}else d=c;let f=d.pathname||"/",g=l==="/"?f:f.slice(l.length)||"/",E=F8(t,{pathname:g}),S=bH(E&&E.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:va([l,n.encodeLocation?n.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:va([l,n.encodeLocation?n.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,r||void 0);return e&&S?C.createElement(Ab.Provider,{value:{location:J1({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:sa.Pop}},S):S}function mH(){let t=xH(),e=X8(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r};return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unhandled Thrown Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},e),n?C.createElement("pre",{style:s},n):null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:o},"errorElement")," props on ",C.createElement("code",{style:o},"<Route>")))}class gH extends C.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location?{error:e.error,location:e.location}:{error:e.error||n.error,location:n.location}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error?C.createElement(ru.Provider,{value:this.props.routeContext},C.createElement(aI.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function yH(t){let{routeContext:e,match:n,children:r}=t,s=C.useContext(uH);return s&&n.route.errorElement&&(s._deepestRenderedBoundaryId=n.route.id),C.createElement(ru.Provider,{value:e},r)}function bH(t,e,n){if(e===void 0&&(e=[]),t==null)if(n!=null&&n.errors)t=n.matches;else return null;let r=t,s=n==null?void 0:n.errors;if(s!=null){let o=r.findIndex(a=>a.route.id&&(s==null?void 0:s[a.route.id]));o>=0||$n(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((o,a,l)=>{let c=a.route.id?s==null?void 0:s[a.route.id]:null,d=n?a.route.errorElement||C.createElement(mH,null):null,u=e.concat(r.slice(0,l+1)),f=()=>C.createElement(yH,{match:a,routeContext:{outlet:o,matches:u}},c?d:a.route.element!==void 0?a.route.element:o);return n&&(a.route.errorElement||l===0)?C.createElement(gH,{location:n.location,component:d,error:c,children:f(),routeContext:{outlet:null,matches:u}}):f()},null)}var TR;(function(t){t.UseRevalidator="useRevalidator"})(TR||(TR={}));var ly;(function(t){t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator"})(ly||(ly={}));function vH(t){let e=C.useContext(SC);return e||$n(!1),e}function _H(t){let e=C.useContext(ru);return e||$n(!1),e}function wH(t){let e=_H(),n=e.matches[e.matches.length-1];return n.route.id||$n(!1),n.route.id}function xH(){var t;let e=C.useContext(aI),n=vH(ly.UseRouteError),r=wH(ly.UseRouteError);return e||((t=n.errors)==null?void 0:t[r])}function Le(t){$n(!1)}function CH(t){let{basename:e="/",children:n=null,location:r,navigationType:s=sa.Pop,navigator:o,static:a=!1}=t;sp()&&$n(!1);let l=e.replace(/^\/*/,"/"),c=C.useMemo(()=>({basename:l,navigator:o,static:a}),[l,o,a]);typeof r=="string"&&(r=nu(r));let{pathname:d="/",search:u="",hash:f="",state:g=null,key:E="default"}=r,S=C.useMemo(()=>{let w=rI(d,l);return w==null?null:{pathname:w,search:u,hash:f,state:g,key:E}},[l,d,u,f,g,E]);return S==null?null:C.createElement(rp.Provider,{value:c},C.createElement(Ab.Provider,{children:n,value:{location:S,navigationType:s}}))}function EH(t){let{children:e,location:n}=t,r=C.useContext(fH),s=r&&!e?r.router.routes:X1(e);return pH(s,n)}var IR;(function(t){t[t.pending=0]="pending",t[t.success=1]="success",t[t.error=2]="error"})(IR||(IR={}));new Promise(()=>{});function X1(t,e){e===void 0&&(e=[]);let n=[];return C.Children.forEach(t,(r,s)=>{if(!C.isValidElement(r))return;if(r.type===C.Fragment){n.push.apply(n,X1(r.props.children,e));return}r.type!==Le&&$n(!1),!r.props.index||!r.props.children||$n(!1);let o=[...e,s],a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,hasErrorBoundary:r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle};r.props.children&&(a.children=X1(r.props.children,o)),n.push(a)}),n}/** * React Router DOM v6.6.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function cy(){return cy=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},cy.apply(this,arguments)}function lI(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,o;for(o=0;o<r.length;o++)s=r[o],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function SH(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function AH(t,e){return t.button===0&&(!e||e==="_self")&&!SH(t)}const NH=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],RH=["aria-current","caseSensitive","className","end","style","to","children"];function PH(t){let{basename:e,children:n,window:r}=t,s=C.useRef();s.current==null&&(s.current=N8({window:r,v5Compat:!0}));let o=s.current,[a,l]=C.useState({action:o.action,location:o.location});return C.useLayoutEffect(()=>o.listen(l),[o]),C.createElement(CH,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o})}const Cr=C.forwardRef(function(e,n){let{onClick:r,relative:s,reloadDocument:o,replace:a,state:l,target:c,to:d,preventScrollReset:u}=e,f=lI(e,NH),g=hH(d,{relative:s}),E=OH(d,{replace:a,state:l,target:c,preventScrollReset:u,relative:s});function S(w){r&&r(w),w.defaultPrevented||E(w)}return C.createElement("a",cy({},f,{href:g,onClick:o?r:S,ref:n,target:c}))}),ve=C.forwardRef(function(e,n){let{"aria-current":r="page",caseSensitive:s=!1,className:o="",end:a=!1,style:l,to:c,children:d}=e,u=lI(e,RH),f=AC(c,{relative:u.relative}),g=Ss(),E=C.useContext(SC),{navigator:S}=C.useContext(rp),w=S.encodeLocation?S.encodeLocation(f).pathname:f.pathname,_=g.pathname,h=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;s||(_=_.toLowerCase(),h=h?h.toLowerCase():null,w=w.toLowerCase());let m=_===w||!a&&_.startsWith(w)&&_.charAt(w.length)==="/",A=h!=null&&(h===w||!a&&h.startsWith(w)&&h.charAt(w.length)==="/"),k=m?r:void 0,R;typeof o=="function"?R=o({isActive:m,isPending:A}):R=[o,m?"active":null,A?"pending":null].filter(Boolean).join(" ");let O=typeof l=="function"?l({isActive:m,isPending:A}):l;return C.createElement(Cr,cy({},u,{"aria-current":k,className:R,ref:n,style:O,to:c}),typeof d=="function"?d({isActive:m,isPending:A}):d)});var MR;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmitImpl="useSubmitImpl",t.UseFetcher="useFetcher"})(MR||(MR={}));var LR;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(LR||(LR={}));function OH(t,e){let{target:n,replace:r,state:s,preventScrollReset:o,relative:a}=e===void 0?{}:e,l=Rt(),c=Ss(),d=AC(t,{relative:a});return C.useCallback(u=>{if(AH(u,n)){u.preventDefault();let f=r!==void 0?r:mh(c)===mh(d);l(t,{replace:f,state:s,preventScrollReset:o,relative:a})}},[c,l,d,r,s,n,t,o,a])}const cI="/assets/logoNuevo-970deef3.png",FH=()=>i("header",{className:"d-flex justify-content-start logoEstilosDos",children:i("div",{className:"logoNuevo mb-5 mt-4",children:i("a",{href:"/",children:i("img",{className:"estiloLogo",src:cI,alt:"Logo"})})})});var dI={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],s=0;s<arguments.length;s++){var o=arguments[s];if(o){var a=typeof o;if(a==="string"||a==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var l=n.apply(null,o);l&&r.push(l)}}else if(a==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var c in o)e.call(o,c)&&o[c]&&r.push(c)}}}return r.join(" ")}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(dI);var DH=dI.exports;const Ye=to(DH);function Q1(){return Q1=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Q1.apply(this,arguments)}function uI(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,o;for(o=0;o<r.length;o++)s=r[o],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function zR(t){return"default"+t.charAt(0).toUpperCase()+t.substr(1)}function kH(t){var e=TH(t,"string");return typeof e=="symbol"?e:String(e)}function TH(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function NC(t,e,n){var r=C.useRef(t!==void 0),s=C.useState(e),o=s[0],a=s[1],l=t!==void 0,c=r.current;return r.current=l,!l&&c&&o!==e&&a(e),[l?t:o,C.useCallback(function(d){for(var u=arguments.length,f=new Array(u>1?u-1:0),g=1;g<u;g++)f[g-1]=arguments[g];n&&n.apply(void 0,[d].concat(f)),a(d)},[n])]}function op(t,e){return Object.keys(e).reduce(function(n,r){var s,o=n,a=o[zR(r)],l=o[r],c=uI(o,[zR(r),r].map(kH)),d=e[r],u=NC(l,a,t[d]),f=u[0],g=u[1];return Q1({},c,(s={},s[r]=f,s[d]=g,s))},t)}function ew(t,e){return ew=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},ew(t,e)}function IH(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ew(t,e)}const MH=["xxl","xl","lg","md","sm","xs"],LH="xs",Nb=C.createContext({prefixes:{},breakpoints:MH,minBreakpoint:LH});function ot(t,e){const{prefixes:n}=C.useContext(Nb);return t||n[e]||e}function fI(){const{breakpoints:t}=C.useContext(Nb);return t}function hI(){const{minBreakpoint:t}=C.useContext(Nb);return t}function ip(){const{dir:t}=C.useContext(Nb);return t==="rtl"}function su(t){return t&&t.ownerDocument||document}function zH(t){var e=su(t);return e&&e.defaultView||window}function qH(t,e){return zH(t).getComputedStyle(t,e)}var jH=/([A-Z])/g;function $H(t){return t.replace(jH,"-$1").toLowerCase()}var BH=/^ms-/;function vm(t){return $H(t).replace(BH,"-ms-")}var UH=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function YH(t){return!!(t&&UH.test(t))}function mi(t,e){var n="",r="";if(typeof e=="string")return t.style.getPropertyValue(vm(e))||qH(t).getPropertyValue(vm(e));Object.keys(e).forEach(function(s){var o=e[s];!o&&o!==0?t.style.removeProperty(vm(s)):YH(s)?r+=s+"("+o+") ":n+=vm(s)+": "+o+";"}),r&&(n+="transform: "+r+";"),t.style.cssText+=";"+n}var pI={exports:{}},HH="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",GH=HH,WH=GH;function mI(){}function gI(){}gI.resetWarningCache=mI;var VH=function(){function t(r,s,o,a,l,c){if(c!==WH){var d=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 d.name="Invariant Violation",d}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:gI,resetWarningCache:mI};return n.PropTypes=n,n};pI.exports=VH();var yI=pI.exports;const Ue=to(yI),qR={disabled:!1},bI=Fe.createContext(null);var KH=function(e){return e.scrollTop},cf="unmounted",Ji="exited",qs="entering",Xo="entered",gh="exiting",Ti=function(t){IH(e,t);function e(r,s){var o;o=t.call(this,r,s)||this;var a=s,l=a&&!a.isMounting?r.enter:r.appear,c;return o.appearStatus=null,r.in?l?(c=Ji,o.appearStatus=qs):c=Xo:r.unmountOnExit||r.mountOnEnter?c=cf:c=Ji,o.state={status:c},o.nextCallback=null,o}e.getDerivedStateFromProps=function(s,o){var a=s.in;return a&&o.status===cf?{status:Ji}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(s){var o=null;if(s!==this.props){var a=this.state.status;this.props.in?a!==qs&&a!==Xo&&(o=qs):(a===qs||a===Xo)&&(o=gh)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var s=this.props.timeout,o,a,l;return o=a=l=s,s!=null&&typeof s!="number"&&(o=s.exit,a=s.enter,l=s.appear!==void 0?s.appear:a),{exit:o,enter:a,appear:l}},n.updateStatus=function(s,o){if(s===void 0&&(s=!1),o!==null)if(this.cancelNextCallback(),o===qs){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:wl.findDOMNode(this);a&&KH(a)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ji&&this.setState({status:cf})},n.performEnter=function(s){var o=this,a=this.props.enter,l=this.context?this.context.isMounting:s,c=this.props.nodeRef?[l]:[wl.findDOMNode(this),l],d=c[0],u=c[1],f=this.getTimeouts(),g=l?f.appear:f.enter;if(!s&&!a||qR.disabled){this.safeSetState({status:Xo},function(){o.props.onEntered(d)});return}this.props.onEnter(d,u),this.safeSetState({status:qs},function(){o.props.onEntering(d,u),o.onTransitionEnd(g,function(){o.safeSetState({status:Xo},function(){o.props.onEntered(d,u)})})})},n.performExit=function(){var s=this,o=this.props.exit,a=this.getTimeouts(),l=this.props.nodeRef?void 0:wl.findDOMNode(this);if(!o||qR.disabled){this.safeSetState({status:Ji},function(){s.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:gh},function(){s.props.onExiting(l),s.onTransitionEnd(a.exit,function(){s.safeSetState({status:Ji},function(){s.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(s,o){o=this.setNextCallback(o),this.setState(s,o)},n.setNextCallback=function(s){var o=this,a=!0;return this.nextCallback=function(l){a&&(a=!1,o.nextCallback=null,s(l))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(s,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:wl.findDOMNode(this),l=s==null&&!this.props.addEndListener;if(!a||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],d=c[0],u=c[1];this.props.addEndListener(d,u)}s!=null&&setTimeout(this.nextCallback,s)},n.render=function(){var s=this.state.status;if(s===cf)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var l=uI(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Fe.createElement(bI.Provider,{value:null},typeof a=="function"?a(s,l):Fe.cloneElement(Fe.Children.only(a),l))},e}(Fe.Component);Ti.contextType=bI;Ti.propTypes={};function yc(){}Ti.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:yc,onEntering:yc,onEntered:yc,onExit:yc,onExiting:yc,onExited:yc};Ti.UNMOUNTED=cf;Ti.EXITED=Ji;Ti.ENTERING=qs;Ti.ENTERED=Xo;Ti.EXITING=gh;const ZH=Ti,ou=!!(typeof window<"u"&&window.document&&window.document.createElement);var tw=!1,nw=!1;try{var O0={get passive(){return tw=!0},get once(){return nw=tw=!0}};ou&&(window.addEventListener("test",O0,O0),window.removeEventListener("test",O0,!0))}catch{}function RC(t,e,n,r){if(r&&typeof r!="boolean"&&!nw){var s=r.once,o=r.capture,a=n;!nw&&s&&(a=n.__once||function l(c){this.removeEventListener(e,l,o),n.call(this,c)},n.__once=a),t.addEventListener(e,a,tw?r:o)}t.addEventListener(e,n,r)}function rw(t,e,n,r){var s=r&&typeof r!="boolean"?r.capture:r;t.removeEventListener(e,n,s),n.__once&&t.removeEventListener(e,n.__once,s)}function ni(t,e,n,r){return RC(t,e,n,r),function(){rw(t,e,n,r)}}function JH(t,e,n,r){if(n===void 0&&(n=!1),r===void 0&&(r=!0),t){var s=document.createEvent("HTMLEvents");s.initEvent(e,n,r),t.dispatchEvent(s)}}function XH(t){var e=mi(t,"transitionDuration")||"",n=e.indexOf("ms")===-1?1e3:1;return parseFloat(e)*n}function QH(t,e,n){n===void 0&&(n=5);var r=!1,s=setTimeout(function(){r||JH(t,"transitionend",!0)},e+n),o=ni(t,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(s),o()}}function vI(t,e,n,r){n==null&&(n=XH(t)||0);var s=QH(t,n,r),o=ni(t,"transitionend",e);return function(){s(),o()}}function jR(t,e){const n=mi(t,e)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function Rb(t,e){const n=jR(t,"transitionDuration"),r=jR(t,"transitionDelay"),s=vI(t,o=>{o.target===t&&(s(),e(o))},n+r)}function zu(...t){return t.filter(e=>e!=null).reduce((e,n)=>{if(typeof n!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return e===null?n:function(...s){e.apply(this,s),n.apply(this,s)}},null)}function PC(t){t.offsetHeight}var $R=function(e){return!e||typeof e=="function"?e:function(n){e.current=n}};function e7(t,e){var n=$R(t),r=$R(e);return function(s){n&&n(s),r&&r(s)}}function Ba(t,e){return C.useMemo(function(){return e7(t,e)},[t,e])}function dy(t){return t&&"setState"in t?wl.findDOMNode(t):t??null}const t7=Fe.forwardRef(({onEnter:t,onEntering:e,onEntered:n,onExit:r,onExiting:s,onExited:o,addEndListener:a,children:l,childRef:c,...d},u)=>{const f=C.useRef(null),g=Ba(f,c),E=O=>{g(dy(O))},S=O=>N=>{O&&f.current&&O(f.current,N)},w=C.useCallback(S(t),[t]),_=C.useCallback(S(e),[e]),h=C.useCallback(S(n),[n]),m=C.useCallback(S(r),[r]),A=C.useCallback(S(s),[s]),k=C.useCallback(S(o),[o]),R=C.useCallback(S(a),[a]);return i(ZH,{ref:u,...d,onEnter:w,onEntered:h,onEntering:_,onExit:m,onExited:k,onExiting:A,addEndListener:R,nodeRef:f,children:typeof l=="function"?(O,N)=>l(O,{...N,ref:E}):Fe.cloneElement(l,{ref:E})})}),Pb=t7,n7={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function _I(t,e){const n=`offset${t[0].toUpperCase()}${t.slice(1)}`,r=e[n],s=n7[t];return r+parseInt(mi(e,s[0]),10)+parseInt(mi(e,s[1]),10)}const r7={[Ji]:"collapse",[gh]:"collapsing",[qs]:"collapsing",[Xo]:"collapse show"},s7={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,getDimensionValue:_I},wI=Fe.forwardRef(({onEnter:t,onEntering:e,onEntered:n,onExit:r,onExiting:s,className:o,children:a,dimension:l="height",getDimensionValue:c=_I,...d},u)=>{const f=typeof l=="function"?l():l,g=C.useMemo(()=>zu(h=>{h.style[f]="0"},t),[f,t]),E=C.useMemo(()=>zu(h=>{const m=`scroll${f[0].toUpperCase()}${f.slice(1)}`;h.style[f]=`${h[m]}px`},e),[f,e]),S=C.useMemo(()=>zu(h=>{h.style[f]=null},n),[f,n]),w=C.useMemo(()=>zu(h=>{h.style[f]=`${c(f,h)}px`,PC(h)},r),[r,c,f]),_=C.useMemo(()=>zu(h=>{h.style[f]=null},s),[f,s]);return i(Pb,{ref:u,addEndListener:Rb,...d,"aria-expanded":d.role?d.in:null,onEnter:g,onEntering:E,onEntered:S,onExit:w,onExiting:_,childRef:a.ref,children:(h,m)=>Fe.cloneElement(a,{...m,className:Ye(o,a.props.className,r7[h],f==="width"&&"collapse-horizontal")})})});wI.defaultProps=s7;const o7=wI;function xI(t){var e=C.useRef(t);return C.useEffect(function(){e.current=t},[t]),e}function nn(t){var e=xI(t);return C.useCallback(function(){return e.current&&e.current.apply(e,arguments)},[e])}function yh(){return C.useState(null)}function i7(t,e,n,r){r===void 0&&(r=!1);var s=nn(n);C.useEffect(function(){var o=typeof t=="function"?t():t;return o.addEventListener(e,s,r),function(){return o.removeEventListener(e,s,r)}},[t])}function OC(){var t=C.useRef(!0),e=C.useRef(function(){return t.current});return C.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),e.current}function CI(t){var e=C.useRef(null);return C.useEffect(function(){e.current=t}),e.current}var a7=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",l7=typeof document<"u";const FC=l7||a7?C.useLayoutEffect:C.useEffect,c7=["as","disabled"];function d7(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,o;for(o=0;o<r.length;o++)s=r[o],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function u7(t){return!t||t.trim()==="#"}function DC({tagName:t,disabled:e,href:n,target:r,rel:s,role:o,onClick:a,tabIndex:l=0,type:c}){t||(n!=null||r!=null||s!=null?t="a":t="button");const d={tagName:t};if(t==="button")return[{type:c||"button",disabled:e},d];const u=g=>{if((e||t==="a"&&u7(n))&&g.preventDefault(),e){g.stopPropagation();return}a==null||a(g)},f=g=>{g.key===" "&&(g.preventDefault(),u(g))};return t==="a"&&(n||(n="#"),e&&(n=void 0)),[{role:o??"button",disabled:void 0,tabIndex:e?void 0:l,href:n,target:t==="a"?r:void 0,"aria-disabled":e||void 0,rel:t==="a"?s:void 0,onClick:u,onKeyDown:f},d]}const kC=C.forwardRef((t,e)=>{let{as:n,disabled:r}=t,s=d7(t,c7);const[o,{tagName:a}]=DC(Object.assign({tagName:n,disabled:r},s));return i(a,Object.assign({},s,o,{ref:e}))});kC.displayName="Button";const f7=["onKeyDown"];function h7(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,o;for(o=0;o<r.length;o++)s=r[o],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function p7(t){return!t||t.trim()==="#"}const EI=C.forwardRef((t,e)=>{let{onKeyDown:n}=t,r=h7(t,f7);const[s]=DC(Object.assign({tagName:"a"},r)),o=nn(a=>{s.onKeyDown(a),n==null||n(a)});return p7(r.href)||r.role==="button"?i("a",Object.assign({ref:e},r,s,{onKeyDown:o})):i("a",Object.assign({ref:e},r,{onKeyDown:n}))});EI.displayName="Anchor";const bh=EI,m7={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1},g7={[qs]:"show",[Xo]:"show"},TC=C.forwardRef(({className:t,children:e,transitionClasses:n={},...r},s)=>{const o=C.useCallback((a,l)=>{PC(a),r.onEnter==null||r.onEnter(a,l)},[r]);return i(Pb,{ref:s,addEndListener:Rb,...r,onEnter:o,childRef:e.ref,children:(a,l)=>C.cloneElement(e,{...l,className:Ye("fade",t,e.props.className,g7[a],n[a])})})});TC.defaultProps=m7;TC.displayName="Fade";const nc=TC,y7={"aria-label":Ue.string,onClick:Ue.func,variant:Ue.oneOf(["white"])},b7={"aria-label":"Close"},Ob=C.forwardRef(({className:t,variant:e,...n},r)=>i("button",{ref:r,type:"button",className:Ye("btn-close",e&&`btn-close-${e}`,t),...n}));Ob.displayName="CloseButton";Ob.propTypes=y7;Ob.defaultProps=b7;const SI=Ob,ap=t=>C.forwardRef((e,n)=>i("div",{...e,ref:n,className:Ye(e.className,t)}));var v7=/-(.)/g;function _7(t){return t.replace(v7,function(e,n){return n.toUpperCase()})}const w7=t=>t[0].toUpperCase()+_7(t).slice(1);function _n(t,{displayName:e=w7(t),Component:n,defaultProps:r}={}){const s=C.forwardRef(({className:o,bsPrefix:a,as:l=n||"div",...c},d)=>{const u=ot(a,t);return i(l,{ref:d,className:Ye(o,u),...c})});return s.defaultProps=r,s.displayName=e,s}const AI=ap("h4");AI.displayName="DivStyledAsH4";const x7=_n("alert-heading",{Component:AI}),C7=_n("alert-link",{Component:bh}),E7={variant:"primary",show:!0,transition:nc,closeLabel:"Close alert"},IC=C.forwardRef((t,e)=>{const{bsPrefix:n,show:r,closeLabel:s,closeVariant:o,className:a,children:l,variant:c,onClose:d,dismissible:u,transition:f,...g}=op(t,{show:"onClose"}),E=ot(n,"alert"),S=nn(h=>{d&&d(!1,h)}),w=f===!0?nc:f,_=p("div",{role:"alert",...w?void 0:g,ref:e,className:Ye(a,E,c&&`${E}-${c}`,u&&`${E}-dismissible`),children:[u&&i(SI,{onClick:S,"aria-label":s,variant:o}),l]});return w?i(w,{unmountOnExit:!0,...g,ref:void 0,in:r,children:_}):r?_:null});IC.displayName="Alert";IC.defaultProps=E7;const NI=Object.assign(IC,{Link:C7,Heading:x7}),S7={variant:"primary",active:!1,disabled:!1},MC=C.forwardRef(({as:t,bsPrefix:e,variant:n,size:r,active:s,className:o,...a},l)=>{const c=ot(e,"btn"),[d,{tagName:u}]=DC({tagName:t,...a});return i(u,{...d,...a,ref:l,className:Ye(o,c,s&&"active",n&&`${c}-${n}`,r&&`${c}-${r}`,a.href&&a.disabled&&"disabled")})});MC.displayName="Button";MC.defaultProps=S7;const Qe=MC,RI=C.forwardRef(({bsPrefix:t,className:e,variant:n,as:r="img",...s},o)=>{const a=ot(t,"card-img");return i(r,{ref:o,className:Ye(n?`${a}-${n}`:a,e),...s})});RI.displayName="CardImg";const A7=RI,PI=C.createContext(null);PI.displayName="CardHeaderContext";const OI=PI,FI=C.forwardRef(({bsPrefix:t,className:e,as:n="div",...r},s)=>{const o=ot(t,"card-header"),a=C.useMemo(()=>({cardHeaderBsPrefix:o}),[o]);return i(OI.Provider,{value:a,children:i(n,{ref:s,...r,className:Ye(e,o)})})});FI.displayName="CardHeader";const N7=FI,R7=ap("h5"),P7=ap("h6"),DI=_n("card-body"),O7=_n("card-title",{Component:R7}),F7=_n("card-subtitle",{Component:P7}),D7=_n("card-link",{Component:"a"}),k7=_n("card-text",{Component:"p"}),T7=_n("card-footer"),I7=_n("card-img-overlay"),M7={body:!1},LC=C.forwardRef(({bsPrefix:t,className:e,bg:n,text:r,border:s,body:o,children:a,as:l="div",...c},d)=>{const u=ot(t,"card");return i(l,{ref:d,...c,className:Ye(e,u,n&&`bg-${n}`,r&&`text-${r}`,s&&`border-${s}`),children:o?i(DI,{children:a}):a})});LC.displayName="Card";LC.defaultProps=M7;const Wn=Object.assign(LC,{Img:A7,Title:O7,Subtitle:F7,Body:DI,Link:D7,Text:k7,Header:N7,Footer:T7,ImgOverlay:I7});function L7(t,e){var n=C.useRef(!0);C.useEffect(function(){if(n.current){n.current=!1;return}return t()},e)}function z7(t){var e=C.useRef(t);return e.current=t,e}function zC(t){var e=z7(t);C.useEffect(function(){return function(){return e.current()}},[])}var sw=Math.pow(2,31)-1;function kI(t,e,n){var r=n-Date.now();t.current=r<=sw?setTimeout(e,r):setTimeout(function(){return kI(t,e,n)},sw)}function TI(){var t=OC(),e=C.useRef();return zC(function(){return clearTimeout(e.current)}),C.useMemo(function(){var n=function(){return clearTimeout(e.current)};function r(s,o){o===void 0&&(o=0),t()&&(n(),o<=sw?e.current=setTimeout(s,o):kI(e,s,Date.now()+o))}return{set:r,clear:n}},[])}const q7=_n("carousel-caption"),II=C.forwardRef(({as:t="div",bsPrefix:e,className:n,...r},s)=>{const o=Ye(n,ot(e,"carousel-item"));return i(t,{ref:s,...r,className:o})});II.displayName="CarouselItem";const j7=II;function ow(t,e){let n=0;return C.Children.map(t,r=>C.isValidElement(r)?e(r,n++):r)}function $7(t,e){let n=0;C.Children.forEach(t,r=>{C.isValidElement(r)&&e(r,n++)})}function B7(t,e){return C.Children.toArray(t).some(n=>C.isValidElement(n)&&n.type===e)}const U7=40,Y7={slide:!0,fade:!1,controls:!0,indicators:!0,indicatorLabels:[],defaultActiveIndex:0,interval:5e3,keyboard:!0,pause:"hover",wrap:!0,touch:!0,prevIcon:i("span",{"aria-hidden":"true",className:"carousel-control-prev-icon"}),prevLabel:"Previous",nextIcon:i("span",{"aria-hidden":"true",className:"carousel-control-next-icon"}),nextLabel:"Next"};function H7(t){if(!t||!t.style||!t.parentNode||!t.parentNode.style)return!1;const e=getComputedStyle(t);return e.display!=="none"&&e.visibility!=="hidden"&&getComputedStyle(t.parentNode).display!=="none"}const qC=C.forwardRef((t,e)=>{const{as:n="div",bsPrefix:r,slide:s,fade:o,controls:a,indicators:l,indicatorLabels:c,activeIndex:d,onSelect:u,onSlide:f,onSlid:g,interval:E,keyboard:S,onKeyDown:w,pause:_,onMouseOver:h,onMouseOut:m,wrap:A,touch:k,onTouchStart:R,onTouchMove:O,onTouchEnd:N,prevIcon:y,prevLabel:v,nextIcon:b,nextLabel:P,variant:F,className:I,children:T,...q}=op(t,{activeIndex:"onSelect"}),W=ot(r,"carousel"),G=ip(),H=C.useRef(null),[j,U]=C.useState("next"),[L,K]=C.useState(!1),[Y,te]=C.useState(!1),[J,Q]=C.useState(d||0);C.useEffect(()=>{!Y&&d!==J&&(H.current?U(H.current):U((d||0)>J?"next":"prev"),s&&te(!0),Q(d||0))},[d,Y,J,s]),C.useEffect(()=>{H.current&&(H.current=null)});let oe=0,pe;$7(T,(Ve,X)=>{++oe,X===d&&(pe=Ve.props.interval)});const ye=xI(pe),Pe=C.useCallback(Ve=>{if(Y)return;let X=J-1;if(X<0){if(!A)return;X=oe-1}H.current="prev",u==null||u(X,Ve)},[Y,J,u,A,oe]),Me=nn(Ve=>{if(Y)return;let X=J+1;if(X>=oe){if(!A)return;X=0}H.current="next",u==null||u(X,Ve)}),He=C.useRef();C.useImperativeHandle(e,()=>({element:He.current,prev:Pe,next:Me}));const ie=nn(()=>{!document.hidden&&H7(He.current)&&(G?Pe():Me())}),Se=j==="next"?"start":"end";L7(()=>{s||(f==null||f(J,Se),g==null||g(J,Se))},[J]);const he=`${W}-item-${j}`,Je=`${W}-item-${Se}`,Ct=C.useCallback(Ve=>{PC(Ve),f==null||f(J,Se)},[f,J,Se]),de=C.useCallback(()=>{te(!1),g==null||g(J,Se)},[g,J,Se]),le=C.useCallback(Ve=>{if(S&&!/input|textarea/i.test(Ve.target.tagName))switch(Ve.key){case"ArrowLeft":Ve.preventDefault(),G?Me(Ve):Pe(Ve);return;case"ArrowRight":Ve.preventDefault(),G?Pe(Ve):Me(Ve);return}w==null||w(Ve)},[S,w,Pe,Me,G]),Oe=C.useCallback(Ve=>{_==="hover"&&K(!0),h==null||h(Ve)},[_,h]),Ke=C.useCallback(Ve=>{K(!1),m==null||m(Ve)},[m]),it=C.useRef(0),It=C.useRef(0),wn=TI(),me=C.useCallback(Ve=>{it.current=Ve.touches[0].clientX,It.current=0,_==="hover"&&K(!0),R==null||R(Ve)},[_,R]),Kt=C.useCallback(Ve=>{Ve.touches&&Ve.touches.length>1?It.current=0:It.current=Ve.touches[0].clientX-it.current,O==null||O(Ve)},[O]),Bn=C.useCallback(Ve=>{if(k){const X=It.current;Math.abs(X)>U7&&(X>0?Pe(Ve):Me(Ve))}_==="hover"&&wn.set(()=>{K(!1)},E||void 0),N==null||N(Ve)},[k,_,Pe,Me,wn,E,N]),Sn=E!=null&&!L&&!Y,nt=C.useRef();C.useEffect(()=>{var Ve,X;if(!Sn)return;const re=G?Pe:Me;return nt.current=window.setInterval(document.visibilityState?ie:re,(Ve=(X=ye.current)!=null?X:E)!=null?Ve:void 0),()=>{nt.current!==null&&clearInterval(nt.current)}},[Sn,Pe,Me,ye,E,ie,G]);const Un=C.useMemo(()=>l&&Array.from({length:oe},(Ve,X)=>re=>{u==null||u(X,re)}),[l,oe,u]);return p(n,{ref:He,...q,onKeyDown:le,onMouseOver:Oe,onMouseOut:Ke,onTouchStart:me,onTouchMove:Kt,onTouchEnd:Bn,className:Ye(I,W,s&&"slide",o&&`${W}-fade`,F&&`${W}-${F}`),children:[l&&i("div",{className:`${W}-indicators`,children:ow(T,(Ve,X)=>i("button",{type:"button","data-bs-target":"","aria-label":c!=null&&c.length?c[X]:`Slide ${X+1}`,className:X===J?"active":void 0,onClick:Un?Un[X]:void 0,"aria-current":X===J},X))}),i("div",{className:`${W}-inner`,children:ow(T,(Ve,X)=>{const re=X===J;return s?i(Pb,{in:re,onEnter:re?Ct:void 0,onEntered:re?de:void 0,addEndListener:Rb,children:(fe,ue)=>C.cloneElement(Ve,{...ue,className:Ye(Ve.props.className,re&&fe!=="entered"&&he,(fe==="entered"||fe==="exiting")&&"active",(fe==="entering"||fe==="exiting")&&Je)})}):C.cloneElement(Ve,{className:Ye(Ve.props.className,re&&"active")})})}),a&&p(ee,{children:[(A||d!==0)&&p(bh,{className:`${W}-control-prev`,onClick:Pe,children:[y,v&&i("span",{className:"visually-hidden",children:v})]}),(A||d!==oe-1)&&p(bh,{className:`${W}-control-next`,onClick:Me,children:[b,P&&i("span",{className:"visually-hidden",children:P})]})]})]})});qC.displayName="Carousel";qC.defaultProps=Y7;const _m=Object.assign(qC,{Caption:q7,Item:j7});function G7({as:t,bsPrefix:e,className:n,...r}){e=ot(e,"col");const s=fI(),o=hI(),a=[],l=[];return s.forEach(c=>{const d=r[c];delete r[c];let u,f,g;typeof d=="object"&&d!=null?{span:u,offset:f,order:g}=d:u=d;const E=c!==o?`-${c}`:"";u&&a.push(u===!0?`${e}${E}`:`${e}${E}-${u}`),g!=null&&l.push(`order${E}-${g}`),f!=null&&l.push(`offset${E}-${f}`)}),[{...r,className:Ye(n,...a,...l)},{as:t,bsPrefix:e,spans:a}]}const MI=C.forwardRef((t,e)=>{const[{className:n,...r},{as:s="div",bsPrefix:o,spans:a}]=G7(t);return i(s,{...r,ref:e,className:Ye(n,!a.length&&o)})});MI.displayName="Col";const $=MI;var W7=Function.prototype.bind.call(Function.prototype.call,[].slice);function Vo(t,e){return W7(t.querySelectorAll(e))}function LI(){var t=C.useReducer(function(n){return!n},!1),e=t[1];return e}const V7=C.createContext(null),Fb=V7;var BR=Object.prototype.hasOwnProperty;function UR(t,e,n){for(n of t.keys())if(Pf(n,e))return n}function Pf(t,e){var n,r,s;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((r=t.length)===e.length)for(;r--&&Pf(t[r],e[r]););return r===-1}if(n===Set){if(t.size!==e.size)return!1;for(r of t)if(s=r,s&&typeof s=="object"&&(s=UR(e,s),!s)||!e.has(s))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(r of t)if(s=r[0],s&&typeof s=="object"&&(s=UR(e,s),!s)||!Pf(r[1],e.get(s)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((r=t.byteLength)===e.byteLength)for(;r--&&t.getInt8(r)===e.getInt8(r););return r===-1}if(ArrayBuffer.isView(t)){if((r=t.byteLength)===e.byteLength)for(;r--&&t[r]===e[r];);return r===-1}if(!n||typeof t=="object"){r=0;for(n in t)if(BR.call(t,n)&&++r&&!BR.call(e,n)||!(n in e)||!Pf(t[n],e[n]))return!1;return Object.keys(e).length===r}}return t!==t&&e!==e}function K7(t){var e=OC();return[t[0],C.useCallback(function(n){if(e())return t[1](n)},[e,t[1]])]}var Ar="top",rs="bottom",ss="right",Nr="left",Db="auto",iu=[Ar,rs,ss,Nr],Bl="start",kd="end",zI="clippingParents",jC="viewport",Tc="popper",qI="reference",iw=iu.reduce(function(t,e){return t.concat([e+"-"+Bl,e+"-"+kd])},[]),$C=[].concat(iu,[Db]).reduce(function(t,e){return t.concat([e,e+"-"+Bl,e+"-"+kd])},[]),jI="beforeRead",$I="read",BI="afterRead",UI="beforeMain",YI="main",HI="afterMain",GI="beforeWrite",WI="write",VI="afterWrite",KI=[jI,$I,BI,UI,YI,HI,GI,WI,VI];function bo(t){return t.split("-")[0]}function As(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ul(t){var e=As(t).Element;return t instanceof e||t instanceof Element}function _s(t){var e=As(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function BC(t){if(typeof ShadowRoot>"u")return!1;var e=As(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}var Pl=Math.max,uy=Math.min,Td=Math.round;function aw(){var t=navigator.userAgentData;return t!=null&&t.brands?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ZI(){return!/^((?!chrome|android).)*safari/i.test(aw())}function Id(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),s=1,o=1;e&&_s(t)&&(s=t.offsetWidth>0&&Td(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Td(r.height)/t.offsetHeight||1);var a=Ul(t)?As(t):window,l=a.visualViewport,c=!ZI()&&n,d=(r.left+(c&&l?l.offsetLeft:0))/s,u=(r.top+(c&&l?l.offsetTop:0))/o,f=r.width/s,g=r.height/o;return{width:f,height:g,top:u,right:d+f,bottom:u+g,left:d,x:d,y:u}}function UC(t){var e=Id(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function JI(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&BC(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function wo(t){return t?(t.nodeName||"").toLowerCase():null}function Ni(t){return As(t).getComputedStyle(t)}function Z7(t){return["table","td","th"].indexOf(wo(t))>=0}function Ua(t){return((Ul(t)?t.ownerDocument:t.document)||window.document).documentElement}function kb(t){return wo(t)==="html"?t:t.assignedSlot||t.parentNode||(BC(t)?t.host:null)||Ua(t)}function YR(t){return!_s(t)||Ni(t).position==="fixed"?null:t.offsetParent}function J7(t){var e=/firefox/i.test(aw()),n=/Trident/i.test(aw());if(n&&_s(t)){var r=Ni(t);if(r.position==="fixed")return null}var s=kb(t);for(BC(s)&&(s=s.host);_s(s)&&["html","body"].indexOf(wo(s))<0;){var o=Ni(s);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return s;s=s.parentNode}return null}function lp(t){for(var e=As(t),n=YR(t);n&&Z7(n)&&Ni(n).position==="static";)n=YR(n);return n&&(wo(n)==="html"||wo(n)==="body"&&Ni(n).position==="static")?e:n||J7(t)||e}function YC(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Of(t,e,n){return Pl(t,uy(e,n))}function X7(t,e,n){var r=Of(t,e,n);return r>n?n:r}function XI(){return{top:0,right:0,bottom:0,left:0}}function QI(t){return Object.assign({},XI(),t)}function eM(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Q7=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,QI(typeof e!="number"?e:eM(e,iu))};function eG(t){var e,n=t.state,r=t.name,s=t.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,l=bo(n.placement),c=YC(l),d=[Nr,ss].indexOf(l)>=0,u=d?"height":"width";if(!(!o||!a)){var f=Q7(s.padding,n),g=UC(o),E=c==="y"?Ar:Nr,S=c==="y"?rs:ss,w=n.rects.reference[u]+n.rects.reference[c]-a[c]-n.rects.popper[u],_=a[c]-n.rects.reference[c],h=lp(o),m=h?c==="y"?h.clientHeight||0:h.clientWidth||0:0,A=w/2-_/2,k=f[E],R=m-g[u]-f[S],O=m/2-g[u]/2+A,N=Of(k,O,R),y=c;n.modifiersData[r]=(e={},e[y]=N,e.centerOffset=N-O,e)}}function tG(t){var e=t.state,n=t.options,r=n.element,s=r===void 0?"[data-popper-arrow]":r;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||JI(e.elements.popper,s)&&(e.elements.arrow=s))}const HC={name:"arrow",enabled:!0,phase:"main",fn:eG,effect:tG,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Md(t){return t.split("-")[1]}var nG={top:"auto",right:"auto",bottom:"auto",left:"auto"};function rG(t){var e=t.x,n=t.y,r=window,s=r.devicePixelRatio||1;return{x:Td(e*s)/s||0,y:Td(n*s)/s||0}}function HR(t){var e,n=t.popper,r=t.popperRect,s=t.placement,o=t.variation,a=t.offsets,l=t.position,c=t.gpuAcceleration,d=t.adaptive,u=t.roundOffsets,f=t.isFixed,g=a.x,E=g===void 0?0:g,S=a.y,w=S===void 0?0:S,_=typeof u=="function"?u({x:E,y:w}):{x:E,y:w};E=_.x,w=_.y;var h=a.hasOwnProperty("x"),m=a.hasOwnProperty("y"),A=Nr,k=Ar,R=window;if(d){var O=lp(n),N="clientHeight",y="clientWidth";if(O===As(n)&&(O=Ua(n),Ni(O).position!=="static"&&l==="absolute"&&(N="scrollHeight",y="scrollWidth")),O=O,s===Ar||(s===Nr||s===ss)&&o===kd){k=rs;var v=f&&O===R&&R.visualViewport?R.visualViewport.height:O[N];w-=v-r.height,w*=c?1:-1}if(s===Nr||(s===Ar||s===rs)&&o===kd){A=ss;var b=f&&O===R&&R.visualViewport?R.visualViewport.width:O[y];E-=b-r.width,E*=c?1:-1}}var P=Object.assign({position:l},d&&nG),F=u===!0?rG({x:E,y:w}):{x:E,y:w};if(E=F.x,w=F.y,c){var I;return Object.assign({},P,(I={},I[k]=m?"0":"",I[A]=h?"0":"",I.transform=(R.devicePixelRatio||1)<=1?"translate("+E+"px, "+w+"px)":"translate3d("+E+"px, "+w+"px, 0)",I))}return Object.assign({},P,(e={},e[k]=m?w+"px":"",e[A]=h?E+"px":"",e.transform="",e))}function sG(t){var e=t.state,n=t.options,r=n.gpuAcceleration,s=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,d={placement:bo(e.placement),variation:Md(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,HR(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,HR(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Tb={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:sG,data:{}};var wm={passive:!0};function oG(t){var e=t.state,n=t.instance,r=t.options,s=r.scroll,o=s===void 0?!0:s,a=r.resize,l=a===void 0?!0:a,c=As(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&d.forEach(function(u){u.addEventListener("scroll",n.update,wm)}),l&&c.addEventListener("resize",n.update,wm),function(){o&&d.forEach(function(u){u.removeEventListener("scroll",n.update,wm)}),l&&c.removeEventListener("resize",n.update,wm)}}const Ib={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:oG,data:{}};var iG={left:"right",right:"left",bottom:"top",top:"bottom"};function yg(t){return t.replace(/left|right|bottom|top/g,function(e){return iG[e]})}var aG={start:"end",end:"start"};function GR(t){return t.replace(/start|end/g,function(e){return aG[e]})}function GC(t){var e=As(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function WC(t){return Id(Ua(t)).left+GC(t).scrollLeft}function lG(t,e){var n=As(t),r=Ua(t),s=n.visualViewport,o=r.clientWidth,a=r.clientHeight,l=0,c=0;if(s){o=s.width,a=s.height;var d=ZI();(d||!d&&e==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:o,height:a,x:l+WC(t),y:c}}function cG(t){var e,n=Ua(t),r=GC(t),s=(e=t.ownerDocument)==null?void 0:e.body,o=Pl(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),a=Pl(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),l=-r.scrollLeft+WC(t),c=-r.scrollTop;return Ni(s||n).direction==="rtl"&&(l+=Pl(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:a,x:l,y:c}}function VC(t){var e=Ni(t),n=e.overflow,r=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+r)}function tM(t){return["html","body","#document"].indexOf(wo(t))>=0?t.ownerDocument.body:_s(t)&&VC(t)?t:tM(kb(t))}function Ff(t,e){var n;e===void 0&&(e=[]);var r=tM(t),s=r===((n=t.ownerDocument)==null?void 0:n.body),o=As(r),a=s?[o].concat(o.visualViewport||[],VC(r)?r:[]):r,l=e.concat(a);return s?l:l.concat(Ff(kb(a)))}function lw(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function dG(t,e){var n=Id(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function WR(t,e,n){return e===jC?lw(lG(t,n)):Ul(e)?dG(e,n):lw(cG(Ua(t)))}function uG(t){var e=Ff(kb(t)),n=["absolute","fixed"].indexOf(Ni(t).position)>=0,r=n&&_s(t)?lp(t):t;return Ul(r)?e.filter(function(s){return Ul(s)&&JI(s,r)&&wo(s)!=="body"}):[]}function fG(t,e,n,r){var s=e==="clippingParents"?uG(t):[].concat(e),o=[].concat(s,[n]),a=o[0],l=o.reduce(function(c,d){var u=WR(t,d,r);return c.top=Pl(u.top,c.top),c.right=uy(u.right,c.right),c.bottom=uy(u.bottom,c.bottom),c.left=Pl(u.left,c.left),c},WR(t,a,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function nM(t){var e=t.reference,n=t.element,r=t.placement,s=r?bo(r):null,o=r?Md(r):null,a=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,c;switch(s){case Ar:c={x:a,y:e.y-n.height};break;case rs:c={x:a,y:e.y+e.height};break;case ss:c={x:e.x+e.width,y:l};break;case Nr:c={x:e.x-n.width,y:l};break;default:c={x:e.x,y:e.y}}var d=s?YC(s):null;if(d!=null){var u=d==="y"?"height":"width";switch(o){case Bl:c[d]=c[d]-(e[u]/2-n[u]/2);break;case kd:c[d]=c[d]+(e[u]/2-n[u]/2);break}}return c}function Ld(t,e){e===void 0&&(e={});var n=e,r=n.placement,s=r===void 0?t.placement:r,o=n.strategy,a=o===void 0?t.strategy:o,l=n.boundary,c=l===void 0?zI:l,d=n.rootBoundary,u=d===void 0?jC:d,f=n.elementContext,g=f===void 0?Tc:f,E=n.altBoundary,S=E===void 0?!1:E,w=n.padding,_=w===void 0?0:w,h=QI(typeof _!="number"?_:eM(_,iu)),m=g===Tc?qI:Tc,A=t.rects.popper,k=t.elements[S?m:g],R=fG(Ul(k)?k:k.contextElement||Ua(t.elements.popper),c,u,a),O=Id(t.elements.reference),N=nM({reference:O,element:A,strategy:"absolute",placement:s}),y=lw(Object.assign({},A,N)),v=g===Tc?y:O,b={top:R.top-v.top+h.top,bottom:v.bottom-R.bottom+h.bottom,left:R.left-v.left+h.left,right:v.right-R.right+h.right},P=t.modifiersData.offset;if(g===Tc&&P){var F=P[s];Object.keys(b).forEach(function(I){var T=[ss,rs].indexOf(I)>=0?1:-1,q=[Ar,rs].indexOf(I)>=0?"y":"x";b[I]+=F[q]*T})}return b}function hG(t,e){e===void 0&&(e={});var n=e,r=n.placement,s=n.boundary,o=n.rootBoundary,a=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?$C:c,u=Md(r),f=u?l?iw:iw.filter(function(S){return Md(S)===u}):iu,g=f.filter(function(S){return d.indexOf(S)>=0});g.length===0&&(g=f);var E=g.reduce(function(S,w){return S[w]=Ld(t,{placement:w,boundary:s,rootBoundary:o,padding:a})[bo(w)],S},{});return Object.keys(E).sort(function(S,w){return E[S]-E[w]})}function pG(t){if(bo(t)===Db)return[];var e=yg(t);return[GR(t),e,GR(e)]}function mG(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var s=n.mainAxis,o=s===void 0?!0:s,a=n.altAxis,l=a===void 0?!0:a,c=n.fallbackPlacements,d=n.padding,u=n.boundary,f=n.rootBoundary,g=n.altBoundary,E=n.flipVariations,S=E===void 0?!0:E,w=n.allowedAutoPlacements,_=e.options.placement,h=bo(_),m=h===_,A=c||(m||!S?[yg(_)]:pG(_)),k=[_].concat(A).reduce(function(te,J){return te.concat(bo(J)===Db?hG(e,{placement:J,boundary:u,rootBoundary:f,padding:d,flipVariations:S,allowedAutoPlacements:w}):J)},[]),R=e.rects.reference,O=e.rects.popper,N=new Map,y=!0,v=k[0],b=0;b<k.length;b++){var P=k[b],F=bo(P),I=Md(P)===Bl,T=[Ar,rs].indexOf(F)>=0,q=T?"width":"height",W=Ld(e,{placement:P,boundary:u,rootBoundary:f,altBoundary:g,padding:d}),G=T?I?ss:Nr:I?rs:Ar;R[q]>O[q]&&(G=yg(G));var H=yg(G),j=[];if(o&&j.push(W[F]<=0),l&&j.push(W[G]<=0,W[H]<=0),j.every(function(te){return te})){v=P,y=!1;break}N.set(P,j)}if(y)for(var U=S?3:1,L=function(J){var Q=k.find(function(oe){var pe=N.get(oe);if(pe)return pe.slice(0,J).every(function(ye){return ye})});if(Q)return v=Q,"break"},K=U;K>0;K--){var Y=L(K);if(Y==="break")break}e.placement!==v&&(e.modifiersData[r]._skip=!0,e.placement=v,e.reset=!0)}}const KC={name:"flip",enabled:!0,phase:"main",fn:mG,requiresIfExists:["offset"],data:{_skip:!1}};function VR(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function KR(t){return[Ar,ss,rs,Nr].some(function(e){return t[e]>=0})}function gG(t){var e=t.state,n=t.name,r=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,a=Ld(e,{elementContext:"reference"}),l=Ld(e,{altBoundary:!0}),c=VR(a,r),d=VR(l,s,o),u=KR(c),f=KR(d);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}const ZC={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:gG};function yG(t,e,n){var r=bo(t),s=[Nr,Ar].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,a=o[0],l=o[1];return a=a||0,l=(l||0)*s,[Nr,ss].indexOf(r)>=0?{x:l,y:a}:{x:a,y:l}}function bG(t){var e=t.state,n=t.options,r=t.name,s=n.offset,o=s===void 0?[0,0]:s,a=$C.reduce(function(u,f){return u[f]=yG(f,e.rects,o),u},{}),l=a[e.placement],c=l.x,d=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=d),e.modifiersData[r]=a}const JC={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:bG};function vG(t){var e=t.state,n=t.name;e.modifiersData[n]=nM({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const Mb={name:"popperOffsets",enabled:!0,phase:"read",fn:vG,data:{}};function _G(t){return t==="x"?"y":"x"}function wG(t){var e=t.state,n=t.options,r=t.name,s=n.mainAxis,o=s===void 0?!0:s,a=n.altAxis,l=a===void 0?!1:a,c=n.boundary,d=n.rootBoundary,u=n.altBoundary,f=n.padding,g=n.tether,E=g===void 0?!0:g,S=n.tetherOffset,w=S===void 0?0:S,_=Ld(e,{boundary:c,rootBoundary:d,padding:f,altBoundary:u}),h=bo(e.placement),m=Md(e.placement),A=!m,k=YC(h),R=_G(k),O=e.modifiersData.popperOffsets,N=e.rects.reference,y=e.rects.popper,v=typeof w=="function"?w(Object.assign({},e.rects,{placement:e.placement})):w,b=typeof v=="number"?{mainAxis:v,altAxis:v}:Object.assign({mainAxis:0,altAxis:0},v),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,F={x:0,y:0};if(O){if(o){var I,T=k==="y"?Ar:Nr,q=k==="y"?rs:ss,W=k==="y"?"height":"width",G=O[k],H=G+_[T],j=G-_[q],U=E?-y[W]/2:0,L=m===Bl?N[W]:y[W],K=m===Bl?-y[W]:-N[W],Y=e.elements.arrow,te=E&&Y?UC(Y):{width:0,height:0},J=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:XI(),Q=J[T],oe=J[q],pe=Of(0,N[W],te[W]),ye=A?N[W]/2-U-pe-Q-b.mainAxis:L-pe-Q-b.mainAxis,Pe=A?-N[W]/2+U+pe+oe+b.mainAxis:K+pe+oe+b.mainAxis,Me=e.elements.arrow&&lp(e.elements.arrow),He=Me?k==="y"?Me.clientTop||0:Me.clientLeft||0:0,ie=(I=P==null?void 0:P[k])!=null?I:0,Se=G+ye-ie-He,he=G+Pe-ie,Je=Of(E?uy(H,Se):H,G,E?Pl(j,he):j);O[k]=Je,F[k]=Je-G}if(l){var Ct,de=k==="x"?Ar:Nr,le=k==="x"?rs:ss,Oe=O[R],Ke=R==="y"?"height":"width",it=Oe+_[de],It=Oe-_[le],wn=[Ar,Nr].indexOf(h)!==-1,me=(Ct=P==null?void 0:P[R])!=null?Ct:0,Kt=wn?it:Oe-N[Ke]-y[Ke]-me+b.altAxis,Bn=wn?Oe+N[Ke]+y[Ke]-me-b.altAxis:It,Sn=E&&wn?X7(Kt,Oe,Bn):Of(E?Kt:it,Oe,E?Bn:It);O[R]=Sn,F[R]=Sn-Oe}e.modifiersData[r]=F}}const XC={name:"preventOverflow",enabled:!0,phase:"main",fn:wG,requiresIfExists:["offset"]};function xG(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function CG(t){return t===As(t)||!_s(t)?GC(t):xG(t)}function EG(t){var e=t.getBoundingClientRect(),n=Td(e.width)/t.offsetWidth||1,r=Td(e.height)/t.offsetHeight||1;return n!==1||r!==1}function SG(t,e,n){n===void 0&&(n=!1);var r=_s(e),s=_s(e)&&EG(e),o=Ua(e),a=Id(t,s,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((wo(e)!=="body"||VC(o))&&(l=CG(e)),_s(e)?(c=Id(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):o&&(c.x=WC(o))),{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}function AG(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function s(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(l){if(!n.has(l)){var c=e.get(l);c&&s(c)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||s(o)}),r}function NG(t){var e=AG(t);return KI.reduce(function(n,r){return n.concat(e.filter(function(s){return s.phase===r}))},[])}function RG(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function PG(t){var e=t.reduce(function(n,r){var s=n[r.name];return n[r.name]=s?Object.assign({},s,r,{options:Object.assign({},s.options,r.options),data:Object.assign({},s.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var ZR={placement:"bottom",modifiers:[],strategy:"absolute"};function JR(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function cp(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,s=e.defaultOptions,o=s===void 0?ZR:s;return function(l,c,d){d===void 0&&(d=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},ZR,o),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},f=[],g=!1,E={state:u,setOptions:function(h){var m=typeof h=="function"?h(u.options):h;w(),u.options=Object.assign({},o,u.options,m),u.scrollParents={reference:Ul(l)?Ff(l):l.contextElement?Ff(l.contextElement):[],popper:Ff(c)};var A=NG(PG([].concat(r,u.options.modifiers)));return u.orderedModifiers=A.filter(function(k){return k.enabled}),S(),E.update()},forceUpdate:function(){if(!g){var h=u.elements,m=h.reference,A=h.popper;if(JR(m,A)){u.rects={reference:SG(m,lp(A),u.options.strategy==="fixed"),popper:UC(A)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(b){return u.modifiersData[b.name]=Object.assign({},b.data)});for(var k=0;k<u.orderedModifiers.length;k++){if(u.reset===!0){u.reset=!1,k=-1;continue}var R=u.orderedModifiers[k],O=R.fn,N=R.options,y=N===void 0?{}:N,v=R.name;typeof O=="function"&&(u=O({state:u,options:y,name:v,instance:E})||u)}}}},update:RG(function(){return new Promise(function(_){E.forceUpdate(),_(u)})}),destroy:function(){w(),g=!0}};if(!JR(l,c))return E;E.setOptions(d).then(function(_){!g&&d.onFirstUpdate&&d.onFirstUpdate(_)});function S(){u.orderedModifiers.forEach(function(_){var h=_.name,m=_.options,A=m===void 0?{}:m,k=_.effect;if(typeof k=="function"){var R=k({state:u,name:h,instance:E,options:A}),O=function(){};f.push(R||O)}})}function w(){f.forEach(function(_){return _()}),f=[]}return E}}var OG=cp();const FG=cp({defaultModifiers:[ZC,Mb,Tb,Ib,JC,KC,XC,HC]}),DG=["enabled","placement","strategy","modifiers"];function kG(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,o;for(o=0;o<r.length;o++)s=r[o],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}const TG={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},IG={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:t})=>()=>{const{reference:e,popper:n}=t.elements;if("removeAttribute"in e){const r=(e.getAttribute("aria-describedby")||"").split(",").filter(s=>s.trim()!==n.id);r.length?e.setAttribute("aria-describedby",r.join(",")):e.removeAttribute("aria-describedby")}},fn:({state:t})=>{var e;const{popper:n,reference:r}=t.elements,s=(e=n.getAttribute("role"))==null?void 0:e.toLowerCase();if(n.id&&s==="tooltip"&&"setAttribute"in r){const o=r.getAttribute("aria-describedby");if(o&&o.split(",").indexOf(n.id)!==-1)return;r.setAttribute("aria-describedby",o?`${o},${n.id}`:n.id)}}},MG=[];function rM(t,e,n={}){let{enabled:r=!0,placement:s="bottom",strategy:o="absolute",modifiers:a=MG}=n,l=kG(n,DG);const c=C.useRef(a),d=C.useRef(),u=C.useCallback(()=>{var _;(_=d.current)==null||_.update()},[]),f=C.useCallback(()=>{var _;(_=d.current)==null||_.forceUpdate()},[]),[g,E]=K7(C.useState({placement:s,update:u,forceUpdate:f,attributes:{},styles:{popper:{},arrow:{}}})),S=C.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:_})=>{const h={},m={};Object.keys(_.elements).forEach(A=>{h[A]=_.styles[A],m[A]=_.attributes[A]}),E({state:_,styles:h,attributes:m,update:u,forceUpdate:f,placement:_.placement})}}),[u,f,E]),w=C.useMemo(()=>(Pf(c.current,a)||(c.current=a),c.current),[a]);return C.useEffect(()=>{!d.current||!r||d.current.setOptions({placement:s,strategy:o,modifiers:[...w,S,TG]})},[o,s,S,r,w]),C.useEffect(()=>{if(!(!r||t==null||e==null))return d.current=FG(t,e,Object.assign({},l,{placement:s,strategy:o,modifiers:[...w,IG,S]})),()=>{d.current!=null&&(d.current.destroy(),d.current=void 0,E(_=>Object.assign({},_,{attributes:{},styles:{popper:{}}})))}},[r,t,e]),g}function vh(t,e){if(t.contains)return t.contains(e);if(t.compareDocumentPosition)return t===e||!!(t.compareDocumentPosition(e)&16)}var LG=function(){},zG=LG;const qG=to(zG),XR=()=>{};function jG(t){return t.button===0}function $G(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}const bg=t=>t&&("current"in t?t.current:t),QR={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function sM(t,e=XR,{disabled:n,clickTrigger:r="click"}={}){const s=C.useRef(!1),o=C.useRef(!1),a=C.useCallback(d=>{const u=bg(t);qG(!!u,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),s.current=!u||$G(d)||!jG(d)||!!vh(u,d.target)||o.current,o.current=!1},[t]),l=nn(d=>{const u=bg(t);u&&vh(u,d.target)&&(o.current=!0)}),c=nn(d=>{s.current||e(d)});C.useEffect(()=>{if(n||t==null)return;const d=su(bg(t));let u=(d.defaultView||window).event,f=null;QR[r]&&(f=ni(d,QR[r],l,!0));const g=ni(d,r,a,!0),E=ni(d,r,w=>{if(w===u){u=void 0;return}c(w)});let S=[];return"ontouchstart"in d.documentElement&&(S=[].slice.call(d.body.children).map(w=>ni(w,"mousemove",XR))),()=>{f==null||f(),g(),E(),S.forEach(w=>w())}},[t,n,r,a,l,c])}function BG(t){const e={};return Array.isArray(t)?(t==null||t.forEach(n=>{e[n.name]=n}),e):t||e}function UG(t={}){return Array.isArray(t)?t:Object.keys(t).map(e=>(t[e].name=e,t[e]))}function oM({enabled:t,enableEvents:e,placement:n,flip:r,offset:s,fixed:o,containerPadding:a,arrowElement:l,popperConfig:c={}}){var d,u,f,g,E;const S=BG(c.modifiers);return Object.assign({},c,{placement:n,enabled:t,strategy:o?"fixed":c.strategy,modifiers:UG(Object.assign({},S,{eventListeners:{enabled:e,options:(d=S.eventListeners)==null?void 0:d.options},preventOverflow:Object.assign({},S.preventOverflow,{options:a?Object.assign({padding:a},(u=S.preventOverflow)==null?void 0:u.options):(f=S.preventOverflow)==null?void 0:f.options}),offset:{options:Object.assign({offset:s},(g=S.offset)==null?void 0:g.options)},arrow:Object.assign({},S.arrow,{enabled:!!l,options:Object.assign({},(E=S.arrow)==null?void 0:E.options,{element:l})}),flip:Object.assign({enabled:!!r},S.flip)}))})}const YG=["children"];function HG(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,o;for(o=0;o<r.length;o++)s=r[o],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}const GG=()=>{};function iM(t={}){const e=C.useContext(Fb),[n,r]=yh(),s=C.useRef(!1),{flip:o,offset:a,rootCloseEvent:l,fixed:c=!1,placement:d,popperConfig:u={},enableEventListeners:f=!0,usePopper:g=!!e}=t,E=(e==null?void 0:e.show)==null?!!t.show:e.show;E&&!s.current&&(s.current=!0);const S=O=>{e==null||e.toggle(!1,O)},{placement:w,setMenu:_,menuElement:h,toggleElement:m}=e||{},A=rM(m,h,oM({placement:d||w||"bottom-start",enabled:g,enableEvents:f??E,offset:a,flip:o,fixed:c,arrowElement:n,popperConfig:u})),k=Object.assign({ref:_||GG,"aria-labelledby":m==null?void 0:m.id},A.attributes.popper,{style:A.styles.popper}),R={show:E,placement:w,hasShown:s.current,toggle:e==null?void 0:e.toggle,popper:g?A:null,arrowProps:g?Object.assign({ref:r},A.attributes.arrow,{style:A.styles.arrow}):{}};return sM(h,S,{clickTrigger:l,disabled:!E}),[k,R]}const WG={usePopper:!0};function QC(t){let{children:e}=t,n=HG(t,YG);const[r,s]=iM(n);return i(ee,{children:e(r,s)})}QC.displayName="DropdownMenu";QC.defaultProps=WG;const aM={prefix:String(Math.round(Math.random()*1e10)),current:0},VG=Fe.createContext(aM);let KG=!!(typeof window<"u"&&window.document&&window.document.createElement);function ZG(t){let e=C.useContext(VG);return e===aM&&!KG&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."),C.useMemo(()=>t||`react-aria${e.prefix}-${++e.current}`,[t])}const lM=t=>{var e;return((e=t.getAttribute("role"))==null?void 0:e.toLowerCase())==="menu"},e2=()=>{};function cM(){const t=ZG(),{show:e=!1,toggle:n=e2,setToggle:r,menuElement:s}=C.useContext(Fb)||{},o=C.useCallback(l=>{n(!e,l)},[e,n]),a={id:t,ref:r||e2,onClick:o,"aria-expanded":!!e};return s&&lM(s)&&(a["aria-haspopup"]=!0),[a,{show:e,toggle:n}]}function dM({children:t}){const[e,n]=cM();return i(ee,{children:t(e,n)})}dM.displayName="DropdownToggle";const JG=C.createContext(null),_h=(t,e=null)=>t!=null?String(t):e||null,Yl=JG,uM=C.createContext(null);uM.displayName="NavContext";const eE=uM,XG="data-rr-ui-",QG="rrUi";function au(t){return`${XG}${t}`}function e9(t){return`${QG}${t}`}const t9=["eventKey","disabled","onClick","active","as"];function n9(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,o;for(o=0;o<r.length;o++)s=r[o],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function fM({key:t,href:e,active:n,disabled:r,onClick:s}){const o=C.useContext(Yl),a=C.useContext(eE),{activeKey:l}=a||{},c=_h(t,e),d=n==null&&t!=null?_h(l)===c:n;return[{onClick:nn(f=>{r||(s==null||s(f),o&&!f.isPropagationStopped()&&o(c,f))}),"aria-disabled":r||void 0,"aria-selected":d,[au("dropdown-item")]:""},{isActive:d}]}const hM=C.forwardRef((t,e)=>{let{eventKey:n,disabled:r,onClick:s,active:o,as:a=kC}=t,l=n9(t,t9);const[c]=fM({key:n,href:l.href,disabled:r,onClick:s,active:o});return i(a,Object.assign({},l,{ref:e},c))});hM.displayName="DropdownItem";const pM=C.createContext(ou?window:void 0);pM.Provider;function tE(){return C.useContext(pM)}function t2(){const t=LI(),e=C.useRef(null),n=C.useCallback(r=>{e.current=r,t()},[t]);return[e,n]}function dp({defaultShow:t,show:e,onSelect:n,onToggle:r,itemSelector:s=`* [${au("dropdown-item")}]`,focusFirstItemOnShow:o,placement:a="bottom-start",children:l}){const c=tE(),[d,u]=NC(e,t,r),[f,g]=t2(),E=f.current,[S,w]=t2(),_=S.current,h=CI(d),m=C.useRef(null),A=C.useRef(!1),k=C.useContext(Yl),R=C.useCallback((P,F,I=F==null?void 0:F.type)=>{u(P,{originalEvent:F,source:I})},[u]),O=nn((P,F)=>{n==null||n(P,F),R(!1,F,"select"),F.isPropagationStopped()||k==null||k(P,F)}),N=C.useMemo(()=>({toggle:R,placement:a,show:d,menuElement:E,toggleElement:_,setMenu:g,setToggle:w}),[R,a,d,E,_,g,w]);E&&h&&!d&&(A.current=E.contains(E.ownerDocument.activeElement));const y=nn(()=>{_&&_.focus&&_.focus()}),v=nn(()=>{const P=m.current;let F=o;if(F==null&&(F=f.current&&lM(f.current)?"keyboard":!1),F===!1||F==="keyboard"&&!/^key.+$/.test(P))return;const I=Vo(f.current,s)[0];I&&I.focus&&I.focus()});C.useEffect(()=>{d?v():A.current&&(A.current=!1,y())},[d,A,y,v]),C.useEffect(()=>{m.current=null});const b=(P,F)=>{if(!f.current)return null;const I=Vo(f.current,s);let T=I.indexOf(P)+F;return T=Math.max(0,Math.min(T,I.length)),I[T]};return i7(C.useCallback(()=>c.document,[c]),"keydown",P=>{var F,I;const{key:T}=P,q=P.target,W=(F=f.current)==null?void 0:F.contains(q),G=(I=S.current)==null?void 0:I.contains(q);if(/input|textarea/i.test(q.tagName)&&(T===" "||T!=="Escape"&&W||T==="Escape"&&q.type==="search")||!W&&!G||T==="Tab"&&(!f.current||!d))return;m.current=P.type;const j={originalEvent:P,source:P.type};switch(T){case"ArrowUp":{const U=b(q,-1);U&&U.focus&&U.focus(),P.preventDefault();return}case"ArrowDown":if(P.preventDefault(),!d)u(!0,j);else{const U=b(q,1);U&&U.focus&&U.focus()}return;case"Tab":RC(q.ownerDocument,"keyup",U=>{var L;(U.key==="Tab"&&!U.target||!((L=f.current)!=null&&L.contains(U.target)))&&u(!1,j)},{once:!0});break;case"Escape":T==="Escape"&&(P.preventDefault(),P.stopPropagation()),u(!1,j);break}}),i(Yl.Provider,{value:O,children:i(Fb.Provider,{value:N,children:l})})}dp.displayName="Dropdown";dp.Menu=QC;dp.Toggle=dM;dp.Item=hM;const mM=C.createContext({});mM.displayName="DropdownContext";const gM=mM,yM=C.forwardRef(({bsPrefix:t,className:e,eventKey:n,disabled:r=!1,onClick:s,active:o,as:a=bh,...l},c)=>{const d=ot(t,"dropdown-item"),[u,f]=fM({key:n,href:l.href,disabled:r,onClick:s,active:o});return i(a,{...l,...u,ref:c,className:Ye(e,d,f.isActive&&"active",r&&"disabled")})});yM.displayName="DropdownItem";const r9=yM,bM=C.createContext(null);bM.displayName="InputGroupContext";const vM=bM,_M=C.createContext(null);_M.displayName="NavbarContext";const rc=_M;function wM(t,e){return t}const bc=Ue.oneOf(["start","end"]),s9=Ue.oneOfType([bc,Ue.shape({sm:bc}),Ue.shape({md:bc}),Ue.shape({lg:bc}),Ue.shape({xl:bc}),Ue.shape({xxl:bc}),Ue.object]),o9={flip:!0};function xM(t,e,n){const r=n?"top-end":"top-start",s=n?"top-start":"top-end",o=n?"bottom-end":"bottom-start",a=n?"bottom-start":"bottom-end",l=n?"right-start":"left-start",c=n?"right-end":"left-end",d=n?"left-start":"right-start",u=n?"left-end":"right-end";let f=t?a:o;return e==="up"?f=t?s:r:e==="end"?f=t?u:d:e==="start"?f=t?c:l:e==="down-centered"?f="bottom":e==="up-centered"&&(f="top"),f}const nE=C.forwardRef(({bsPrefix:t,className:e,align:n,rootCloseEvent:r,flip:s,show:o,renderOnMount:a,as:l="div",popperConfig:c,variant:d,...u},f)=>{let g=!1;const E=C.useContext(rc),S=ot(t,"dropdown-menu"),{align:w,drop:_,isRTL:h}=C.useContext(gM);n=n||w;const m=C.useContext(vM),A=[];if(n)if(typeof n=="object"){const P=Object.keys(n);if(P.length){const F=P[0],I=n[F];g=I==="start",A.push(`${S}-${F}-${I}`)}}else n==="end"&&(g=!0);const k=xM(g,_,h),[R,{hasShown:O,popper:N,show:y,toggle:v}]=iM({flip:s,rootCloseEvent:r,show:o,usePopper:!E&&A.length===0,offset:[0,2],popperConfig:c,placement:k});if(R.ref=Ba(wM(f),R.ref),FC(()=>{y&&(N==null||N.update())},[y]),!O&&!a&&!m)return null;typeof l!="string"&&(R.show=y,R.close=()=>v==null?void 0:v(!1),R.align=n);let b=u.style;return N!=null&&N.placement&&(b={...u.style,...R.style},u["x-placement"]=N.placement),i(l,{...u,...R,style:b,...(A.length||E)&&{"data-bs-popper":"static"},className:Ye(e,S,y&&"show",g&&`${S}-end`,d&&`${S}-${d}`,...A)})});nE.displayName="DropdownMenu";nE.defaultProps=o9;const CM=nE,EM=C.forwardRef(({bsPrefix:t,split:e,className:n,childBsPrefix:r,as:s=Qe,...o},a)=>{const l=ot(t,"dropdown-toggle"),c=C.useContext(Fb);r!==void 0&&(o.bsPrefix=r);const[d]=cM();return d.ref=Ba(d.ref,wM(a)),i(s,{className:Ye(n,l,e&&`${l}-split`,(c==null?void 0:c.show)&&"show"),...d,...o})});EM.displayName="DropdownToggle";const SM=EM,i9=_n("dropdown-header",{defaultProps:{role:"heading"}}),a9=_n("dropdown-divider",{Component:"hr",defaultProps:{role:"separator"}}),l9=_n("dropdown-item-text",{Component:"span"}),c9={navbar:!1,align:"start",autoClose:!0,drop:"down"},rE=C.forwardRef((t,e)=>{const{bsPrefix:n,drop:r,show:s,className:o,align:a,onSelect:l,onToggle:c,focusFirstItemOnShow:d,as:u="div",navbar:f,autoClose:g,...E}=op(t,{show:"onToggle"}),S=C.useContext(vM),w=ot(n,"dropdown"),_=ip(),h=N=>g===!1?N==="click":g==="inside"?N!=="rootClose":g==="outside"?N!=="select":!0,m=nn((N,y)=>{y.originalEvent.currentTarget===document&&(y.source!=="keydown"||y.originalEvent.key==="Escape")&&(y.source="rootClose"),h(y.source)&&(c==null||c(N,y))}),k=xM(a==="end",r,_),R=C.useMemo(()=>({align:a,drop:r,isRTL:_}),[a,r,_]),O={down:w,"down-centered":`${w}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return i(gM.Provider,{value:R,children:i(dp,{placement:k,show:s,onSelect:l,onToggle:m,focusFirstItemOnShow:d,itemSelector:`.${w}-item:not(.disabled):not(:disabled)`,children:S?E.children:i(u,{...E,ref:e,className:Ye(o,s&&"show",O[r])})})})});rE.displayName="Dropdown";rE.defaultProps=c9;const Ge=Object.assign(rE,{Toggle:SM,Menu:CM,Item:r9,ItemText:l9,Divider:a9,Header:i9}),d9={id:Ue.string,href:Ue.string,onClick:Ue.func,title:Ue.node.isRequired,disabled:Ue.bool,align:s9,menuRole:Ue.string,renderMenuOnMount:Ue.bool,rootCloseEvent:Ue.string,menuVariant:Ue.oneOf(["dark"]),flip:Ue.bool,bsPrefix:Ue.string,variant:Ue.string,size:Ue.string},sE=C.forwardRef(({title:t,children:e,bsPrefix:n,rootCloseEvent:r,variant:s,size:o,menuRole:a,renderMenuOnMount:l,disabled:c,href:d,id:u,menuVariant:f,flip:g,...E},S)=>p(Ge,{ref:S,...E,children:[i(SM,{id:u,href:d,size:o,variant:s,disabled:c,childBsPrefix:n,children:t}),i(CM,{role:a,renderOnMount:l,rootCloseEvent:r,variant:f,flip:g,children:e})]}));sE.displayName="DropdownButton";sE.propTypes=d9;const df=sE,u9={type:Ue.string,tooltip:Ue.bool,as:Ue.elementType},oE=C.forwardRef(({as:t="div",className:e,type:n="valid",tooltip:r=!1,...s},o)=>i(t,{...s,ref:o,className:Ye(e,`${n}-${r?"tooltip":"feedback"}`)}));oE.displayName="Feedback";oE.propTypes=u9;const AM=oE,f9=C.createContext({}),Ri=f9,NM=C.forwardRef(({id:t,bsPrefix:e,className:n,type:r="checkbox",isValid:s=!1,isInvalid:o=!1,as:a="input",...l},c)=>{const{controlId:d}=C.useContext(Ri);return e=ot(e,"form-check-input"),i(a,{...l,ref:c,type:r,id:t||d,className:Ye(n,e,s&&"is-valid",o&&"is-invalid")})});NM.displayName="FormCheckInput";const RM=NM,PM=C.forwardRef(({bsPrefix:t,className:e,htmlFor:n,...r},s)=>{const{controlId:o}=C.useContext(Ri);return t=ot(t,"form-check-label"),i("label",{...r,ref:s,htmlFor:n||o,className:Ye(e,t)})});PM.displayName="FormCheckLabel";const cw=PM,OM=C.forwardRef(({id:t,bsPrefix:e,bsSwitchPrefix:n,inline:r=!1,reverse:s=!1,disabled:o=!1,isValid:a=!1,isInvalid:l=!1,feedbackTooltip:c=!1,feedback:d,feedbackType:u,className:f,style:g,title:E="",type:S="checkbox",label:w,children:_,as:h="input",...m},A)=>{e=ot(e,"form-check"),n=ot(n,"form-switch");const{controlId:k}=C.useContext(Ri),R=C.useMemo(()=>({controlId:t||k}),[k,t]),O=!_&&w!=null&&w!==!1||B7(_,cw),N=i(RM,{...m,type:S==="switch"?"checkbox":S,ref:A,isValid:a,isInvalid:l,disabled:o,as:h});return i(Ri.Provider,{value:R,children:i("div",{style:g,className:Ye(f,O&&e,r&&`${e}-inline`,s&&`${e}-reverse`,S==="switch"&&n),children:_||p(ee,{children:[N,O&&i(cw,{title:E,children:w}),d&&i(AM,{type:u,tooltip:c,children:d})]})})})});OM.displayName="FormCheck";const fy=Object.assign(OM,{Input:RM,Label:cw}),FM=C.forwardRef(({bsPrefix:t,type:e,size:n,htmlSize:r,id:s,className:o,isValid:a=!1,isInvalid:l=!1,plaintext:c,readOnly:d,as:u="input",...f},g)=>{const{controlId:E}=C.useContext(Ri);t=ot(t,"form-control");let S;return c?S={[`${t}-plaintext`]:!0}:S={[t]:!0,[`${t}-${n}`]:n},i(u,{...f,type:e,size:r,ref:g,readOnly:d,id:s||E,className:Ye(o,S,a&&"is-valid",l&&"is-invalid",e==="color"&&`${t}-color`)})});FM.displayName="FormControl";const h9=Object.assign(FM,{Feedback:AM}),p9=_n("form-floating"),DM=C.forwardRef(({controlId:t,as:e="div",...n},r)=>{const s=C.useMemo(()=>({controlId:t}),[t]);return i(Ri.Provider,{value:s,children:i(e,{...n,ref:r})})});DM.displayName="FormGroup";const kM=DM,m9={column:!1,visuallyHidden:!1},iE=C.forwardRef(({as:t="label",bsPrefix:e,column:n,visuallyHidden:r,className:s,htmlFor:o,...a},l)=>{const{controlId:c}=C.useContext(Ri);e=ot(e,"form-label");let d="col-form-label";typeof n=="string"&&(d=`${d} ${d}-${n}`);const u=Ye(s,e,r&&"visually-hidden",n&&d);return o=o||c,n?i($,{ref:l,as:"label",className:u,htmlFor:o,...a}):i(t,{ref:l,className:u,htmlFor:o,...a})});iE.displayName="FormLabel";iE.defaultProps=m9;const g9=iE,TM=C.forwardRef(({bsPrefix:t,className:e,id:n,...r},s)=>{const{controlId:o}=C.useContext(Ri);return t=ot(t,"form-range"),i("input",{...r,type:"range",ref:s,className:Ye(e,t),id:n||o})});TM.displayName="FormRange";const y9=TM,IM=C.forwardRef(({bsPrefix:t,size:e,htmlSize:n,className:r,isValid:s=!1,isInvalid:o=!1,id:a,...l},c)=>{const{controlId:d}=C.useContext(Ri);return t=ot(t,"form-select"),i("select",{...l,size:n,ref:c,className:Ye(r,t,e&&`${t}-${e}`,s&&"is-valid",o&&"is-invalid"),id:a||d})});IM.displayName="FormSelect";const uf=IM,MM=C.forwardRef(({bsPrefix:t,className:e,as:n="small",muted:r,...s},o)=>(t=ot(t,"form-text"),i(n,{...s,ref:o,className:Ye(e,t,r&&"text-muted")})));MM.displayName="FormText";const b9=MM,LM=C.forwardRef((t,e)=>i(fy,{...t,ref:e,type:"switch"}));LM.displayName="Switch";const v9=Object.assign(LM,{Input:fy.Input,Label:fy.Label}),zM=C.forwardRef(({bsPrefix:t,className:e,children:n,controlId:r,label:s,...o},a)=>(t=ot(t,"form-floating"),p(kM,{ref:a,className:Ye(e,t),controlId:r,...o,children:[n,i("label",{htmlFor:r,children:s})]})));zM.displayName="FloatingLabel";const _9=zM,w9={_ref:Ue.any,validated:Ue.bool,as:Ue.elementType},aE=C.forwardRef(({className:t,validated:e,as:n="form",...r},s)=>i(n,{...r,ref:s,className:Ye(t,e&&"was-validated")}));aE.displayName="Form";aE.propTypes=w9;const Ae=Object.assign(aE,{Group:kM,Control:h9,Floating:p9,Check:fy,Switch:v9,Label:g9,Text:b9,Range:y9,Select:uf,FloatingLabel:_9}),x9={fluid:!1},lE=C.forwardRef(({bsPrefix:t,fluid:e,as:n="div",className:r,...s},o)=>{const a=ot(t,"container"),l=typeof e=="string"?`-${e}`:"-fluid";return i(n,{ref:o,...s,className:Ye(r,e?`${a}${l}`:a)})});lE.displayName="Container";lE.defaultProps=x9;const ae=lE,C9=C.createContext(null),qM=C9,E9=["as","active","eventKey"];function S9(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,o;for(o=0;o<r.length;o++)s=r[o],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function jM({key:t,onClick:e,active:n,id:r,role:s,disabled:o}){const a=C.useContext(Yl),l=C.useContext(eE),c=C.useContext(qM);let d=n;const u={role:s};if(l){!s&&l.role==="tablist"&&(u.role="tab");const f=l.getControllerId(t??null),g=l.getControlledId(t??null);u[au("event-key")]=t,u.id=f||r,d=n==null&&t!=null?l.activeKey===t:n,(d||!(c!=null&&c.unmountOnExit)&&!(c!=null&&c.mountOnEnter))&&(u["aria-controls"]=g)}return u.role==="tab"&&(u["aria-selected"]=d,d||(u.tabIndex=-1),o&&(u.tabIndex=-1,u["aria-disabled"]=!0)),u.onClick=nn(f=>{o||(e==null||e(f),t!=null&&a&&!f.isPropagationStopped()&&a(t,f))}),[u,{isActive:d}]}const $M=C.forwardRef((t,e)=>{let{as:n=kC,active:r,eventKey:s}=t,o=S9(t,E9);const[a,l]=jM(Object.assign({key:_h(s,o.href),active:r},o));return a[au("active")]=l.isActive,i(n,Object.assign({},o,a,{ref:e}))});$M.displayName="NavItem";const A9=$M,N9=["as","onSelect","activeKey","role","onKeyDown"];function R9(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,o;for(o=0;o<r.length;o++)s=r[o],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}const n2=()=>{},r2=au("event-key"),BM=C.forwardRef((t,e)=>{let{as:n="div",onSelect:r,activeKey:s,role:o,onKeyDown:a}=t,l=R9(t,N9);const c=LI(),d=C.useRef(!1),u=C.useContext(Yl),f=C.useContext(qM);let g,E;f&&(o=o||"tablist",s=f.activeKey,g=f.getControlledId,E=f.getControllerId);const S=C.useRef(null),w=A=>{const k=S.current;if(!k)return null;const R=Vo(k,`[${r2}]:not([aria-disabled=true])`),O=k.querySelector("[aria-selected=true]");if(!O||O!==document.activeElement)return null;const N=R.indexOf(O);if(N===-1)return null;let y=N+A;return y>=R.length&&(y=0),y<0&&(y=R.length-1),R[y]},_=(A,k)=>{A!=null&&(r==null||r(A,k),u==null||u(A,k))},h=A=>{if(a==null||a(A),!f)return;let k;switch(A.key){case"ArrowLeft":case"ArrowUp":k=w(-1);break;case"ArrowRight":case"ArrowDown":k=w(1);break;default:return}k&&(A.preventDefault(),_(k.dataset[e9("EventKey")]||null,A),d.current=!0,c())};C.useEffect(()=>{if(S.current&&d.current){const A=S.current.querySelector(`[${r2}][aria-selected=true]`);A==null||A.focus()}d.current=!1});const m=Ba(e,S);return i(Yl.Provider,{value:_,children:i(eE.Provider,{value:{role:o,activeKey:_h(s),getControlledId:g||n2,getControllerId:E||n2},children:i(n,Object.assign({},l,{onKeyDown:h,ref:m,role:o}))})})});BM.displayName="Nav";const P9=Object.assign(BM,{Item:A9});var xm;function s2(t){if((!xm&&xm!==0||t)&&ou){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),xm=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return xm}function F0(t){t===void 0&&(t=su());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function O9(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const o2=au("modal-open");class F9{constructor({ownerDocument:e,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return O9(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",s=this.getElement();e.style={overflow:s.style.overflow,[r]:s.style[r]},e.scrollBarWidth&&(n[r]=`${parseInt(mi(s,r)||"0",10)+e.scrollBarWidth}px`),s.setAttribute(o2,""),mi(s,n)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const n=this.getElement();n.removeAttribute(o2),Object.assign(n.style,e.style)}add(e){let n=this.modals.indexOf(e);return n!==-1||(n=this.modals.length,this.modals.push(e),this.setModalAttributes(e),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(e){const n=this.modals.indexOf(e);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}const cE=F9,D0=(t,e)=>ou?t==null?(e||su()).body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),t&&("nodeType"in t||t.getBoundingClientRect)?t:null):null;function dw(t,e){const n=tE(),[r,s]=C.useState(()=>D0(t,n==null?void 0:n.document));if(!r){const o=D0(t);o&&s(o)}return C.useEffect(()=>{e&&r&&e(r)},[e,r]),C.useEffect(()=>{const o=D0(t);o!==r&&s(o)},[t,r]),r}const D9=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","backdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function k9(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,o;for(o=0;o<r.length;o++)s=r[o],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}let k0;function T9(t){return k0||(k0=new cE({ownerDocument:t==null?void 0:t.document})),k0}function I9(t){const e=tE(),n=t||T9(e),r=C.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:C.useCallback(s=>{r.current.dialog=s},[]),setBackdropRef:C.useCallback(s=>{r.current.backdrop=s},[])})}const UM=C.forwardRef((t,e)=>{let{show:n=!1,role:r="dialog",className:s,style:o,children:a,backdrop:l=!0,keyboard:c=!0,onBackdropClick:d,onEscapeKeyDown:u,transition:f,backdropTransition:g,autoFocus:E=!0,enforceFocus:S=!0,restoreFocus:w=!0,restoreFocusOptions:_,renderDialog:h,renderBackdrop:m=ie=>i("div",Object.assign({},ie)),manager:A,container:k,onShow:R,onHide:O=()=>{},onExit:N,onExited:y,onExiting:v,onEnter:b,onEntering:P,onEntered:F}=t,I=k9(t,D9);const T=dw(k),q=I9(A),W=OC(),G=CI(n),[H,j]=C.useState(!n),U=C.useRef(null);C.useImperativeHandle(e,()=>q,[q]),ou&&!G&&n&&(U.current=F0()),!f&&!n&&!H?j(!0):n&&H&&j(!1);const L=nn(()=>{if(q.add(),oe.current=ni(document,"keydown",J),Q.current=ni(document,"focus",()=>setTimeout(Y),!0),R&&R(),E){const ie=F0(document);q.dialog&&ie&&!vh(q.dialog,ie)&&(U.current=ie,q.dialog.focus())}}),K=nn(()=>{if(q.remove(),oe.current==null||oe.current(),Q.current==null||Q.current(),w){var ie;(ie=U.current)==null||ie.focus==null||ie.focus(_),U.current=null}});C.useEffect(()=>{!n||!T||L()},[n,T,L]),C.useEffect(()=>{H&&K()},[H,K]),zC(()=>{K()});const Y=nn(()=>{if(!S||!W()||!q.isTopModal())return;const ie=F0();q.dialog&&ie&&!vh(q.dialog,ie)&&q.dialog.focus()}),te=nn(ie=>{ie.target===ie.currentTarget&&(d==null||d(ie),l===!0&&O())}),J=nn(ie=>{c&&ie.keyCode===27&&q.isTopModal()&&(u==null||u(ie),ie.defaultPrevented||O())}),Q=C.useRef(),oe=C.useRef(),pe=(...ie)=>{j(!0),y==null||y(...ie)},ye=f;if(!T||!(n||ye&&!H))return null;const Pe=Object.assign({role:r,ref:q.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},I,{style:o,className:s,tabIndex:-1});let Me=h?h(Pe):i("div",Object.assign({},Pe,{children:C.cloneElement(a,{role:"document"})}));ye&&(Me=i(ye,{appear:!0,unmountOnExit:!0,in:!!n,onExit:N,onExiting:v,onExited:pe,onEnter:b,onEntering:P,onEntered:F,children:Me}));let He=null;if(l){const ie=g;He=m({ref:q.setBackdropRef,onClick:te}),ie&&(He=i(ie,{appear:!0,in:!!n,children:He}))}return i(ee,{children:wl.createPortal(p(ee,{children:[He,Me]}),T)})});UM.displayName="Modal";const YM=Object.assign(UM,{Manager:cE});function HM(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function M9(t,e){t.classList?t.classList.add(e):HM(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function i2(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function L9(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=i2(t.className,e):t.setAttribute("class",i2(t.className&&t.className.baseVal||"",e))}const vc={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class GM extends cE{adjustAndStore(e,n,r){const s=n.style[e];n.dataset[e]=s,mi(n,{[e]:`${parseFloat(mi(n,e))+r}px`})}restore(e,n){const r=n.dataset[e];r!==void 0&&(delete n.dataset[e],mi(n,{[e]:r}))}setContainerStyle(e){super.setContainerStyle(e);const n=this.getElement();if(M9(n,"modal-open"),!e.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",s=this.isRTL?"marginLeft":"marginRight";Vo(n,vc.FIXED_CONTENT).forEach(o=>this.adjustAndStore(r,o,e.scrollBarWidth)),Vo(n,vc.STICKY_CONTENT).forEach(o=>this.adjustAndStore(s,o,-e.scrollBarWidth)),Vo(n,vc.NAVBAR_TOGGLER).forEach(o=>this.adjustAndStore(s,o,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const n=this.getElement();L9(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",s=this.isRTL?"marginLeft":"marginRight";Vo(n,vc.FIXED_CONTENT).forEach(o=>this.restore(r,o)),Vo(n,vc.STICKY_CONTENT).forEach(o=>this.restore(s,o)),Vo(n,vc.NAVBAR_TOGGLER).forEach(o=>this.restore(s,o))}}let T0;function WM(t){return T0||(T0=new GM(t)),T0}const z9=GM,q9=_n("modal-body"),j9=C.createContext({onHide(){}}),dE=j9,VM=C.forwardRef(({bsPrefix:t,className:e,contentClassName:n,centered:r,size:s,fullscreen:o,children:a,scrollable:l,...c},d)=>{t=ot(t,"modal");const u=`${t}-dialog`,f=typeof o=="string"?`${t}-fullscreen-${o}`:`${t}-fullscreen`;return i("div",{...c,ref:d,className:Ye(u,e,s&&`${t}-${s}`,r&&`${u}-centered`,l&&`${u}-scrollable`,o&&f),children:i("div",{className:Ye(`${t}-content`,n),children:a})})});VM.displayName="ModalDialog";const KM=VM,$9=_n("modal-footer"),B9={closeLabel:"Close",closeButton:!1},ZM=C.forwardRef(({closeLabel:t,closeVariant:e,closeButton:n,onHide:r,children:s,...o},a)=>{const l=C.useContext(dE),c=nn(()=>{l==null||l.onHide(),r==null||r()});return p("div",{ref:a,...o,children:[s,n&&i(SI,{"aria-label":t,variant:e,onClick:c})]})});ZM.defaultProps=B9;const JM=ZM,U9={closeLabel:"Close",closeButton:!1},uE=C.forwardRef(({bsPrefix:t,className:e,...n},r)=>(t=ot(t,"modal-header"),i(JM,{ref:r,...n,className:Ye(e,t)})));uE.displayName="ModalHeader";uE.defaultProps=U9;const Y9=uE,H9=ap("h4"),G9=_n("modal-title",{Component:H9}),W9={show:!1,backdrop:!0,keyboard:!0,autoFocus:!0,enforceFocus:!0,restoreFocus:!0,animation:!0,dialogAs:KM};function V9(t){return i(nc,{...t,timeout:null})}function K9(t){return i(nc,{...t,timeout:null})}const fE=C.forwardRef(({bsPrefix:t,className:e,style:n,dialogClassName:r,contentClassName:s,children:o,dialogAs:a,"aria-labelledby":l,"aria-describedby":c,"aria-label":d,show:u,animation:f,backdrop:g,keyboard:E,onEscapeKeyDown:S,onShow:w,onHide:_,container:h,autoFocus:m,enforceFocus:A,restoreFocus:k,restoreFocusOptions:R,onEntered:O,onExit:N,onExiting:y,onEnter:v,onEntering:b,onExited:P,backdropClassName:F,manager:I,...T},q)=>{const[W,G]=C.useState({}),[H,j]=C.useState(!1),U=C.useRef(!1),L=C.useRef(!1),K=C.useRef(null),[Y,te]=yh(),J=Ba(q,te),Q=nn(_),oe=ip();t=ot(t,"modal");const pe=C.useMemo(()=>({onHide:Q}),[Q]);function ye(){return I||WM({isRTL:oe})}function Pe(me){if(!ou)return;const Kt=ye().getScrollbarWidth()>0,Bn=me.scrollHeight>su(me).documentElement.clientHeight;G({paddingRight:Kt&&!Bn?s2():void 0,paddingLeft:!Kt&&Bn?s2():void 0})}const Me=nn(()=>{Y&&Pe(Y.dialog)});zC(()=>{rw(window,"resize",Me),K.current==null||K.current()});const He=()=>{U.current=!0},ie=me=>{U.current&&Y&&me.target===Y.dialog&&(L.current=!0),U.current=!1},Se=()=>{j(!0),K.current=vI(Y.dialog,()=>{j(!1)})},he=me=>{me.target===me.currentTarget&&Se()},Je=me=>{if(g==="static"){he(me);return}if(L.current||me.target!==me.currentTarget){L.current=!1;return}_==null||_()},Ct=me=>{E?S==null||S(me):(me.preventDefault(),g==="static"&&Se())},de=(me,Kt)=>{me&&Pe(me),v==null||v(me,Kt)},le=me=>{K.current==null||K.current(),N==null||N(me)},Oe=(me,Kt)=>{b==null||b(me,Kt),RC(window,"resize",Me)},Ke=me=>{me&&(me.style.display=""),P==null||P(me),rw(window,"resize",Me)},it=C.useCallback(me=>i("div",{...me,className:Ye(`${t}-backdrop`,F,!f&&"show")}),[f,F,t]),It={...n,...W};It.display="block";const wn=me=>i("div",{role:"dialog",...me,style:It,className:Ye(e,t,H&&`${t}-static`,!f&&"show"),onClick:g?Je:void 0,onMouseUp:ie,"aria-label":d,"aria-labelledby":l,"aria-describedby":c,children:i(a,{...T,onMouseDown:He,className:r,contentClassName:s,children:o})});return i(dE.Provider,{value:pe,children:i(YM,{show:u,ref:J,backdrop:g,container:h,keyboard:!0,autoFocus:m,enforceFocus:A,restoreFocus:k,restoreFocusOptions:R,onEscapeKeyDown:Ct,onShow:w,onHide:_,onEnter:de,onEntering:Oe,onEntered:O,onExit:le,onExiting:y,onExited:Ke,manager:ye(),transition:f?V9:void 0,backdropTransition:f?K9:void 0,renderBackdrop:it,renderDialog:wn})})});fE.displayName="Modal";fE.defaultProps=W9;const Ut=Object.assign(fE,{Body:q9,Header:Y9,Title:G9,Footer:$9,Dialog:KM,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150});var a2={exports:{}},uw={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;function n(r){function s(a,l,c,d,u,f){var g=d||"<<anonymous>>",E=f||c;if(l[c]==null)return a?new Error("Required "+u+" `"+E+"` was not specified "+("in `"+g+"`.")):null;for(var S=arguments.length,w=Array(S>6?S-6:0),_=6;_<S;_++)w[_-6]=arguments[_];return r.apply(void 0,[l,c,g,u,E].concat(w))}var o=s.bind(null,!1);return o.isRequired=s.bind(null,!0),o}t.exports=e.default})(uw,uw.exports);var Z9=uw.exports;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var n=Z9,r=s(n);function s(a){return a&&a.__esModule?a:{default:a}}function o(){for(var a=arguments.length,l=Array(a),c=0;c<a;c++)l[c]=arguments[c];function d(){for(var u=arguments.length,f=Array(u),g=0;g<u;g++)f[g]=arguments[g];var E=null;return l.forEach(function(S){if(E==null){var w=S.apply(void 0,f);w!=null&&(E=w)}}),E}return(0,r.default)(d)}t.exports=e.default})(a2,a2.exports);const J9=_n("nav-item"),X9={disabled:!1},hE=C.forwardRef(({bsPrefix:t,className:e,as:n=bh,active:r,eventKey:s,...o},a)=>{t=ot(t,"nav-link");const[l,c]=jM({key:_h(s,o.href),active:r,...o});return i(n,{...o,...l,ref:a,className:Ye(e,t,o.disabled&&"disabled",c.isActive&&"active")})});hE.displayName="NavLink";hE.defaultProps=X9;const Q9=hE,eW={justify:!1,fill:!1},pE=C.forwardRef((t,e)=>{const{as:n="div",bsPrefix:r,variant:s,fill:o,justify:a,navbar:l,navbarScroll:c,className:d,activeKey:u,...f}=op(t,{activeKey:"onSelect"}),g=ot(r,"nav");let E,S,w=!1;const _=C.useContext(rc),h=C.useContext(OI);return _?(E=_.bsPrefix,w=l??!0):h&&({cardHeaderBsPrefix:S}=h),i(P9,{as:n,ref:e,activeKey:u,className:Ye(d,{[g]:!w,[`${E}-nav`]:w,[`${E}-nav-scroll`]:w&&c,[`${S}-${s}`]:!!S,[`${g}-${s}`]:!!s,[`${g}-fill`]:o,[`${g}-justified`]:a}),...f})});pE.displayName="Nav";pE.defaultProps=eW;const ul=Object.assign(pE,{Item:J9,Link:Q9}),XM=C.forwardRef(({bsPrefix:t,className:e,as:n,...r},s)=>{t=ot(t,"navbar-brand");const o=n||(r.href?"a":"span");return i(o,{...r,ref:s,className:Ye(e,t)})});XM.displayName="NavbarBrand";const tW=XM,QM=C.forwardRef(({children:t,bsPrefix:e,...n},r)=>{e=ot(e,"navbar-collapse");const s=C.useContext(rc);return i(o7,{in:!!(s&&s.expanded),...n,children:i("div",{ref:r,className:e,children:t})})});QM.displayName="NavbarCollapse";const nW=QM,rW={label:"Toggle navigation"},mE=C.forwardRef(({bsPrefix:t,className:e,children:n,label:r,as:s="button",onClick:o,...a},l)=>{t=ot(t,"navbar-toggler");const{onToggle:c,expanded:d}=C.useContext(rc)||{},u=nn(f=>{o&&o(f),c&&c()});return s==="button"&&(a.type="button"),i(s,{...a,ref:l,onClick:u,"aria-label":r,className:Ye(e,t,!d&&"collapsed"),children:n||i("span",{className:`${t}-icon`})})});mE.displayName="NavbarToggle";mE.defaultProps=rW;const sW=mE;var fw=new WeakMap,l2=function(e,n){if(!(!e||!n)){var r=fw.get(n)||new Map;fw.set(n,r);var s=r.get(e);return s||(s=n.matchMedia(e),s.refCount=0,r.set(s.media,s)),s}};function oW(t,e){e===void 0&&(e=typeof window>"u"?void 0:window);var n=l2(t,e),r=C.useState(function(){return n?n.matches:!1}),s=r[0],o=r[1];return FC(function(){var a=l2(t,e);if(!a)return o(!1);var l=fw.get(e),c=function(){o(a.matches)};return a.refCount++,a.addListener(c),c(),function(){a.removeListener(c),a.refCount--,a.refCount<=0&&(l==null||l.delete(a.media)),a=void 0}},[t]),s}function iW(t){var e=Object.keys(t);function n(l,c){return l===c?c:l?l+" and "+c:c}function r(l){return e[Math.min(e.indexOf(l)+1,e.length-1)]}function s(l){var c=r(l),d=t[c];return typeof d=="number"?d=d-.2+"px":d="calc("+d+" - 0.2px)","(max-width: "+d+")"}function o(l){var c=t[l];return typeof c=="number"&&(c=c+"px"),"(min-width: "+c+")"}function a(l,c,d){var u;if(typeof l=="object")u=l,d=c,c=!0;else{var f;c=c||!0,u=(f={},f[l]=c,f)}var g=C.useMemo(function(){return Object.entries(u).reduce(function(E,S){var w=S[0],_=S[1];return(_==="up"||_===!0)&&(E=n(E,o(w))),(_==="down"||_===!0)&&(E=n(E,s(w))),E},"")},[JSON.stringify(u)]);return oW(g,d)}return a}var aW=iW({xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400});const lW=_n("offcanvas-body"),cW={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1},dW={[qs]:"show",[Xo]:"show"},gE=C.forwardRef(({bsPrefix:t,className:e,children:n,...r},s)=>(t=ot(t,"offcanvas"),i(Pb,{ref:s,addEndListener:Rb,...r,childRef:n.ref,children:(o,a)=>C.cloneElement(n,{...a,className:Ye(e,n.props.className,(o===qs||o===gh)&&`${t}-toggling`,dW[o])})})));gE.defaultProps=cW;gE.displayName="OffcanvasToggling";const uW=gE,fW={closeLabel:"Close",closeButton:!1},yE=C.forwardRef(({bsPrefix:t,className:e,...n},r)=>(t=ot(t,"offcanvas-header"),i(JM,{ref:r,...n,className:Ye(e,t)})));yE.displayName="OffcanvasHeader";yE.defaultProps=fW;const hW=yE,pW=ap("h5"),mW=_n("offcanvas-title",{Component:pW}),gW={show:!1,backdrop:!0,keyboard:!0,scroll:!1,autoFocus:!0,enforceFocus:!0,restoreFocus:!0,placement:"start",renderStaticNode:!1};function yW(t){return i(uW,{...t})}function bW(t){return i(nc,{...t})}const bE=C.forwardRef(({bsPrefix:t,className:e,children:n,"aria-labelledby":r,placement:s,responsive:o,show:a,backdrop:l,keyboard:c,scroll:d,onEscapeKeyDown:u,onShow:f,onHide:g,container:E,autoFocus:S,enforceFocus:w,restoreFocus:_,restoreFocusOptions:h,onEntered:m,onExit:A,onExiting:k,onEnter:R,onEntering:O,onExited:N,backdropClassName:y,manager:v,renderStaticNode:b,...P},F)=>{const I=C.useRef();t=ot(t,"offcanvas");const{onToggle:T}=C.useContext(rc)||{},[q,W]=C.useState(!1),G=aW(o||"xs","up");C.useEffect(()=>{W(o?a&&!G:a)},[a,o,G]);const H=nn(()=>{T==null||T(),g==null||g()}),j=C.useMemo(()=>({onHide:H}),[H]);function U(){return v||(d?(I.current||(I.current=new z9({handleContainerOverflow:!1})),I.current):WM())}const L=(J,...Q)=>{J&&(J.style.visibility="visible"),R==null||R(J,...Q)},K=(J,...Q)=>{J&&(J.style.visibility=""),N==null||N(...Q)},Y=C.useCallback(J=>i("div",{...J,className:Ye(`${t}-backdrop`,y)}),[y,t]),te=J=>i("div",{...J,...P,className:Ye(e,o?`${t}-${o}`:t,`${t}-${s}`),"aria-labelledby":r,children:n});return p(ee,{children:[!q&&(o||b)&&te({}),i(dE.Provider,{value:j,children:i(YM,{show:q,ref:F,backdrop:l,container:E,keyboard:c,autoFocus:S,enforceFocus:w&&!d,restoreFocus:_,restoreFocusOptions:h,onEscapeKeyDown:u,onShow:f,onHide:H,onEnter:L,onEntering:O,onEntered:m,onExit:A,onExiting:k,onExited:K,manager:U(),transition:yW,backdropTransition:bW,renderBackdrop:Y,renderDialog:te})})]})});bE.displayName="Offcanvas";bE.defaultProps=gW;const ff=Object.assign(bE,{Body:lW,Header:hW,Title:mW}),eL=C.forwardRef((t,e)=>{const n=C.useContext(rc);return i(ff,{ref:e,show:!!(n!=null&&n.expanded),...t,renderStaticNode:!0})});eL.displayName="NavbarOffcanvas";const vW=eL,_W=_n("navbar-text",{Component:"span"}),wW={expand:!0,variant:"light",collapseOnSelect:!1},vE=C.forwardRef((t,e)=>{const{bsPrefix:n,expand:r,variant:s,bg:o,fixed:a,sticky:l,className:c,as:d="nav",expanded:u,onToggle:f,onSelect:g,collapseOnSelect:E,...S}=op(t,{expanded:"onToggle"}),w=ot(n,"navbar"),_=C.useCallback((...A)=>{g==null||g(...A),E&&u&&(f==null||f(!1))},[g,E,u,f]);S.role===void 0&&d!=="nav"&&(S.role="navigation");let h=`${w}-expand`;typeof r=="string"&&(h=`${h}-${r}`);const m=C.useMemo(()=>({onToggle:()=>f==null?void 0:f(!u),bsPrefix:w,expanded:!!u,expand:r}),[w,u,r,f]);return i(rc.Provider,{value:m,children:i(Yl.Provider,{value:_,children:i(d,{ref:e,...S,className:Ye(c,w,r&&h,s&&`${w}-${s}`,o&&`bg-${o}`,l&&`sticky-${l}`,a&&`fixed-${a}`)})})})});vE.defaultProps=wW;vE.displayName="Navbar";const mo=Object.assign(vE,{Brand:tW,Collapse:nW,Offcanvas:vW,Text:_W,Toggle:sW}),xW=27,CW=()=>{};function EW(t,e,{disabled:n,clickTrigger:r}={}){const s=e||CW;sM(t,s,{disabled:n,clickTrigger:r});const o=nn(a=>{a.keyCode===xW&&s(a)});C.useEffect(()=>{if(n||t==null)return;const a=su(bg(t));let l=(a.defaultView||window).event;const c=ni(a,"keyup",d=>{if(d===l){l=void 0;return}o(d)});return()=>{c()}},[t,n,o])}const tL=C.forwardRef((t,e)=>{const{flip:n,offset:r,placement:s,containerPadding:o,popperConfig:a={},transition:l}=t,[c,d]=yh(),[u,f]=yh(),g=Ba(d,e),E=dw(t.container),S=dw(t.target),[w,_]=C.useState(!t.show),h=rM(S,c,oM({placement:s,enableEvents:!!t.show,containerPadding:o||5,flip:n,offset:r,arrowElement:u,popperConfig:a}));t.show?w&&_(!1):!t.transition&&!w&&_(!0);const m=(...R)=>{_(!0),t.onExited&&t.onExited(...R)},A=t.show||l&&!w;if(EW(c,t.onHide,{disabled:!t.rootClose||t.rootCloseDisabled,clickTrigger:t.rootCloseEvent}),!A)return null;let k=t.children(Object.assign({},h.attributes.popper,{style:h.styles.popper,ref:g}),{popper:h,placement:s,show:!!t.show,arrowProps:Object.assign({},h.attributes.arrow,{style:h.styles.arrow,ref:f})});if(l){const{onExit:R,onExiting:O,onEnter:N,onEntering:y,onEntered:v}=t;k=i(l,{in:t.show,appear:!0,onExit:R,onExiting:O,onExited:m,onEnter:N,onEntering:y,onEntered:v,children:k})}return E?wl.createPortal(k,E):null});tL.displayName="Overlay";const SW=tL,AW=_n("popover-header"),nL=_n("popover-body");function rL(t,e){let n=t;return t==="left"?n=e?"end":"start":t==="right"&&(n=e?"start":"end"),n}const NW={placement:"right"},sL=C.forwardRef(({bsPrefix:t,placement:e,className:n,style:r,children:s,body:o,arrowProps:a,popper:l,show:c,...d},u)=>{const f=ot(t,"popover"),g=ip(),[E]=(e==null?void 0:e.split("-"))||[],S=rL(E,g);return p("div",{ref:u,role:"tooltip",style:r,"x-placement":E,className:Ye(n,f,E&&`bs-popover-${S}`),...d,children:[i("div",{className:"popover-arrow",...a}),o?i(nL,{children:s}):s]})});sL.defaultProps=NW;const RW=Object.assign(sL,{Header:AW,Body:nL,POPPER_OFFSET:[0,8]});function PW(t){const e=C.useRef(null),n=ot(void 0,"popover"),r=C.useMemo(()=>({name:"offset",options:{offset:()=>e.current&&HM(e.current,n)?t||RW.POPPER_OFFSET:t||[0,0]}}),[t,n]);return[e,[r]]}const OW={transition:nc,rootClose:!1,show:!1,placement:"top"};function FW(t,e){const{ref:n}=t,{ref:r}=e;t.ref=n.__wrapped||(n.__wrapped=s=>n(dy(s))),e.ref=r.__wrapped||(r.__wrapped=s=>r(dy(s)))}const _E=C.forwardRef(({children:t,transition:e,popperConfig:n={},...r},s)=>{const o=C.useRef({}),[a,l]=yh(),[c,d]=PW(r.offset),u=Ba(s,c),f=e===!0?nc:e||void 0,g=nn(E=>{l(E),n==null||n.onFirstUpdate==null||n.onFirstUpdate(E)});return FC(()=>{a&&(o.current.scheduleUpdate==null||o.current.scheduleUpdate())},[a]),i(SW,{...r,ref:u,popperConfig:{...n,modifiers:d.concat(n.modifiers||[]),onFirstUpdate:g},transition:f,children:(E,{arrowProps:S,popper:w,show:_})=>{var h,m;FW(E,S);const A=w==null?void 0:w.placement,k=Object.assign(o.current,{state:w==null?void 0:w.state,scheduleUpdate:w==null?void 0:w.update,placement:A,outOfBoundaries:(w==null||(h=w.state)==null||(m=h.modifiersData.hide)==null?void 0:m.isReferenceHidden)||!1});return typeof t=="function"?t({...E,placement:A,show:_,...!e&&_&&{className:"show"},popper:k,arrowProps:S}):C.cloneElement(t,{...E,placement:A,arrowProps:S,popper:k,className:Ye(t.props.className,!e&&_&&"show"),style:{...t.props.style,...E.style}})}})});_E.displayName="Overlay";_E.defaultProps=OW;const DW=_E;function kW(t){return t&&typeof t=="object"?t:{show:t,hide:t}}function c2(t,e,n){const[r]=e,s=r.currentTarget,o=r.relatedTarget||r.nativeEvent[n];(!o||o!==s)&&!vh(s,o)&&t(...e)}const TW={defaultShow:!1,trigger:["hover","focus"]};function oL({trigger:t,overlay:e,children:n,popperConfig:r={},show:s,defaultShow:o=!1,onToggle:a,delay:l,placement:c,flip:d=c&&c.indexOf("auto")!==-1,...u}){const f=C.useRef(null),g=Ba(f,n.ref),E=TI(),S=C.useRef(""),[w,_]=NC(s,o,a),h=kW(l),{onFocus:m,onBlur:A,onClick:k}=typeof n!="function"?C.Children.only(n).props:{},R=q=>{g(dy(q))},O=C.useCallback(()=>{if(E.clear(),S.current="show",!h.show){_(!0);return}E.set(()=>{S.current==="show"&&_(!0)},h.show)},[h.show,_,E]),N=C.useCallback(()=>{if(E.clear(),S.current="hide",!h.hide){_(!1);return}E.set(()=>{S.current==="hide"&&_(!1)},h.hide)},[h.hide,_,E]),y=C.useCallback((...q)=>{O(),m==null||m(...q)},[O,m]),v=C.useCallback((...q)=>{N(),A==null||A(...q)},[N,A]),b=C.useCallback((...q)=>{_(!w),k==null||k(...q)},[k,_,w]),P=C.useCallback((...q)=>{c2(O,q,"fromElement")},[O]),F=C.useCallback((...q)=>{c2(N,q,"toElement")},[N]),I=t==null?[]:[].concat(t),T={ref:R};return I.indexOf("click")!==-1&&(T.onClick=b),I.indexOf("focus")!==-1&&(T.onFocus=y,T.onBlur=v),I.indexOf("hover")!==-1&&(T.onMouseOver=P,T.onMouseOut=F),p(ee,{children:[typeof n=="function"?n(T):C.cloneElement(n,T),i(DW,{...u,show:w,onHide:N,flip:d,placement:c,popperConfig:r,target:f.current,children:e})]})}oL.defaultProps=TW;const d2=1e3,IW={min:0,max:100,animated:!1,isChild:!1,visuallyHidden:!1,striped:!1};function MW(t,e,n){const r=(t-e)/(n-e)*100;return Math.round(r*d2)/d2}function u2({min:t,now:e,max:n,label:r,visuallyHidden:s,striped:o,animated:a,className:l,style:c,variant:d,bsPrefix:u,...f},g){return i("div",{ref:g,...f,role:"progressbar",className:Ye(l,`${u}-bar`,{[`bg-${d}`]:d,[`${u}-bar-animated`]:a,[`${u}-bar-striped`]:a||o}),style:{width:`${MW(e,t,n)}%`,...c},"aria-valuenow":e,"aria-valuemin":t,"aria-valuemax":n,children:s?i("span",{className:"visually-hidden",children:r}):r})}const wE=C.forwardRef(({isChild:t,...e},n)=>{if(e.bsPrefix=ot(e.bsPrefix,"progress"),t)return u2(e,n);const{min:r,now:s,max:o,label:a,visuallyHidden:l,striped:c,animated:d,bsPrefix:u,variant:f,className:g,children:E,...S}=e;return i("div",{ref:n,...S,className:Ye(g,u),children:E?ow(E,w=>C.cloneElement(w,{isChild:!0})):u2({min:r,now:s,max:o,label:a,visuallyHidden:l,striped:c,animated:d,bsPrefix:u,variant:f},n)})});wE.displayName="ProgressBar";wE.defaultProps=IW;const iL=wE,aL=C.forwardRef(({bsPrefix:t,className:e,as:n="div",...r},s)=>{const o=ot(t,"row"),a=fI(),l=hI(),c=`${o}-cols`,d=[];return a.forEach(u=>{const f=r[u];delete r[u];let g;f!=null&&typeof f=="object"?{cols:g}=f:g=f;const E=u!==l?`-${u}`:"";g!=null&&d.push(`${c}${E}-${g}`)}),i(n,{ref:s,...r,className:Ye(e,o,...d)})});aL.displayName="Row";const V=aL,lL=C.forwardRef(({bsPrefix:t,variant:e,animation:n="border",size:r,as:s="div",className:o,...a},l)=>{t=ot(t,"spinner");const c=`${t}-${n}`;return i(s,{ref:l,...a,className:Ye(o,c,r&&`${c}-${r}`,e&&`text-${e}`)})});lL.displayName="Spinner";const LW=lL,zW=C.forwardRef(({bsPrefix:t,className:e,striped:n,bordered:r,borderless:s,hover:o,size:a,variant:l,responsive:c,...d},u)=>{const f=ot(t,"table"),g=Ye(e,f,l&&`${f}-${l}`,a&&`${f}-${a}`,n&&`${f}-${typeof n=="string"?`striped-${n}`:"striped"}`,r&&`${f}-bordered`,s&&`${f}-borderless`,o&&`${f}-hover`),E=i("table",{...d,className:g,ref:u});if(c){let S=`${f}-responsive`;return typeof c=="string"&&(S=`${S}-${c}`),i("div",{className:S,children:E})}return E}),Ie=zW,qW={placement:"right"},xE=C.forwardRef(({bsPrefix:t,placement:e,className:n,style:r,children:s,arrowProps:o,popper:a,show:l,...c},d)=>{t=ot(t,"tooltip");const u=ip(),[f]=(e==null?void 0:e.split("-"))||[],g=rL(f,u);return p("div",{ref:d,style:r,role:"tooltip","x-placement":f,className:Ye(n,t,`bs-tooltip-${g}`),...c,children:[i("div",{className:"tooltip-arrow",...o}),i("div",{className:`${t}-inner`,children:s})]})});xE.defaultProps=qW;xE.displayName="Tooltip";const jW=xE;var cL={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},f2=Fe.createContext&&Fe.createContext(cL),$W=["attr","size","title"];function BW(t,e){if(t==null)return{};var n=UW(t,e),r,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(s=0;s<o.length;s++)r=o[s],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function UW(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,o;for(o=0;o<r.length;o++)s=r[o],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function hy(){return hy=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},hy.apply(this,arguments)}function h2(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function py(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?h2(Object(n),!0).forEach(function(r){YW(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h2(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function YW(t,e,n){return e=HW(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function HW(t){var e=GW(t,"string");return typeof e=="symbol"?e:String(e)}function GW(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function dL(t){return t&&t.map((e,n)=>Fe.createElement(e.tag,py({key:n},e.attr),dL(e.child)))}function Pt(t){return e=>Fe.createElement(WW,hy({attr:py({},t.attr)},e),dL(t.child))}function WW(t){var e=n=>{var{attr:r,size:s,title:o}=t,a=BW(t,$W),l=s||n.size||"1em",c;return n.className&&(c=n.className),t.className&&(c=(c?c+" ":"")+t.className),Fe.createElement("svg",hy({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:c,style:py(py({color:t.color||n.color},n.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),o&&Fe.createElement("title",null,o),t.children)};return f2!==void 0?Fe.createElement(f2.Consumer,null,n=>e(n)):e(cL)}function hw(t){return Pt({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M12 7C9.23858 7 7 9.23858 7 12C7 14.7614 9.23858 17 12 17C14.7614 17 17 14.7614 17 12C17 9.23858 14.7614 7 12 7ZM9 12C9 13.6569 10.3431 15 12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M18 5C17.4477 5 17 5.44772 17 6C17 6.55228 17.4477 7 18 7C18.5523 7 19 6.55228 19 6C19 5.44772 18.5523 5 18 5Z",fill:"currentColor"},child:[]},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M5 1C2.79086 1 1 2.79086 1 5V19C1 21.2091 2.79086 23 5 23H19C21.2091 23 23 21.2091 23 19V5C23 2.79086 21.2091 1 19 1H5ZM19 3H5C3.89543 3 3 3.89543 3 5V19C3 20.1046 3.89543 21 5 21H19C20.1046 21 21 20.1046 21 19V5C21 3.89543 20.1046 3 19 3Z",fill:"currentColor"},child:[]}]})(t)}function pw(t){return Pt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z"},child:[]}]})(t)}function VW(t){return Pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"},child:[]}]})(t)}function uL(t){return Pt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"},child:[]}]})(t)}function p2(t){return Pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zm-48 0l-.003-.282-26.064 22.741-62.679-58.5 16.454-84.355 34.303 3.072c-24.889-34.216-60.004-60.089-100.709-73.141l13.651 31.939L256 139l-74.953-41.525 13.651-31.939c-40.631 13.028-75.78 38.87-100.709 73.141l34.565-3.073 16.192 84.355-62.678 58.5-26.064-22.741-.003.282c0 43.015 13.497 83.952 38.472 117.991l7.704-33.897 85.138 10.447 36.301 77.826-29.902 17.786c40.202 13.122 84.29 13.148 124.572 0l-29.902-17.786 36.301-77.826 85.138-10.447 7.704 33.897C442.503 339.952 456 299.015 456 256zm-248.102 69.571l-29.894-91.312L256 177.732l77.996 56.527-29.622 91.312h-96.476z"},child:[]}]})(t)}function I0(t){return Pt({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41z"},child:[]}]})(t)}function KW(t){return Pt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"},child:[]}]})(t)}function Ft(t){return Pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zM4 12c0-.899.156-1.762.431-2.569L6 11l2 2v2l2 2 1 1v1.931C7.061 19.436 4 16.072 4 12zm14.33 4.873C17.677 16.347 16.687 16 16 16v-1a2 2 0 0 0-2-2h-4v-3a2 2 0 0 0 2-2V7h1a2 2 0 0 0 2-2v-.411C17.928 5.778 20 8.65 20 12a7.947 7.947 0 0 1-1.67 4.873z"},child:[]}]})(t)}const ZW="/assets/apoyahorizontal-76b7e0a4.gif",JW="/assets/apoya-ee506bb0.png",XW="/assets/500apoyo-bd2c18df.png",QW="/assets/1000apoyo-0ee155df.png",eV="/assets/3000apoyo-05495181.png",tV="/assets/5000apoyo-21c37a79.png",nV="modulepreload",rV=function(t){return"/"+t},m2={},up=function(e,n,r){if(!n||n.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=rV(o),o in m2)return;m2[o]=!0;const a=o.endsWith(".css"),l=a?'[rel="stylesheet"]':"";if(!!r)for(let u=s.length-1;u>=0;u--){const f=s[u];if(f.href===o&&(!a||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${l}`))return;const d=document.createElement("link");if(d.rel=a?"stylesheet":nV,a||(d.as="script",d.crossOrigin=""),d.href=o,document.head.appendChild(d),a)return new Promise((u,f)=>{d.addEventListener("load",u),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})},sV=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...n)=>up(()=>Promise.resolve().then(()=>fp),void 0).then(({default:r})=>r(...n)):e=fetch,(...n)=>e(...n)};class CE extends Error{constructor(e,n="FunctionsError",r){super(e),this.name=n,this.context=r}}class oV extends CE{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class iV extends CE{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class aV extends CE{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var lV=globalThis&&globalThis.__awaiter||function(t,e,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function l(u){try{d(r.next(u))}catch(f){a(f)}}function c(u){try{d(r.throw(u))}catch(f){a(f)}}function d(u){u.done?o(u.value):s(u.value).then(l,c)}d((r=r.apply(t,e||[])).next())})};class cV{constructor(e,{headers:n={},customFetch:r}={}){this.url=e,this.headers=n,this.fetch=sV(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,n={}){var r;return lV(this,void 0,void 0,function*(){try{const{headers:s,method:o,body:a}=n;let l={},c;a&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)&&(typeof Blob<"u"&&a instanceof Blob||a instanceof ArrayBuffer?(l["Content-Type"]="application/octet-stream",c=a):typeof a=="string"?(l["Content-Type"]="text/plain",c=a):typeof FormData<"u"&&a instanceof FormData?c=a:(l["Content-Type"]="application/json",c=JSON.stringify(a)));const d=yield this.fetch(`${this.url}/${e}`,{method:o||"POST",headers:Object.assign(Object.assign(Object.assign({},l),this.headers),s),body:c}).catch(E=>{throw new oV(E)}),u=d.headers.get("x-relay-error");if(u&&u==="true")throw new iV(d);if(!d.ok)throw new aV(d);let f=((r=d.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),g;return f==="application/json"?g=yield d.json():f==="application/octet-stream"?g=yield d.blob():f==="multipart/form-data"?g=yield d.formData():g=yield d.text(),{data:g,error:null}}catch(s){return{data:null,error:s}}})}}var dV=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},zd=dV();const uV=zd.fetch,EE=zd.fetch.bind(zd),fL=zd.Headers,fV=zd.Request,hV=zd.Response,fp=Object.freeze(Object.defineProperty({__proto__:null,Headers:fL,Request:fV,Response:hV,default:EE,fetch:uV},Symbol.toStringTag,{value:"Module"}));class pV{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:typeof fetch>"u"?this.fetch=EE:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}then(e,n){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async o=>{var a,l,c;let d=null,u=null,f=null,g=o.status,E=o.statusText;if(o.ok){if(this.method!=="HEAD"){const h=await o.text();h===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?u=h:u=JSON.parse(h))}const w=(a=this.headers.Prefer)===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),_=(l=o.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");w&&_&&_.length>1&&(f=parseInt(_[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(u)&&(u.length>1?(d={code:"PGRST116",details:`Results contain ${u.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},u=null,f=null,g=406,E="Not Acceptable"):u.length===1?u=u[0]:u=null)}else{const w=await o.text();try{d=JSON.parse(w),Array.isArray(d)&&o.status===404&&(u=[],d=null,g=200,E="OK")}catch{o.status===404&&w===""?(g=204,E="No Content"):d={message:w}}if(d&&this.isMaybeSingle&&(!((c=d==null?void 0:d.details)===null||c===void 0)&&c.includes("0 rows"))&&(d=null,g=200,E="OK"),d&&this.shouldThrowOnError)throw d}return{error:d,data:u,count:f,status:g,statusText:E}});return this.shouldThrowOnError||(s=s.catch(o=>{var a,l,c;return{error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:`${(l=o==null?void 0:o.stack)!==null&&l!==void 0?l:""}`,hint:"",code:`${(c=o==null?void 0:o.code)!==null&&c!==void 0?c:""}`},data:null,count:null,status:0,statusText:""}})),s.then(e,n)}}class mV extends pV{select(e){let n=!1;const r=(e??"*").split("").map(s=>/\s/.test(s)&&!n?"":(s==='"'&&(n=!n),s)).join("");return this.url.searchParams.set("select",r),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:n=!0,nullsFirst:r,foreignTable:s,referencedTable:o=s}={}){const a=o?`${o}.order`:"order",l=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${l?`${l},`:""}${e}.${n?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this}range(e,n,{foreignTable:r,referencedTable:s=r}={}){const o=typeof s>"u"?"offset":`${s}.offset`,a=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(o,`${e}`),this.url.searchParams.set(a,`${n-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:e=!1,verbose:n=!1,settings:r=!1,buffers:s=!1,wal:o=!1,format:a="text"}={}){var l;const c=[e?"analyze":null,n?"verbose":null,r?"settings":null,s?"buffers":null,o?"wal":null].filter(Boolean).join("|"),d=(l=this.headers.Accept)!==null&&l!==void 0?l:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${a}; for="${d}"; options=${c};`,a==="json"?this:this}rollback(){var e;return((e=this.headers.Prefer)!==null&&e!==void 0?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}}class Ic extends mV{eq(e,n){return this.url.searchParams.append(e,`eq.${n}`),this}neq(e,n){return this.url.searchParams.append(e,`neq.${n}`),this}gt(e,n){return this.url.searchParams.append(e,`gt.${n}`),this}gte(e,n){return this.url.searchParams.append(e,`gte.${n}`),this}lt(e,n){return this.url.searchParams.append(e,`lt.${n}`),this}lte(e,n){return this.url.searchParams.append(e,`lte.${n}`),this}like(e,n){return this.url.searchParams.append(e,`like.${n}`),this}likeAllOf(e,n){return this.url.searchParams.append(e,`like(all).{${n.join(",")}}`),this}likeAnyOf(e,n){return this.url.searchParams.append(e,`like(any).{${n.join(",")}}`),this}ilike(e,n){return this.url.searchParams.append(e,`ilike.${n}`),this}ilikeAllOf(e,n){return this.url.searchParams.append(e,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(e,n){return this.url.searchParams.append(e,`ilike(any).{${n.join(",")}}`),this}is(e,n){return this.url.searchParams.append(e,`is.${n}`),this}in(e,n){const r=n.map(s=>typeof s=="string"&&new RegExp("[,()]").test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}contains(e,n){return typeof n=="string"?this.url.searchParams.append(e,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(e,`cs.{${n.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(n)}`),this}containedBy(e,n){return typeof n=="string"?this.url.searchParams.append(e,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(e,`cd.{${n.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(n)}`),this}rangeGt(e,n){return this.url.searchParams.append(e,`sr.${n}`),this}rangeGte(e,n){return this.url.searchParams.append(e,`nxl.${n}`),this}rangeLt(e,n){return this.url.searchParams.append(e,`sl.${n}`),this}rangeLte(e,n){return this.url.searchParams.append(e,`nxr.${n}`),this}rangeAdjacent(e,n){return this.url.searchParams.append(e,`adj.${n}`),this}overlaps(e,n){return typeof n=="string"?this.url.searchParams.append(e,`ov.${n}`):this.url.searchParams.append(e,`ov.{${n.join(",")}}`),this}textSearch(e,n,{config:r,type:s}={}){let o="";s==="plain"?o="pl":s==="phrase"?o="ph":s==="websearch"&&(o="w");const a=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${o}fts${a}.${n}`),this}match(e){return Object.entries(e).forEach(([n,r])=>{this.url.searchParams.append(n,`eq.${r}`)}),this}not(e,n,r){return this.url.searchParams.append(e,`not.${n}.${r}`),this}or(e,{foreignTable:n,referencedTable:r=n}={}){const s=r?`${r}.or`:"or";return this.url.searchParams.append(s,`(${e})`),this}filter(e,n,r){return this.url.searchParams.append(e,`${n}.${r}`),this}}class gV{constructor(e,{headers:n={},schema:r,fetch:s}){this.url=e,this.headers=n,this.schema=r,this.fetch=s}select(e,{head:n=!1,count:r}={}){const s=n?"HEAD":"GET";let o=!1;const a=(e??"*").split("").map(l=>/\s/.test(l)&&!o?"":(l==='"'&&(o=!o),l)).join("");return this.url.searchParams.set("select",a),r&&(this.headers.Prefer=`count=${r}`),new Ic({method:s,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:n,defaultToNull:r=!0}={}){const s="POST",o=[];if(this.headers.Prefer&&o.push(this.headers.Prefer),n&&o.push(`count=${n}`),r||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(e)){const a=e.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>0){const l=[...new Set(a)].map(c=>`"${c}"`);this.url.searchParams.set("columns",l.join(","))}}return new Ic({method:s,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:n,ignoreDuplicates:r=!1,count:s,defaultToNull:o=!0}={}){const a="POST",l=[`resolution=${r?"ignore":"merge"}-duplicates`];if(n!==void 0&&this.url.searchParams.set("on_conflict",n),this.headers.Prefer&&l.push(this.headers.Prefer),s&&l.push(`count=${s}`),o||l.push("missing=default"),this.headers.Prefer=l.join(","),Array.isArray(e)){const c=e.reduce((d,u)=>d.concat(Object.keys(u)),[]);if(c.length>0){const d=[...new Set(c)].map(u=>`"${u}"`);this.url.searchParams.set("columns",d.join(","))}}return new Ic({method:a,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:n}={}){const r="PATCH",s=[];return this.headers.Prefer&&s.push(this.headers.Prefer),n&&s.push(`count=${n}`),this.headers.Prefer=s.join(","),new Ic({method:r,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){const n="DELETE",r=[];return e&&r.push(`count=${e}`),this.headers.Prefer&&r.unshift(this.headers.Prefer),this.headers.Prefer=r.join(","),new Ic({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}const yV="1.9.0",bV={"X-Client-Info":`postgrest-js/${yV}`};class SE{constructor(e,{headers:n={},schema:r,fetch:s}={}){this.url=e,this.headers=Object.assign(Object.assign({},bV),n),this.schemaName=r,this.fetch=s}from(e){const n=new URL(`${this.url}/${e}`);return new gV(n,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new SE(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,n={},{head:r=!1,count:s}={}){let o;const a=new URL(`${this.url}/rpc/${e}`);let l;r?(o="HEAD",Object.entries(n).forEach(([d,u])=>{a.searchParams.append(d,`${u}`)})):(o="POST",l=n);const c=Object.assign({},this.headers);return s&&(c.Prefer=`count=${s}`),new Ic({method:o,url:a,headers:c,schema:this.schemaName,body:l,fetch:this.fetch,allowEmpty:!1})}}const vV="2.9.0",_V={"X-Client-Info":`realtime-js/${vV}`},wV="1.0.0",hL=1e4,xV=1e3;var Df;(function(t){t[t.connecting=0]="connecting",t[t.open=1]="open",t[t.closing=2]="closing",t[t.closed=3]="closed"})(Df||(Df={}));var Vr;(function(t){t.closed="closed",t.errored="errored",t.joined="joined",t.joining="joining",t.leaving="leaving"})(Vr||(Vr={}));var Ls;(function(t){t.close="phx_close",t.error="phx_error",t.join="phx_join",t.reply="phx_reply",t.leave="phx_leave",t.access_token="access_token"})(Ls||(Ls={}));var mw;(function(t){t.websocket="websocket"})(mw||(mw={}));var gl;(function(t){t.Connecting="connecting",t.Open="open",t.Closing="closing",t.Closed="closed"})(gl||(gl={}));class pL{constructor(e,n){this.callback=e,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}class CV{constructor(){this.HEADER_LENGTH=1}decode(e,n){return e.constructor===ArrayBuffer?n(this._binaryDecode(e)):n(typeof e=="string"?JSON.parse(e):{})}_binaryDecode(e){const n=new DataView(e),r=new TextDecoder;return this._decodeBroadcast(e,n,r)}_decodeBroadcast(e,n,r){const s=n.getUint8(1),o=n.getUint8(2);let a=this.HEADER_LENGTH+2;const l=r.decode(e.slice(a,a+s));a=a+s;const c=r.decode(e.slice(a,a+o));a=a+o;const d=JSON.parse(r.decode(e.slice(a,e.byteLength)));return{ref:null,topic:l,event:c,payload:d}}}class M0{constructor(e,n,r={},s=hL){this.channel=e,this.event=n,this.payload=r,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,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(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,n){var r;return this._hasReceived(e)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:e,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(n))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var g2;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(g2||(g2={}));class kf{constructor(e,n){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},s=>{const{onJoin:o,onLeave:a,onSync:l}=this.caller;this.joinRef=this.channel._joinRef(),this.state=kf.syncState(this.state,s,o,a),this.pendingDiffs.forEach(c=>{this.state=kf.syncDiff(this.state,c,o,a)}),this.pendingDiffs=[],l()}),this.channel._on(r.diff,{},s=>{const{onJoin:o,onLeave:a,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=kf.syncDiff(this.state,s,o,a),l())}),this.onJoin((s,o,a)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:o,newPresences:a})}),this.onLeave((s,o,a)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:o,leftPresences:a})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,n,r,s){const o=this.cloneDeep(e),a=this.transformState(n),l={},c={};return this.map(o,(d,u)=>{a[d]||(c[d]=u)}),this.map(a,(d,u)=>{const f=o[d];if(f){const g=u.map(_=>_.presence_ref),E=f.map(_=>_.presence_ref),S=u.filter(_=>E.indexOf(_.presence_ref)<0),w=f.filter(_=>g.indexOf(_.presence_ref)<0);S.length>0&&(l[d]=S),w.length>0&&(c[d]=w)}else l[d]=u}),this.syncDiff(o,{joins:l,leaves:c},r,s)}static syncDiff(e,n,r,s){const{joins:o,leaves:a}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),s||(s=()=>{}),this.map(o,(l,c)=>{var d;const u=(d=e[l])!==null&&d!==void 0?d:[];if(e[l]=this.cloneDeep(c),u.length>0){const f=e[l].map(E=>E.presence_ref),g=u.filter(E=>f.indexOf(E.presence_ref)<0);e[l].unshift(...g)}r(l,u,c)}),this.map(a,(l,c)=>{let d=e[l];if(!d)return;const u=c.map(f=>f.presence_ref);d=d.filter(f=>u.indexOf(f.presence_ref)<0),e[l]=d,s(l,d,c),d.length===0&&delete e[l]}),e}static map(e,n){return Object.getOwnPropertyNames(e).map(r=>n(r,e[r]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((n,r)=>{const s=e[r];return"metas"in s?n[r]=s.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):n[r]=s,n},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Bt;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(Bt||(Bt={}));const y2=(t,e,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(e).reduce((o,a)=>(o[a]=EV(a,t,e,s),o),{})},EV=(t,e,n,r)=>{const s=e.find(l=>l.name===t),o=s==null?void 0:s.type,a=n[t];return o&&!r.includes(o)?mL(o,a):gw(a)},mL=(t,e)=>{if(t.charAt(0)==="_"){const n=t.slice(1,t.length);return RV(e,n)}switch(t){case Bt.bool:return SV(e);case Bt.float4:case Bt.float8:case Bt.int2:case Bt.int4:case Bt.int8:case Bt.numeric:case Bt.oid:return AV(e);case Bt.json:case Bt.jsonb:return NV(e);case Bt.timestamp:return PV(e);case Bt.abstime:case Bt.date:case Bt.daterange:case Bt.int4range:case Bt.int8range:case Bt.money:case Bt.reltime:case Bt.text:case Bt.time:case Bt.timestamptz:case Bt.timetz:case Bt.tsrange:case Bt.tstzrange:return gw(e);default:return gw(e)}},gw=t=>t,SV=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},AV=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},NV=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch(e){return console.log(`JSON parse error: ${e}`),t}return t},RV=(t,e)=>{if(typeof t!="string")return t;const n=t.length-1,r=t[n];if(t[0]==="{"&&r==="}"){let o;const a=t.slice(1,n);try{o=JSON.parse("["+a+"]")}catch{o=a?a.split(","):[]}return o.map(l=>mL(e,l))}return t},PV=t=>typeof t=="string"?t.replace(" ","T"):t;var b2;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(b2||(b2={}));var v2;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes"})(v2||(v2={}));var _2;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(_2||(_2={}));class AE{constructor(e,n={config:{}},r){this.topic=e,this.params=n,this.socket=r,this.bindings={},this.state=Vr.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""}},n.config),this.timeout=this.socket.timeout,this.joinPush=new M0(this,Ls.join,this.params,this.timeout),this.rejoinTimer=new pL(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Vr.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Vr.closed,this.socket._remove(this)}),this._onError(s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=Vr.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Vr.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Ls.reply,{},(s,o)=>{this._trigger(this._replyEventName(o),s)}),this.presence=new kf(this),this.broadcastEndpointURL=this._broadcastEndpointURL()}subscribe(e,n=this.timeout){var r,s;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:o,presence:a}}=this.params;this._onError(d=>e&&e("CHANNEL_ERROR",d)),this._onClose(()=>e&&e("CLOSED"));const l={},c={broadcast:o,presence:a,postgres_changes:(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(d=>d.filter))!==null&&s!==void 0?s:[]};this.socket.accessToken&&(l.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:c},l)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",({postgres_changes:d})=>{var u;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),d===void 0){e&&e("SUBSCRIBED");return}else{const f=this.bindings.postgres_changes,g=(u=f==null?void 0:f.length)!==null&&u!==void 0?u:0,E=[];for(let S=0;S<g;S++){const w=f[S],{filter:{event:_,schema:h,table:m,filter:A}}=w,k=d&&d[S];if(k&&k.event===_&&k.schema===h&&k.table===m&&k.filter===A)E.push(Object.assign(Object.assign({},w),{id:k.id}));else{this.unsubscribe(),e&&e("CHANNEL_ERROR",new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=E,e&&e("SUBSCRIBED");return}}).receive("error",d=>{e&&e("CHANNEL_ERROR",new Error(JSON.stringify(Object.values(d).join(", ")||"error")))}).receive("timeout",()=>{e&&e("TIMED_OUT")})}return this}presenceState(){return this.presence.state}async track(e,n={}){return await this.send({type:"presence",event:"track",payload:e},n.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,n,r){return this._on(e,n,r)}async send(e,n={}){var r,s;if(!this._canPush()&&e.type==="broadcast"){const{event:o,payload:a}=e,l={method:"POST",headers:{apikey:(r=this.socket.accessToken)!==null&&r!==void 0?r:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:a}]})};try{return(await this._fetchWithTimeout(this.broadcastEndpointURL,l,(s=n.timeout)!==null&&s!==void 0?s:this.timeout)).ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var a,l,c;const d=this._push(e.type,e,n.timeout||this.timeout);e.type==="broadcast"&&!(!((c=(l=(a=this.params)===null||a===void 0?void 0:a.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&o("ok"),d.receive("ok",()=>o("ok")),d.receive("timeout",()=>o("timed out"))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=Vr.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Ls.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(r=>{const s=new M0(this,Ls.leave,{},e);s.receive("ok",()=>{n(),r("ok")}).receive("timeout",()=>{n(),r("timed out")}).receive("error",()=>{r("error")}),s.send(),this._canPush()||s.trigger("ok",{})})}_broadcastEndpointURL(){let e=this.socket.endPoint;return e=e.replace(/^ws/i,"http"),e=e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),e.replace(/\/+$/,"")+"/api/broadcast"}async _fetchWithTimeout(e,n,r){const s=new AbortController,o=setTimeout(()=>s.abort(),r),a=await this.socket.fetch(e,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(o),a}_push(e,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new M0(this,e,n,r);return this._canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}_onMessage(e,n,r){return n}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,n,r){var s,o;const a=e.toLocaleLowerCase(),{close:l,error:c,leave:d,join:u}=Ls;if(r&&[l,c,d,u].indexOf(a)>=0&&r!==this._joinRef())return;let g=this._onMessage(a,n,r);if(n&&!g)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(a)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(E=>{var S,w,_;return((S=E.filter)===null||S===void 0?void 0:S.event)==="*"||((_=(w=E.filter)===null||w===void 0?void 0:w.event)===null||_===void 0?void 0:_.toLocaleLowerCase())===a}).map(E=>E.callback(g,r)):(o=this.bindings[a])===null||o===void 0||o.filter(E=>{var S,w,_,h,m,A;if(["broadcast","presence","postgres_changes"].includes(a))if("id"in E){const k=E.id,R=(S=E.filter)===null||S===void 0?void 0:S.event;return k&&((w=n.ids)===null||w===void 0?void 0:w.includes(k))&&(R==="*"||(R==null?void 0:R.toLocaleLowerCase())===((_=n.data)===null||_===void 0?void 0:_.type.toLocaleLowerCase()))}else{const k=(m=(h=E==null?void 0:E.filter)===null||h===void 0?void 0:h.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return k==="*"||k===((A=n==null?void 0:n.event)===null||A===void 0?void 0:A.toLocaleLowerCase())}else return E.type.toLocaleLowerCase()===a}).map(E=>{if(typeof g=="object"&&"ids"in g){const S=g.data,{schema:w,table:_,commit_timestamp:h,type:m,errors:A}=S;g=Object.assign(Object.assign({},{schema:w,table:_,commit_timestamp:h,eventType:m,new:{},old:{},errors:A}),this._getPayloadRecords(S))}E.callback(g,r)})}_isClosed(){return this.state===Vr.closed}_isJoined(){return this.state===Vr.joined}_isJoining(){return this.state===Vr.joining}_isLeaving(){return this.state===Vr.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,n,r){const s=e.toLocaleLowerCase(),o={type:s,filter:n,callback:r};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this}_off(e,n){const r=e.toLocaleLowerCase();return this.bindings[r]=this.bindings[r].filter(s=>{var o;return!(((o=s.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===r&&AE.isEqual(s.filter,n))}),this}static isEqual(e,n){if(Object.keys(e).length!==Object.keys(n).length)return!1;for(const r in e)if(e[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(Ls.close,{},e)}_onError(e){this._on(Ls.error,{},n=>e(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Vr.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const n={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(n.new=y2(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(n.old=y2(e.columns,e.old_record)),n}}const OV=()=>{},gL=typeof WebSocket<"u",FV=gL?WebSocket:require("ws");class DV{constructor(e,n){var r;this.accessToken=null,this.channels=[],this.endPoint="",this.headers=_V,this.params={},this.timeout=hL,this.transport=FV,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=OV,this.conn=null,this.sendBuffer=[],this.serializer=new CV,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=o=>{let a;return o?a=o:typeof fetch>"u"?a=(...l)=>up(()=>Promise.resolve().then(()=>fp),void 0).then(({default:c})=>c(...l)):a=fetch,(...l)=>a(...l)},this.endPoint=`${e}/${mw.websocket}`,n!=null&&n.params&&(this.params=n.params),n!=null&&n.headers&&(this.headers=Object.assign(Object.assign({},this.headers),n.headers)),n!=null&&n.timeout&&(this.timeout=n.timeout),n!=null&&n.logger&&(this.logger=n.logger),n!=null&&n.transport&&(this.transport=n.transport),n!=null&&n.heartbeatIntervalMs&&(this.heartbeatIntervalMs=n.heartbeatIntervalMs);const s=(r=n==null?void 0:n.params)===null||r===void 0?void 0:r.apikey;s&&(this.accessToken=s),this.reconnectAfterMs=n!=null&&n.reconnectAfterMs?n.reconnectAfterMs:o=>[1e3,2e3,5e3,1e4][o-1]||1e4,this.encode=n!=null&&n.encode?n.encode:(o,a)=>a(JSON.stringify(o)),this.decode=n!=null&&n.decode?n.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new pL(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){this.conn||(gL?this.conn=new this.transport(this._endPointURL()):this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers}),this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e)))}disconnect(e,n){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,n??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(e){const n=await e.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const e=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.disconnect(),e}log(e,n,r){this.logger(e,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case Df.connecting:return gl.Connecting;case Df.open:return gl.Open;case Df.closing:return gl.Closing;default:return gl.Closed}}isConnected(){return this.connectionState()===gl.Open}channel(e,n={config:{}}){const r=new AE(`realtime:${e}`,n,this);return this.channels.push(r),r}push(e){const{topic:n,event:r,payload:s,ref:o}=e,a=()=>{this.encode(e,l=>{var c;(c=this.conn)===null||c===void 0||c.send(l)})};this.log("push",`${n} ${r} (${o})`,s),this.isConnected()?a():this.sendBuffer.push(a)}setAuth(e){this.accessToken=e,this.channels.forEach(n=>{e&&n.updateJoinPayload({access_token:e}),n.joinedOnce&&n._isJoined()&&n._push(Ls.access_token,{access_token:e})})}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let n=this.channels.find(r=>r.topic===e&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${e}"`),n.unsubscribe())}_remove(e){this.channels=this.channels.filter(n=>n._joinRef()!==e._joinRef())}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:wV}))}_onConnMessage(e){this.decode(e.data,n=>{let{topic:r,event:s,payload:o,ref:a}=n;(a&&a===this.pendingHeartbeatRef||s===(o==null?void 0:o.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${o.status||""} ${r} ${s} ${a&&"("+a+")"||""}`,o),this.channels.filter(l=>l._isMember(r)).forEach(l=>l._trigger(s,o,a)),this.stateChangeCallbacks.message.forEach(l=>l(n))})}_onConnOpen(){this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this._sendHeartbeat(),this.heartbeatIntervalMs),this.stateChangeCallbacks.open.forEach(e=>e())}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(n=>n(e))}_onConnError(e){this.log("transport",e.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(n=>n(e))}_triggerChanError(){this.channels.forEach(e=>e._trigger(Ls.error))}_appendParams(e,n){if(Object.keys(n).length===0)return e;const r=e.match(/\?/)?"&":"?",s=new URLSearchParams(n);return`${e}${r}${s}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_sendHeartbeat(){var e;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),(e=this.conn)===null||e===void 0||e.close(xV,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}}class NE extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function cr(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}class kV extends NE{constructor(e,n){super(e),this.name="StorageApiError",this.status=n}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class w2 extends NE{constructor(e,n){super(e),this.name="StorageUnknownError",this.originalError=n}}var TV=globalThis&&globalThis.__awaiter||function(t,e,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function l(u){try{d(r.next(u))}catch(f){a(f)}}function c(u){try{d(r.throw(u))}catch(f){a(f)}}function d(u){u.done?o(u.value):s(u.value).then(l,c)}d((r=r.apply(t,e||[])).next())})};const yL=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...n)=>up(()=>Promise.resolve().then(()=>fp),void 0).then(({default:r})=>r(...n)):e=fetch,(...n)=>e(...n)},IV=()=>TV(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield up(()=>Promise.resolve().then(()=>fp),void 0)).Response:Response});var lu=globalThis&&globalThis.__awaiter||function(t,e,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function l(u){try{d(r.next(u))}catch(f){a(f)}}function c(u){try{d(r.throw(u))}catch(f){a(f)}}function d(u){u.done?o(u.value):s(u.value).then(l,c)}d((r=r.apply(t,e||[])).next())})};const L0=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),MV=(t,e)=>lu(void 0,void 0,void 0,function*(){const n=yield IV();t instanceof n?t.json().then(r=>{e(new kV(L0(r),t.status||500))}).catch(r=>{e(new w2(L0(r),r))}):e(new w2(L0(t),t))}),LV=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};function Lb(t,e,n,r,s,o){return lu(this,void 0,void 0,function*(){return new Promise((a,l)=>{t(n,LV(e,r,s,o)).then(c=>{if(!c.ok)throw c;return r!=null&&r.noResolveJson?c:c.json()}).then(c=>a(c)).catch(c=>MV(c,l))})})}function yw(t,e,n,r){return lu(this,void 0,void 0,function*(){return Lb(t,"GET",e,n,r)})}function Xi(t,e,n,r,s){return lu(this,void 0,void 0,function*(){return Lb(t,"POST",e,r,s,n)})}function zV(t,e,n,r,s){return lu(this,void 0,void 0,function*(){return Lb(t,"PUT",e,r,s,n)})}function bL(t,e,n,r,s){return lu(this,void 0,void 0,function*(){return Lb(t,"DELETE",e,r,s,n)})}var ds=globalThis&&globalThis.__awaiter||function(t,e,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function l(u){try{d(r.next(u))}catch(f){a(f)}}function c(u){try{d(r.throw(u))}catch(f){a(f)}}function d(u){u.done?o(u.value):s(u.value).then(l,c)}d((r=r.apply(t,e||[])).next())})};const qV={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},x2={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class jV{constructor(e,n={},r,s){this.url=e,this.headers=n,this.bucketId=r,this.fetch=yL(s)}uploadOrUpdate(e,n,r,s){return ds(this,void 0,void 0,function*(){try{let o;const a=Object.assign(Object.assign({},x2),s),l=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(a.upsert)});typeof Blob<"u"&&r instanceof Blob?(o=new FormData,o.append("cacheControl",a.cacheControl),o.append("",r)):typeof FormData<"u"&&r instanceof FormData?(o=r,o.append("cacheControl",a.cacheControl)):(o=r,l["cache-control"]=`max-age=${a.cacheControl}`,l["content-type"]=a.contentType);const c=this._removeEmptyFolders(n),d=this._getFinalPath(c),u=yield this.fetch(`${this.url}/object/${d}`,Object.assign({method:e,body:o,headers:l},a!=null&&a.duplex?{duplex:a.duplex}:{})),f=yield u.json();return u.ok?{data:{path:c,id:f.Id,fullPath:f.Key},error:null}:{data:null,error:f}}catch(o){if(cr(o))return{data:null,error:o};throw o}})}upload(e,n,r){return ds(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,n,r)})}uploadToSignedUrl(e,n,r,s){return ds(this,void 0,void 0,function*(){const o=this._removeEmptyFolders(e),a=this._getFinalPath(o),l=new URL(this.url+`/object/upload/sign/${a}`);l.searchParams.set("token",n);try{let c;const d=Object.assign({upsert:x2.upsert},s),u=Object.assign(Object.assign({},this.headers),{"x-upsert":String(d.upsert)});typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",d.cacheControl),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.append("cacheControl",d.cacheControl)):(c=r,u["cache-control"]=`max-age=${d.cacheControl}`,u["content-type"]=d.contentType);const f=yield this.fetch(l.toString(),{method:"PUT",body:c,headers:u}),g=yield f.json();return f.ok?{data:{path:o,fullPath:g.Key},error:null}:{data:null,error:g}}catch(c){if(cr(c))return{data:null,error:c};throw c}})}createSignedUploadUrl(e){return ds(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e);const r=yield Xi(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:this.headers}),s=new URL(this.url+r.url),o=s.searchParams.get("token");if(!o)throw new NE("No token returned by API");return{data:{signedUrl:s.toString(),path:e,token:o},error:null}}catch(n){if(cr(n))return{data:null,error:n};throw n}})}update(e,n,r){return ds(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,n,r)})}move(e,n){return ds(this,void 0,void 0,function*(){try{return{data:yield Xi(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:n},{headers:this.headers}),error:null}}catch(r){if(cr(r))return{data:null,error:r};throw r}})}copy(e,n){return ds(this,void 0,void 0,function*(){try{return{data:{path:(yield Xi(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:n},{headers:this.headers})).Key},error:null}}catch(r){if(cr(r))return{data:null,error:r};throw r}})}createSignedUrl(e,n,r){return ds(this,void 0,void 0,function*(){try{let s=this._getFinalPath(e),o=yield Xi(this.fetch,`${this.url}/object/sign/${s}`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return o={signedUrl:encodeURI(`${this.url}${o.signedURL}${a}`)},{data:o,error:null}}catch(s){if(cr(s))return{data:null,error:s};throw s}})}createSignedUrls(e,n,r){return ds(this,void 0,void 0,function*(){try{const s=yield Xi(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:e},{headers:this.headers}),o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:s.map(a=>Object.assign(Object.assign({},a),{signedUrl:a.signedURL?encodeURI(`${this.url}${a.signedURL}${o}`):null})),error:null}}catch(s){if(cr(s))return{data:null,error:s};throw s}})}download(e,n){return ds(this,void 0,void 0,function*(){const s=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",o=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),a=o?`?${o}`:"";try{const l=this._getFinalPath(e);return{data:yield(yield yw(this.fetch,`${this.url}/${s}/${l}${a}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(l){if(cr(l))return{data:null,error:l};throw l}})}getPublicUrl(e,n){const r=this._getFinalPath(e),s=[],o=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";o!==""&&s.push(o);const l=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",c=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});c!==""&&s.push(c);let d=s.join("&");return d!==""&&(d=`?${d}`),{data:{publicUrl:encodeURI(`${this.url}/${l}/public/${r}${d}`)}}}remove(e){return ds(this,void 0,void 0,function*(){try{return{data:yield bL(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(n){if(cr(n))return{data:null,error:n};throw n}})}list(e,n,r){return ds(this,void 0,void 0,function*(){try{const s=Object.assign(Object.assign(Object.assign({},qV),n),{prefix:e||""});return{data:yield Xi(this.fetch,`${this.url}/object/list/${this.bucketId}`,s,{headers:this.headers},r),error:null}}catch(s){if(cr(s))return{data:null,error:s};throw s}})}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const n=[];return e.width&&n.push(`width=${e.width}`),e.height&&n.push(`height=${e.height}`),e.resize&&n.push(`resize=${e.resize}`),e.format&&n.push(`format=${e.format}`),e.quality&&n.push(`quality=${e.quality}`),n.join("&")}}const $V="2.5.5",BV={"X-Client-Info":`storage-js/${$V}`};var _c=globalThis&&globalThis.__awaiter||function(t,e,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function l(u){try{d(r.next(u))}catch(f){a(f)}}function c(u){try{d(r.throw(u))}catch(f){a(f)}}function d(u){u.done?o(u.value):s(u.value).then(l,c)}d((r=r.apply(t,e||[])).next())})};class UV{constructor(e,n={},r){this.url=e,this.headers=Object.assign(Object.assign({},BV),n),this.fetch=yL(r)}listBuckets(){return _c(this,void 0,void 0,function*(){try{return{data:yield yw(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(cr(e))return{data:null,error:e};throw e}})}getBucket(e){return _c(this,void 0,void 0,function*(){try{return{data:yield yw(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(n){if(cr(n))return{data:null,error:n};throw n}})}createBucket(e,n={public:!1}){return _c(this,void 0,void 0,function*(){try{return{data:yield Xi(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(cr(r))return{data:null,error:r};throw r}})}updateBucket(e,n){return _c(this,void 0,void 0,function*(){try{return{data:yield zV(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(cr(r))return{data:null,error:r};throw r}})}emptyBucket(e){return _c(this,void 0,void 0,function*(){try{return{data:yield Xi(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(cr(n))return{data:null,error:n};throw n}})}deleteBucket(e){return _c(this,void 0,void 0,function*(){try{return{data:yield bL(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(n){if(cr(n))return{data:null,error:n};throw n}})}}class YV extends UV{constructor(e,n={},r){super(e,n,r)}from(e){return new jV(this.url,this.headers,e,this.fetch)}}const HV="2.39.0";let hf="";typeof Deno<"u"?hf="deno":typeof document<"u"?hf="web":typeof navigator<"u"&&navigator.product==="ReactNative"?hf="react-native":hf="node";const GV={"X-Client-Info":`supabase-js-${hf}/${HV}`};var WV=globalThis&&globalThis.__awaiter||function(t,e,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function l(u){try{d(r.next(u))}catch(f){a(f)}}function c(u){try{d(r.throw(u))}catch(f){a(f)}}function d(u){u.done?o(u.value):s(u.value).then(l,c)}d((r=r.apply(t,e||[])).next())})};const VV=t=>{let e;return t?e=t:typeof fetch>"u"?e=EE:e=fetch,(...n)=>e(...n)},KV=()=>typeof Headers>"u"?fL:Headers,ZV=(t,e,n)=>{const r=VV(n),s=KV();return(o,a)=>WV(void 0,void 0,void 0,function*(){var l;const c=(l=yield e())!==null&&l!==void 0?l:t;let d=new s(a==null?void 0:a.headers);return d.has("apikey")||d.set("apikey",t),d.has("Authorization")||d.set("Authorization",`Bearer ${c}`),r(o,Object.assign(Object.assign({},a),{headers:d}))})};function JV(t){return t.replace(/\/$/,"")}function XV(t,e){const{db:n,auth:r,realtime:s,global:o}=t,{db:a,auth:l,realtime:c,global:d}=e;return{db:Object.assign(Object.assign({},a),n),auth:Object.assign(Object.assign({},l),r),realtime:Object.assign(Object.assign({},c),s),global:Object.assign(Object.assign({},d),o)}}function QV(t){return Math.round(Date.now()/1e3)+t}function eK(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)})}const lo=()=>typeof document<"u",tl={tested:!1,writable:!1},Tf=()=>{if(!lo())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(tl.tested)return tl.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),tl.tested=!0,tl.writable=!0}catch{tl.tested=!0,tl.writable=!1}return tl.writable};function z0(t){const e={},n=new URL(t);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,o)=>{e[o]=s})}catch{}return n.searchParams.forEach((r,s)=>{e[s]=r}),e}const vL=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...n)=>up(()=>Promise.resolve().then(()=>fp),void 0).then(({default:r})=>r(...n)):e=fetch,(...n)=>e(...n)},tK=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",nl=async(t,e,n)=>{await t.setItem(e,JSON.stringify(n))},Cm=async(t,e)=>{const n=await t.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch{return n}},q0=async(t,e)=>{await t.removeItem(e)};function nK(t){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n="",r,s,o,a,l,c,d,u=0;for(t=t.replace("-","+").replace("_","/");u<t.length;)a=e.indexOf(t.charAt(u++)),l=e.indexOf(t.charAt(u++)),c=e.indexOf(t.charAt(u++)),d=e.indexOf(t.charAt(u++)),r=a<<2|l>>4,s=(l&15)<<4|c>>2,o=(c&3)<<6|d,n=n+String.fromCharCode(r),c!=64&&s!=0&&(n=n+String.fromCharCode(s)),d!=64&&o!=0&&(n=n+String.fromCharCode(o));return n}let _L=class wL{constructor(){this.promise=new wL.promiseConstructor((e,n)=>{this.resolve=e,this.reject=n})}};_L.promiseConstructor=Promise;function C2(t){const e=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,n=t.split(".");if(n.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!e.test(n[1]))throw new Error("JWT is not valid: payload is not in base64url format");const r=n[1];return JSON.parse(nK(r))}async function rK(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function sK(t,e){return new Promise((r,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const a=await t(o);if(!e(o,null,a)){r(a);return}}catch(a){if(!e(o,a)){s(a);return}}})()})}function oK(t){return("0"+t.toString(16)).substr(-2)}function wc(){const e=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let o=0;o<56;o++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(e),Array.from(e,oK).join("")}async function iK(t){const n=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}function aK(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function xc(t){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."),t;const n=await iK(t);return aK(n)}class RE extends Error{constructor(e,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=n}}function bt(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class lK extends RE{constructor(e,n){super(e,n),this.name="AuthApiError",this.status=n}toJSON(){return{name:this.name,message:this.message,status:this.status}}}function cK(t){return bt(t)&&t.name==="AuthApiError"}class xL extends RE{constructor(e,n){super(e),this.name="AuthUnknownError",this.originalError=n}}class sc extends RE{constructor(e,n,r){super(e),this.name=n,this.status=r}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class Cc extends sc{constructor(){super("Auth session missing!","AuthSessionMissingError",400)}}class j0 extends sc{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500)}}class Em extends sc{constructor(e){super(e,"AuthInvalidCredentialsError",400)}}class Sm extends sc{constructor(e,n=null){super(e,"AuthImplicitGrantRedirectError",500),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class E2 extends sc{constructor(e,n=null){super(e,"AuthPKCEGrantCodeExchangeError",500),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class bw extends sc{constructor(e,n){super(e,"AuthRetryableFetchError",n)}}function $0(t){return bt(t)&&t.name==="AuthRetryableFetchError"}class dK extends sc{constructor(e,n,r){super(e,"AuthWeakPasswordError",n),this.reasons=r}}var uK=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n};const Mc=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),fK=[502,503,504];async function S2(t){if(!tK(t))throw new bw(Mc(t),0);if(fK.includes(t.status))throw new bw(Mc(t),t.status);let e;try{e=await t.json()}catch(n){throw new xL(Mc(n),n)}throw typeof e=="object"&&e&&typeof e.weak_password=="object"&&e.weak_password&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)?new dK(Mc(e),t.status,e.weak_password.reasons):new lK(Mc(e),t.status||500)}const hK=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function wt(t,e,n,r){var s;const o=Object.assign({},r==null?void 0:r.headers);r!=null&&r.jwt&&(o.Authorization=`Bearer ${r.jwt}`);const a=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(a.redirect_to=r.redirectTo);const l=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",c=await pK(t,e,n+l,{headers:o,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(c):{data:Object.assign({},c),error:null}}async function pK(t,e,n,r,s,o){const a=hK(e,r,s,o);let l;try{l=await t(n,a)}catch(c){throw console.error(c),new bw(Mc(c),0)}if(l.ok||await S2(l),r!=null&&r.noResolveJson)return l;try{return await l.json()}catch(c){await S2(c)}}function Gi(t){var e;let n=null;bK(t)&&(n=Object.assign({},t),t.expires_at||(n.expires_at=QV(t.expires_in)));const r=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:n,user:r},error:null}}function ta(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function mK(t){return{data:t,error:null}}function gK(t){const{action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:o}=t,a=uK(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:o},c=Object.assign({},a);return{data:{properties:l,user:c},error:null}}function yK(t){return t}function bK(t){return t.access_token&&t.refresh_token&&t.expires_in}var vK=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n};class _K{constructor({url:e="",headers:n={},fetch:r}){this.url=e,this.headers=n,this.fetch=vL(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(e,n="global"){try{return await wt(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(r){if(bt(r))return{data:null,error:r};throw r}}async inviteUserByEmail(e,n={}){try{return await wt(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:ta})}catch(r){if(bt(r))return{data:{user:null},error:r};throw r}}async generateLink(e){try{const{options:n}=e,r=vK(e,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await wt(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:gK,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(bt(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(e){try{return await wt(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:ta})}catch(n){if(bt(n))return{data:{user:null},error:n};throw n}}async listUsers(e){var n,r,s,o,a,l,c;try{const d={nextPage:null,lastPage:0,total:0},u=await wt(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(o=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:yK});if(u.error)throw u.error;const f=await u.json(),g=(a=u.headers.get("x-total-count"))!==null&&a!==void 0?a:0,E=(c=(l=u.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return E.length>0&&(E.forEach(S=>{const w=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),_=JSON.parse(S.split(";")[1].split("=")[1]);d[`${_}Page`]=w}),d.total=parseInt(g)),{data:Object.assign(Object.assign({},f),d),error:null}}catch(d){if(bt(d))return{data:{users:[]},error:d};throw d}}async getUserById(e){try{return await wt(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:ta})}catch(n){if(bt(n))return{data:{user:null},error:n};throw n}}async updateUserById(e,n){try{return await wt(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:n,headers:this.headers,xform:ta})}catch(r){if(bt(r))return{data:{user:null},error:r};throw r}}async deleteUser(e,n=!1){try{return await wt(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:n},xform:ta})}catch(r){if(bt(r))return{data:{user:null},error:r};throw r}}async _listFactors(e){try{const{data:n,error:r}=await wt(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(bt(n))return{data:null,error:n};throw n}}async _deleteFactor(e){try{return{data:await wt(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(n){if(bt(n))return{data:null,error:n};throw n}}}const CL="2.60.1",wK="http://localhost:9999",xK="supabase.auth.token",CK={"X-Client-Info":`gotrue-js/${CL}`},A2=10,EK={getItem:t=>Tf()?globalThis.localStorage.getItem(t):null,setItem:(t,e)=>{Tf()&&globalThis.localStorage.setItem(t,e)},removeItem:t=>{Tf()&&globalThis.localStorage.removeItem(t)}};function N2(t={}){return{getItem:e=>t[e]||null,setItem:(e,n)=>{t[e]=n},removeItem:e=>{delete t[e]}}}function SK(){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)}}globalThis&&Tf()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class AK extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}SK();const NK={url:wK,storageKey:xK,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:CK,flowType:"implicit",debug:!1},qu=30*1e3,R2=3;async function RK(t,e,n){return await n()}class wh{constructor(e){var n;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=wh.nextInstanceID,wh.nextInstanceID+=1,this.instanceID>0&&lo()&&console.warn("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.");const r=Object.assign(Object.assign({},NK),e);if(this.logDebugMessages=!!r.debug,typeof r.debug=="function"&&(this.logger=r.debug),this.persistSession=r.persistSession,this.storageKey=r.storageKey,this.autoRefreshToken=r.autoRefreshToken,this.admin=new _K({url:r.url,headers:r.headers,fetch:r.fetch}),this.url=r.url,this.headers=r.headers,this.fetch=vL(r.fetch),this.lock=r.lock||RK,this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,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)},this.persistSession?r.storage?this.storage=r.storage:Tf()?this.storage=EK:(this.memoryStorage={},this.storage=N2(this.memoryStorage)):(this.memoryStorage={},this.storage=N2(this.memoryStorage)),lo()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(s){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",s)}(n=this.broadcastChannel)===null||n===void 0||n.addEventListener("message",async s=>{this._debug("received broadcast notification from other tab or client",s),await this._notifyAllSubscribers(s.data.event,s.data.session,!1)})}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${CL}) ${new Date().toISOString()}`,...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){try{const e=lo()?await this._isPKCEFlow():!1;if(this._debug("#_initialize()","begin","is PKCE flow",e),e||this.detectSessionInUrl&&this._isImplicitGrantFlow()){const{data:n,error:r}=await this._getSessionFromURL(e);if(r)return this._debug("#_initialize()","error detecting session from URL",r),(r==null?void 0:r.message)==="Identity is already linked"||(r==null?void 0:r.message)==="Identity is already linked to another user"?{error:r}:(await this._removeSession(),{error:r});const{session:s,redirectType:o}=n;return this._debug("#_initialize()","detected session in URL",s,"redirect type",o),await this._saveSession(s),setTimeout(async()=>{o==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",s):await this._notifyAllSubscribers("SIGNED_IN",s)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){return bt(e)?{error:e}:{error:new xL("Unexpected error during initialization",e)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signUp(e){var n,r,s;try{await this._removeSession();let o;if("email"in e){const{email:u,password:f,options:g}=e;let E=null,S=null;if(this.flowType==="pkce"){const w=wc();await nl(this.storage,`${this.storageKey}-code-verifier`,w),E=await xc(w),S=w===E?"plain":"s256"}o=await wt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:g==null?void 0:g.emailRedirectTo,body:{email:u,password:f,data:(n=g==null?void 0:g.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:g==null?void 0:g.captchaToken},code_challenge:E,code_challenge_method:S},xform:Gi})}else if("phone"in e){const{phone:u,password:f,options:g}=e;o=await wt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:f,data:(r=g==null?void 0:g.data)!==null&&r!==void 0?r:{},channel:(s=g==null?void 0:g.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:g==null?void 0:g.captchaToken}},xform:Gi})}else throw new Em("You must provide either an email or phone number and a password");const{data:a,error:l}=o;if(l||!a)return{data:{user:null,session:null},error:l};const c=a.session,d=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),{data:{user:d,session:c},error:null}}catch(o){if(bt(o))return{data:{user:null,session:null},error:o};throw o}}async signInWithPassword(e){try{await this._removeSession();let n;if("email"in e){const{email:o,password:a,options:l}=e;n=await wt(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:a,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:Gi})}else if("phone"in e){const{phone:o,password:a,options:l}=e;n=await wt(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:a,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:Gi})}else throw new Em("You must provide either an email or phone number and a password");const{data:r,error:s}=n;return s?{data:{user:null,session:null},error:s}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new j0}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:{user:r.user,session:r.session},error:s})}catch(n){if(bt(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(e){var n,r,s,o;return await this._removeSession(),await this._handleProviderSignIn(e.provider,{redirectTo:(n=e.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=e.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(o=e.options)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async _exchangeCodeForSession(e){const[n,r]=(await Cm(this.storage,`${this.storageKey}-code-verifier`)).split("/"),{data:s,error:o}=await wt(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:Gi});return await q0(this.storage,`${this.storageKey}-code-verifier`),o?{data:{user:null,session:null,redirectType:null},error:o}:!s||!s.session||!s.user?{data:{user:null,session:null,redirectType:null},error:new j0}:(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),{data:Object.assign(Object.assign({},s),{redirectType:r??null}),error:o})}async signInWithIdToken(e){await this._removeSession();try{const{options:n,provider:r,token:s,access_token:o,nonce:a}=e,l=await wt(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:o,nonce:a,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Gi}),{data:c,error:d}=l;return d?{data:{user:null,session:null},error:d}:!c||!c.session||!c.user?{data:{user:null,session:null},error:new j0}:(c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),{data:c,error:d})}catch(n){if(bt(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(e){var n,r,s,o,a;try{if(await this._removeSession(),"email"in e){const{email:l,options:c}=e;let d=null,u=null;if(this.flowType==="pkce"){const g=wc();await nl(this.storage,`${this.storageKey}-code-verifier`,g),d=await xc(g),u=g===d?"plain":"s256"}const{error:f}=await wt(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(n=c==null?void 0:c.data)!==null&&n!==void 0?n:{},create_user:(r=c==null?void 0:c.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:d,code_challenge_method:u},redirectTo:c==null?void 0:c.emailRedirectTo});return{data:{user:null,session:null},error:f}}if("phone"in e){const{phone:l,options:c}=e,{data:d,error:u}=await wt(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(o=c==null?void 0:c.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(a=c==null?void 0:c.channel)!==null&&a!==void 0?a:"sms"}});return{data:{user:null,session:null,messageId:d==null?void 0:d.message_id},error:u}}throw new Em("You must provide either an email or phone number.")}catch(l){if(bt(l))return{data:{user:null,session:null},error:l};throw l}}async verifyOtp(e){var n,r;try{e.type!=="email_change"&&e.type!=="phone_change"&&await this._removeSession();let s,o;"options"in e&&(s=(n=e.options)===null||n===void 0?void 0:n.redirectTo,o=(r=e.options)===null||r===void 0?void 0:r.captchaToken);const{data:a,error:l}=await wt(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:Gi});if(l)throw l;if(!a)throw new Error("An error occurred on token verification.");const c=a.session,d=a.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers("SIGNED_IN",c)),{data:{user:d,session:c},error:null}}catch(s){if(bt(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithSSO(e){var n,r,s;try{await this._removeSession();let o=null,a=null;if(this.flowType==="pkce"){const l=wc();await nl(this.storage,`${this.storageKey}-code-verifier`,l),o=await xc(l),a=l===o?"plain":"s256"}return await wt(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(r=(n=e.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=e==null?void 0:e.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:o,code_challenge_method:a}),headers:this.headers,xform:mK})}catch(o){if(bt(o))return{data:null,error:o};throw o}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)throw r;if(!n)throw new Cc;const{error:s}=await wt(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:s}})}catch(e){if(bt(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{e.type!="email_change"&&e.type!="phone_change"&&await this._removeSession();const n=`${this.url}/resend`;if("email"in e){const{email:r,type:s,options:o}=e,{error:a}=await wt(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return{data:{user:null,session:null},error:a}}else if("phone"in e){const{phone:r,type:s,options:o}=e,{data:a,error:l}=await wt(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return{data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:l}}throw new Em("You must provide either an email or phone number and a type")}catch(n){if(bt(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,this._acquireLock(-1,async()=>this._useSession(async e=>e))}async _acquireLock(e,n){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await e(n)}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 e=null;const n=await Cm(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?e=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const r=e.expires_at?e.expires_at<=Date.now()/1e3:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r)return{data:{session:e},error:null};const{session:s,error:o}=await this._callRefreshToken(e.refresh_token);return o?{data:{session:null},error:o}:{data:{session:s},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(e){try{return e?await wt(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:ta}):await this._useSession(async n=>{var r,s;const{data:o,error:a}=n;if(a)throw a;return await wt(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(r=o.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0,xform:ta})})}catch(n){if(bt(n))return{data:{user:null},error:n};throw n}}async updateUser(e,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,n))}async _updateUser(e,n={}){try{return await this._useSession(async r=>{const{data:s,error:o}=r;if(o)throw o;if(!s.session)throw new Cc;const a=s.session;let l=null,c=null;if(this.flowType==="pkce"&&e.email!=null){const f=wc();await nl(this.storage,`${this.storageKey}-code-verifier`,f),l=await xc(f),c=f===l?"plain":"s256"}const{data:d,error:u}=await wt(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:l,code_challenge_method:c}),jwt:a.access_token,xform:ta});if(u)throw u;return a.user=d.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),{data:{user:a.user},error:null}})}catch(r){if(bt(r))return{data:{user:null},error:r};throw r}}_decodeJWT(e){return C2(e)}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Cc;const n=Date.now()/1e3;let r=n,s=!0,o=null;const a=C2(e.access_token);if(a.exp&&(r=a.exp,s=r<=n),s){const{session:l,error:c}=await this._callRefreshToken(e.refresh_token);if(c)return{data:{user:null,session:null},error:c};if(!l)return{data:{user:null,session:null},error:null};o=l}else{const{data:l,error:c}=await this._getUser(e.access_token);if(c)throw c;o={access_token:e.access_token,refresh_token:e.refresh_token,user:l.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return{data:{user:o.user,session:o},error:null}}catch(n){if(bt(n))return{data:{session:null,user:null},error:n};throw n}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async n=>{var r;if(!e){const{data:a,error:l}=n;if(l)throw l;e=(r=a.session)!==null&&r!==void 0?r:void 0}if(!(e!=null&&e.refresh_token))throw new Cc;const{session:s,error:o}=await this._callRefreshToken(e.refresh_token);return o?{data:{user:null,session:null},error:o}:s?{data:{user:s.user,session:s},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(bt(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(e){try{if(!lo())throw new Sm("No browser detected.");if(this.flowType==="implicit"&&!this._isImplicitGrantFlow())throw new Sm("Not a valid implicit grant flow url.");if(this.flowType=="pkce"&&!e)throw new E2("Not a valid PKCE flow url.");const n=z0(window.location.href);if(e){if(!n.code)throw new E2("No code detected.");const{data:m,error:A}=await this._exchangeCodeForSession(n.code);if(A)throw A;const k=new URL(window.location.href);return k.searchParams.delete("code"),window.history.replaceState(window.history.state,"",k.toString()),{data:{session:m.session,redirectType:null},error:null}}if(n.error||n.error_description||n.error_code)throw new Sm(n.error_description||"Error in URL with unspecified error_description",{error:n.error||"unspecified_error",code:n.error_code||"unspecified_code"});const{provider_token:r,provider_refresh_token:s,access_token:o,refresh_token:a,expires_in:l,expires_at:c,token_type:d}=n;if(!o||!l||!a||!d)throw new Sm("No session defined in URL");const u=Math.round(Date.now()/1e3),f=parseInt(l);let g=u+f;c&&(g=parseInt(c));const E=g-u;E*1e3<=qu&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${E}s, should have been closer to ${f}s`);const S=g-f;u-S>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",S,g,u):u-S<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clok for skew",S,g,u);const{data:w,error:_}=await this._getUser(o);if(_)throw _;const h={provider_token:r,provider_refresh_token:s,access_token:o,expires_in:f,expires_at:g,refresh_token:a,token_type:d,user:w.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:h,redirectType:n.type},error:null}}catch(n){if(bt(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantFlow(){const e=z0(window.location.href);return!!(lo()&&(e.access_token||e.error_description))}async _isPKCEFlow(){const e=z0(window.location.href),n=await Cm(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&n)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:o}=n;if(o)return{error:o};const a=(r=s.session)===null||r===void 0?void 0:r.access_token;if(a){const{error:l}=await this.admin.signOut(a,e);if(l&&!(cK(l)&&(l.status===404||l.status===401)))return{error:l}}return e!=="others"&&(await this._removeSession(),await q0(this.storage,`${this.storageKey}-code-verifier`),await this._notifyAllSubscribers("SIGNED_OUT",null)),{error:null}})}onAuthStateChange(e){const n=eK(),r={id:n,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(e){return await this._useSession(async n=>{var r,s;try{const{data:{session:o},error:a}=n;if(a)throw a;await((r=this.stateChangeEmitters.get(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",e,"session",o)}catch(o){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",o),console.error(o)}})}async resetPasswordForEmail(e,n={}){let r=null,s=null;if(this.flowType==="pkce"){const o=wc();await nl(this.storage,`${this.storageKey}-code-verifier`,`${o}/PASSWORD_RECOVERY`),r=await xc(o),s=o===r?"plain":"s256"}try{return await wt(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(o){if(bt(o))return{data:null,error:o};throw o}}async getUserIdentities(){var e;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(e=n.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(n){if(bt(n))return{data:null,error:n};throw n}}async linkIdentity(e){var n;try{const{data:r,error:s}=await this._useSession(async o=>{var a,l,c,d,u;const{data:f,error:g}=o;if(g)throw g;const E=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(a=e.options)===null||a===void 0?void 0:a.redirectTo,scopes:(l=e.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=e.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await wt(this.fetch,"GET",E,{headers:this.headers,jwt:(u=(d=f.session)===null||d===void 0?void 0:d.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return lo()&&!(!((n=e.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:e.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(bt(r))return{data:{provider:e.provider,url:null},error:r};throw r}}async unlinkIdentity(e){try{return await this._useSession(async n=>{var r,s;const{data:o,error:a}=n;if(a)throw a;return await wt(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(s=(r=o.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(bt(n))return{data:null,error:n};throw n}}async _refreshAccessToken(e){const n=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await sK(async s=>(await rK(s*200),this._debug(n,"refreshing attempt",s),await wt(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Gi})),(s,o,a)=>a&&a.error&&$0(a.error)&&Date.now()+(s+1)*200-r<qu)}catch(r){if(this._debug(n,"error",r),bt(r))return{data:{session:null,user:null},error:r};throw r}finally{this._debug(n,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",n,"url",r),lo()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:e,url:r},error:null}}async _recoverAndRefresh(){var e;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const r=await Cm(this.storage,this.storageKey);if(this._debug(n,"session from storage",r),!this._isValidSession(r)){this._debug(n,"session is not valid"),r!==null&&await this._removeSession();return}const s=Math.round(Date.now()/1e3),o=((e=r.expires_at)!==null&&e!==void 0?e:1/0)<s+A2;if(this._debug(n,`session has${o?"":" not"} expired with margin of ${A2}s`),o){if(this.autoRefreshToken&&r.refresh_token){const{error:a}=await this._callRefreshToken(r.refresh_token);a&&(console.error(a),$0(a)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",a),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",r)}catch(r){this._debug(n,"error",r),console.error(r);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var n,r;if(!e)throw new Cc;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new _L;const{data:o,error:a}=await this._refreshAccessToken(e);if(a)throw a;if(!o.session)throw new Cc;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const l={session:o.session,error:null};return this.refreshingDeferred.resolve(l),l}catch(o){if(this._debug(s,"error",o),bt(o)){const a={session:null,error:o};return $0(o)||(await this._removeSession(),await this._notifyAllSubscribers("SIGNED_OUT",null)),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(a),a}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(o),o}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(e,n,r=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:e,session:n});const o=[],a=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(e,n)}catch(c){o.push(c)}});if(await Promise.all(a),o.length>0){for(let l=0;l<o.length;l+=1)console.error(o[l]);throw o[0]}}finally{this._debug(s,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),await nl(this.storage,this.storageKey,e)}async _removeSession(){this._debug("#_removeSession()"),await q0(this.storage,this.storageKey)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&lo()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),qu);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}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 e=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-e)/qu);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${qu}ms, refresh threshold is ${R2} ticks`),s<=R2&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof AK)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!lo()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const n=`#_onVisibilityChanged(${e})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"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(e,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const o=wc();await nl(this.storage,`${this.storageKey}-code-verifier`,o);const a=await xc(o),l=o===a?"plain":"s256";this._debug("PKCE","code verifier",`${o.substring(0,5)}...`,"code challenge",a,"method",l);const c=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(l)}`});s.push(c.toString())}if(r!=null&&r.queryParams){const o=new URLSearchParams(r.queryParams);s.push(o.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;return o?{data:null,error:o}:await wt(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(bt(n))return{data:null,error:n};throw n}}async _enroll(e){try{return await this._useSession(async n=>{var r,s;const{data:o,error:a}=n;if(a)return{data:null,error:a};const{data:l,error:c}=await wt(this.fetch,"POST",`${this.url}/factors`,{body:{friendly_name:e.friendlyName,factor_type:e.factorType,issuer:e.issuer},headers:this.headers,jwt:(r=o==null?void 0:o.session)===null||r===void 0?void 0:r.access_token});return c?{data:null,error:c}:(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),{data:l,error:null})})}catch(n){if(bt(n))return{data:null,error:n};throw n}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;if(o)return{data:null,error:o};const{data:a,error:l}=await wt(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return l?{data:null,error:l}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),{data:a,error:l})})}catch(n){if(bt(n))return{data:null,error:n};throw n}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;return o?{data:null,error:o}:await wt(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(bt(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(e){const{data:n,error:r}=await this._challenge({factorId:e.factorId});return r?{data:null,error:r}:await this._verify({factorId:e.factorId,challengeId:n.id,code:e.code})}async _listFactors(){const{data:{user:e},error:n}=await this.getUser();if(n)return{data:null,error:n};const r=(e==null?void 0:e.factors)||[],s=r.filter(o=>o.factor_type==="totp"&&o.status==="verified");return{data:{all:r,totp:s},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async e=>{var n,r;const{data:{session:s},error:o}=e;if(o)return{data:null,error:o};if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const a=this._decodeJWT(s.access_token);let l=null;a.aal&&(l=a.aal);let c=l;((r=(n=s.user.factors)===null||n===void 0?void 0:n.filter(f=>f.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(c="aal2");const u=a.amr||[];return{data:{currentLevel:l,nextLevel:c,currentAuthenticationMethods:u},error:null}}))}}wh.nextInstanceID=0;class PK extends wh{constructor(e){super(e)}}var OK=globalThis&&globalThis.__awaiter||function(t,e,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function l(u){try{d(r.next(u))}catch(f){a(f)}}function c(u){try{d(r.throw(u))}catch(f){a(f)}}function d(u){u.done?o(u.value):s(u.value).then(l,c)}d((r=r.apply(t,e||[])).next())})};const FK={headers:GV},DK={schema:"public"},kK={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},TK={};class IK{constructor(e,n,r){var s,o,a,l,c,d,u,f;if(this.supabaseUrl=e,this.supabaseKey=n,!e)throw new Error("supabaseUrl is required.");if(!n)throw new Error("supabaseKey is required.");const g=JV(e);this.realtimeUrl=`${g}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${g}/auth/v1`,this.storageUrl=`${g}/storage/v1`,this.functionsUrl=`${g}/functions/v1`;const E=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,S={db:DK,realtime:TK,auth:Object.assign(Object.assign({},kK),{storageKey:E}),global:FK},w=XV(r??{},S);this.storageKey=(o=(s=w.auth)===null||s===void 0?void 0:s.storageKey)!==null&&o!==void 0?o:"",this.headers=(l=(a=w.global)===null||a===void 0?void 0:a.headers)!==null&&l!==void 0?l:{},this.auth=this._initSupabaseAuthClient((c=w.auth)!==null&&c!==void 0?c:{},this.headers,(d=w.global)===null||d===void 0?void 0:d.fetch),this.fetch=ZV(n,this._getAccessToken.bind(this),(u=w.global)===null||u===void 0?void 0:u.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},w.realtime)),this.rest=new SE(`${g}/rest/v1`,{headers:this.headers,schema:(f=w.db)===null||f===void 0?void 0:f.schema,fetch:this.fetch}),this._listenForAuthEvents()}get functions(){return new cV(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new YV(this.storageUrl,this.headers,this.fetch)}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,n={},r){return this.rest.rpc(e,n,r)}channel(e,n={config:{}}){return this.realtime.channel(e,n)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,n;return OK(this,void 0,void 0,function*(){const{data:r}=yield this.auth.getSession();return(n=(e=r.session)===null||e===void 0?void 0:e.access_token)!==null&&n!==void 0?n:null})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:n,detectSessionInUrl:r,storage:s,storageKey:o,flowType:a,debug:l},c,d){const u={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new PK({url:this.authUrl,headers:Object.assign(Object.assign({},u),c),storageKey:o,autoRefreshToken:e,persistSession:n,detectSessionInUrl:r,storage:s,flowType:a,debug:l,fetch:d})}_initRealtimeClient(e){return new DV(this.realtimeUrl,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(e,n,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.realtime.setAuth(r??null),this.changedAccessToken=r):e==="SIGNED_OUT"&&(this.realtime.setAuth(this.supabaseKey),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const MK=(t,e,n)=>new IK(t,e,n),LK="https://arikqvkvamkwzncojzrr.supabase.co",zK="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFyaWtxdmt2YW1rd3puY29qenJyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Mjg1MzE4NTIsImV4cCI6MjA0NDEwNzg1Mn0.N51Fk5my1gPmPfSuL92yQhWEQZCdrjwTCj_dTCn6xdo",z=MK(LK,zK),qK="/assets/marplastGif-0071494a.gif",P2=[{img:QW,href:"https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_plan_id=2c9380848e681dc9018e6b4b0ff80123"},{img:XW,href:"https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_plan_id=2c9380848e681d84018e773f963407dd"},{img:tV,href:"https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_plan_id=2c93808491eb5f1c019202d616420742"},{img:eV,href:"https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_plan_id=2c9380848e681dc9018e77401cba0826"},{img:JW,href:"https://www.segundopalo.com.ar/sumatesp?utm_source=segundopalosumate&utm_medium=bannercelular&utm_campaign=sumate&utm_id=2&utm_term=sumatecolaboracion&utm_content=sumatebanner300x250"}],et=()=>{const[t,e]=C.useState(!1),[n,r]=C.useState(0),[s,o]=C.useState(0),[a,l]=C.useState(0),[c,d]=C.useState(0),[u,f]=C.useState(0),[g,E]=C.useState(0),S=C.useRef(null);return C.useEffect(()=>{(async()=>{const{data:h,error:m}=await z.from("ProgresoDonaciones").select("objective, currentsubscribers, totalsubscribers, objectivesubscribers").single();m?console.error("Error fetching data from Supabase:",m):h&&(o(h.objective),l(h.currentsubscribers),d(h.currentsubscribers/h.objective*100),f(h.totalsubscribers),E(h.objectivesubscribers))})()},[]),C.useEffect(()=>{const _=localStorage.getItem("bannerIndex");_!==null&&r(parseInt(_,10))},[]),C.useEffect(()=>{const _=(n+1)%P2.length;localStorage.setItem("bannerIndex",_)},[n]),C.useEffect(()=>{const _=document.createElement("script");_.async=!0,_.src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8123756563083360",_.crossOrigin="anonymous",document.head.appendChild(_),_.onload=()=>{(window.adsbygoogle=window.adsbygoogle||[]).push({})};const h=setTimeout(()=>{const m=document.querySelector(".adsbygoogle");(!m||m.innerHTML.trim()==="")&&e(!0)},3e3);return()=>{document.head.removeChild(_),clearTimeout(h)}},[]),C.useEffect(()=>{const _=localStorage.getItem("bannerIndex");_!==null&&(S.current.scrollLeft=parseInt(_,10))},[]),p(ee,{children:[i("a",{className:"mb-2",href:"https://www.segundopalo.com.ar/sumatesp?utm_source=segundopalosumate&utm_medium=bannercelular&utm_campaign=sumate&utm_id=2&utm_term=sumatecolaboracion&utm_content=sumatebanner300x250",rel:"noopener noreferrer",style:{display:"block",width:"100%"},children:i("img",{className:"banner desktop",src:ZW,alt:"Anuncio alternativo",style:{width:"100%",height:"auto"}})}),i("div",{ref:S,onScroll:()=>{localStorage.setItem("bannerIndex",S.current.scrollLeft)},className:"slider-container",children:P2.map((_,h)=>i("a",{className:"mb-2",href:_.href,rel:"noopener noreferrer",style:{display:"inline-block",margin:"0 10px",width:"100%"},children:i("img",{className:"banner mobile",src:_.img,alt:`Anuncio alternativo ${h}`,style:{width:"100%",height:"auto"}})},h))}),i(V,{children:p($,{className:"col-12 col-md-12",children:[i(iL,{now:c,style:{height:"5px",width:"100%",borderRadius:"0",backgroundColor:"#e9ecef"},children:i("div",{style:{width:`${c}%`,backgroundColor:"#32c0c1",height:"100%",borderRadius:"0"}})}),i("p",{className:"text-start text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"13px"},children:`${Math.round(c)}% del objetivo logrado gracias a las colaboraciones.`})]})}),i(V,{style:{justifyContent:"center"},children:i($,{className:"col-12 col-md-12 mb-2 mt-1 d-flex justify-content-center",children:i("a",{className:"mb-2",href:"https://www.marplast.com.ar/",rel:"noopener noreferrer",style:{display:"block",width:"100%"},children:i("img",{className:"",src:qK,alt:"Anuncio alternativo",style:{width:"100%",height:"auto"}})})})}),i("style",{jsx:!0,children:` .banner.desktop { display: none; } .banner.mobile { display: block; } @media (min-width: 768px) { .banner.desktop { display: block; } .banner.mobile { display: none; } } .slider-container { position: relative; width: 100%; max-width: 329px; text-align: center; white-space: nowrap; scroll-behavior: smooth; /* Para un desplazamiento suave */ } @media (max-width: 768px) { .slider-container { overflow-x: scroll; /* Habilitar desplazamiento horizontal en móviles */ } } @media (min-width: 769px) { .slider-container { overflow-x: hidden; /* Deshabilitar desplazamiento horizontal en PC */ } } `})]})};function jK(t){return Pt({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 0c-2.761 0-5 2.239-5 5 0 5 5 11 5 11s5-6 5-11c0-2.761-2.239-5-5-5zM8 8c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3z"},child:[]}]})(t)}function qd(t){return Pt({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M0 13h16v2h-16zM2 9h2v3h-2zM5 5h2v7h-2zM8 8h2v4h-2zM11 2h2v10h-2z"},child:[]}]})(t)}function zb(t){return Pt({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.5 8l-7.5-7.5v4.5h-8v6h8v4.5z"},child:[]}]})(t)}function qb(t){return Pt({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M0.5 8l7.5 7.5v-4.5h8v-6h-8v-4.5z"},child:[]}]})(t)}function Tt(t){return Pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M255.03 33.813c-1.834-.007-3.664-.007-5.5.03-6.73.14-13.462.605-20.155 1.344.333.166.544.32.47.438L204.78 75.063l73.907 49.437-.125.188 70.625.28L371 79.282 342.844 52c-15.866-6.796-32.493-11.776-49.47-14.78-12.65-2.24-25.497-3.36-38.343-3.407zM190.907 88.25l-73.656 36.78-13.813 98.407 51.344 33.657 94.345-43.438 14.875-76.5-73.094-48.906zm196.344.344l-21.25 44.5 36.75 72.72 62.063 38.905 11.312-21.282c.225.143.45.403.656.75-.77-4.954-1.71-9.893-2.81-14.782-6.446-28.59-18.59-55.962-35.5-79.97-9.07-12.872-19.526-24.778-31.095-35.5l-20.125-5.342zm-302.656 23c-6.906 8.045-13.257 16.56-18.938 25.5-15.676 24.664-26.44 52.494-31.437 81.312C31.783 232.446 30.714 246.73 31 261l20.25 5.094 33.03-40.5L98.75 122.53l-14.156-10.936zm312.719 112.844l-55.813 44.75-3.47 101.093 39.626 21.126 77.188-49.594 4.406-78.75-.094.157-61.844-38.783zm-140.844 6.406l-94.033 43.312-1.218 76.625 89.155 57.376 68.938-36.437 3.437-101.75-66.28-39.126zm-224.22 49.75c.91 8.436 2.29 16.816 4.156 25.094 6.445 28.59 18.62 55.96 35.532 79.968 3.873 5.5 8.02 10.805 12.374 15.938l-9.374-48.156.124-.032-27.03-68.844-15.782-3.968zm117.188 84.844l-51.532 8.156 10.125 52.094c8.577 7.49 17.707 14.332 27.314 20.437 14.612 9.287 30.332 16.88 46.687 22.594l62.626-13.69-4.344-31.124-90.875-58.47zm302.437.5l-64.22 41.25-42 47.375 4.408 6.156c12.027-5.545 23.57-12.144 34.406-19.72 23.97-16.76 44.604-38.304 60.28-62.97 2.51-3.947 4.87-7.99 7.125-12.092zm-122.78 97.656l-79.94 9.625-25.968 5.655c26.993 4 54.717 3.044 81.313-2.813 9.412-2.072 18.684-4.79 27.75-8.062l-3.156-4.406z"},child:[]}]})(t)}function O2(t){return Pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M290.2 49.04c-15.7.1-32.3 13.83-38 35.81-6.5 25.15 4.7 47.85 22.1 52.35 17.4 4.5 38.2-9.9 44.7-35 6.5-25.16-4.6-47.82-22.1-52.33-2.2-.56-4.4-.84-6.7-.83zM89.04 68.3L77.5 87.31c32.4 15.99 63.1 33.49 96.4 46.49 9.5-3.8 18.8-7.8 28-12-40.2-15.4-76.7-33.69-112.86-53.5zm148.06 56.1c-47.8 25.4-97.9 41.6-153.64 61.1l8.08 16.4c51.96-16.1 111.26-32.9 161.16-56-6.9-5.5-12.1-12.9-15.6-21.5zm30.3 34.8c-22.5 10.8-46.8 20.2-71.4 28.7-20.3 45.6-27.7 94.9-36.8 140.1l-2.1 10.5-101.02-39.4-16.03 25.4 130.25 60.7c1-1.4 1.7-2.5 2.9-4.5 3.9-6.7 9.2-16.6 15.2-28.6 11.9-23.8 26.7-55.9 40.4-88.1 13.8-32.1 26.4-64.4 33.9-88.4 1.9-6.1 3.5-11.6 4.7-16.4zm-31.9 134.6c-5.5 12.5-11.1 24.8-16.5 36.3 25 37.4 57 79 94.9 109.2l23.3-17.6c-35.8-39.7-72.9-84.3-101.7-127.9zM423.9 367a48 48 0 0 0-48 48 48 48 0 0 0 48 48 48 48 0 0 0 48-48 48 48 0 0 0-48-48z"},child:[]}]})(t)}function $K(t){return Pt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11.115 16.479a.93.927 0 0 1-.939-.886c-.002-.042-.006-.155-.103-.155-.04 0-.074.023-.113.059-.112.103-.254.206-.46.206a.816.814 0 0 1-.305-.066c-.535-.214-.542-.578-.521-.725.006-.038.007-.08-.02-.11l-.032-.03h-.034c-.027 0-.055.012-.093.039a.788.786 0 0 1-.454.16.7.699 0 0 1-.253-.05c-.708-.27-.65-.928-.617-1.126.005-.041-.005-.072-.03-.092l-.05-.04-.047.043a.728.726 0 0 1-.505.203.73.728 0 0 1-.732-.725c0-.4.328-.722.732-.722.364 0 .675.27.721.63l.026.195.11-.165c.01-.018.307-.46.852-.46.102 0 .21.016.316.05.434.13.508.52.519.68.008.094.075.1.09.1.037 0 .064-.024.083-.045a.746.744 0 0 1 .54-.225c.128 0 .263.03.402.09.69.293.379 1.158.374 1.167-.058.144-.061.207-.005.244l.027.013h.02c.03 0 .07-.014.134-.035.093-.032.235-.08.367-.08a.944.942 0 0 1 .94.93.936.934 0 0 1-.94.928zm7.302-4.171c-1.138-.98-3.768-3.24-4.481-3.77-.406-.302-.685-.462-.928-.533a1.559 1.554 0 0 0-.456-.07c-.182 0-.376.032-.58.095-.46.145-.918.505-1.362.854l-.023.018c-.414.324-.84.66-1.164.73a1.986 1.98 0 0 1-.43.049c-.362 0-.687-.104-.81-.258-.02-.025-.007-.066.04-.125l.008-.008 1-1.067c.783-.774 1.525-1.506 3.23-1.545h.085c1.062 0 2.12.469 2.24.524a7.03 7.03 0 0 0 3.056.724c1.076 0 2.188-.263 3.354-.795a9.135 9.11 0 0 0-.405-.317c-1.025.44-2.003.66-2.946.66-.962 0-1.925-.229-2.858-.68-.05-.022-1.22-.567-2.44-.57-.032 0-.065 0-.096.002-1.434.033-2.24.536-2.782.976-.528.013-.982.138-1.388.25-.361.1-.673.186-.979.185-.125 0-.35-.01-.37-.012-.35-.01-2.115-.437-3.518-.962-.143.1-.28.203-.415.31 1.466.593 3.25 1.053 3.812 1.089.157.01.323.027.491.027.372 0 .744-.103 1.104-.203.213-.059.446-.123.692-.17l-.196.194-1.017 1.087c-.08.08-.254.294-.14.557a.705.703 0 0 0 .268.292c.243.162.677.27 1.08.271.152 0 .297-.015.43-.044.427-.095.874-.448 1.349-.82.377-.296.913-.672 1.323-.782a1.494 1.49 0 0 1 .37-.05.611.61 0 0 1 .095.005c.27.034.533.125 1.003.472.835.62 4.531 3.815 4.566 3.846.002.002.238.203.22.537-.007.186-.11.352-.294.466a.902.9 0 0 1-.484.15.804.802 0 0 1-.428-.124c-.014-.01-1.28-1.157-1.746-1.543-.074-.06-.146-.115-.22-.115a.122.122 0 0 0-.096.045c-.073.09.01.212.105.294l1.48 1.47c.002 0 .184.17.204.395.012.244-.106.447-.35.606a.957.955 0 0 1-.526.171.766.764 0 0 1-.42-.127l-.214-.206a21.035 20.978 0 0 0-1.08-1.009c-.072-.058-.148-.112-.221-.112a.127.127 0 0 0-.094.038c-.033.037-.056.103.028.212a.698.696 0 0 0 .075.083l1.078 1.198c.01.01.222.26.024.511l-.038.048a1.18 1.178 0 0 1-.1.096c-.184.15-.43.164-.527.164a.8.798 0 0 1-.147-.012c-.106-.018-.178-.048-.212-.089l-.013-.013c-.06-.06-.602-.609-1.054-.98-.059-.05-.133-.11-.21-.11a.128.128 0 0 0-.096.042c-.09.096.044.24.1.293l.92 1.003a.204.204 0 0 1-.033.062c-.033.044-.144.155-.479.196a.91.907 0 0 1-.122.007c-.345 0-.712-.164-.902-.264a1.343 1.34 0 0 0 .13-.576 1.368 1.365 0 0 0-1.42-1.357c.024-.342-.025-.99-.697-1.274a1.455 1.452 0 0 0-.575-.125c-.146 0-.287.025-.42.075a1.153 1.15 0 0 0-.671-.564 1.52 1.515 0 0 0-.494-.085c-.28 0-.537.08-.767.242a1.168 1.165 0 0 0-.903-.43 1.173 1.17 0 0 0-.82.335c-.287-.217-1.425-.93-4.467-1.613a17.39 17.344 0 0 1-.692-.189 4.822 4.82 0 0 0-.077.494l.67.157c3.108.682 4.136 1.391 4.309 1.525a1.145 1.142 0 0 0-.09.442 1.16 1.158 0 0 0 1.378 1.132c.096.467.406.821.879 1.003a1.165 1.162 0 0 0 .415.08c.09 0 .179-.012.266-.034.086.22.282.493.722.668a1.233 1.23 0 0 0 .457.094c.122 0 .241-.022.355-.063a1.373 1.37 0 0 0 1.269.841c.37.002.726-.147.985-.41.221.121.688.341 1.163.341.06 0 .118-.002.175-.01.47-.059.689-.24.789-.382a.571.57 0 0 0 .048-.078c.11.032.234.058.373.058.255 0 .501-.086.75-.265.244-.174.418-.424.444-.637v-.01c.083.017.167.026.251.026.265 0 .527-.082.773-.242.48-.31.562-.715.554-.98a1.28 1.279 0 0 0 .978-.194 1.04 1.04 0 0 0 .502-.808 1.088 1.085 0 0 0-.16-.653c.804-.342 2.636-1.003 4.795-1.483a4.734 4.721 0 0 0-.067-.492 27.742 27.667 0 0 0-5.049 1.62zm5.123-.763c0 4.027-5.166 7.293-11.537 7.293-6.372 0-11.538-3.266-11.538-7.293 0-4.028 5.165-7.293 11.539-7.293 6.371 0 11.537 3.265 11.537 7.293zm.46.004c0-4.272-5.374-7.755-12-7.755S.002 7.277.002 11.55L0 12.004c0 4.533 4.695 8.203 11.999 8.203 7.347 0 12-3.67 12-8.204z"},child:[]}]})(t)}function EL(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var SL={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(vf,function(){var n;function r(){return n.apply(null,arguments)}function s(x){n=x}function o(x){return x instanceof Array||Object.prototype.toString.call(x)==="[object Array]"}function a(x){return x!=null&&Object.prototype.toString.call(x)==="[object Object]"}function l(x,D){return Object.prototype.hasOwnProperty.call(x,D)}function c(x){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(x).length===0;var D;for(D in x)if(l(x,D))return!1;return!0}function d(x){return x===void 0}function u(x){return typeof x=="number"||Object.prototype.toString.call(x)==="[object Number]"}function f(x){return x instanceof Date||Object.prototype.toString.call(x)==="[object Date]"}function g(x,D){var M=[],B,Z=x.length;for(B=0;B<Z;++B)M.push(D(x[B],B));return M}function E(x,D){for(var M in D)l(D,M)&&(x[M]=D[M]);return l(D,"toString")&&(x.toString=D.toString),l(D,"valueOf")&&(x.valueOf=D.valueOf),x}function S(x,D,M,B){return QA(x,D,M,B,!0).utc()}function w(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function _(x){return x._pf==null&&(x._pf=w()),x._pf}var h;Array.prototype.some?h=Array.prototype.some:h=function(x){var D=Object(this),M=D.length>>>0,B;for(B=0;B<M;B++)if(B in D&&x.call(this,D[B],B,D))return!0;return!1};function m(x){if(x._isValid==null){var D=_(x),M=h.call(D.parsedDateParts,function(Z){return Z!=null}),B=!isNaN(x._d.getTime())&&D.overflow<0&&!D.empty&&!D.invalidEra&&!D.invalidMonth&&!D.invalidWeekday&&!D.weekdayMismatch&&!D.nullInput&&!D.invalidFormat&&!D.userInvalidated&&(!D.meridiem||D.meridiem&&M);if(x._strict&&(B=B&&D.charsLeftOver===0&&D.unusedTokens.length===0&&D.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(x))x._isValid=B;else return B}return x._isValid}function A(x){var D=S(NaN);return x!=null?E(_(D),x):_(D).userInvalidated=!0,D}var k=r.momentProperties=[],R=!1;function O(x,D){var M,B,Z,ne=k.length;if(d(D._isAMomentObject)||(x._isAMomentObject=D._isAMomentObject),d(D._i)||(x._i=D._i),d(D._f)||(x._f=D._f),d(D._l)||(x._l=D._l),d(D._strict)||(x._strict=D._strict),d(D._tzm)||(x._tzm=D._tzm),d(D._isUTC)||(x._isUTC=D._isUTC),d(D._offset)||(x._offset=D._offset),d(D._pf)||(x._pf=_(D)),d(D._locale)||(x._locale=D._locale),ne>0)for(M=0;M<ne;M++)B=k[M],Z=D[B],d(Z)||(x[B]=Z);return x}function N(x){O(this,x),this._d=new Date(x._d!=null?x._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),R===!1&&(R=!0,r.updateOffset(this),R=!1)}function y(x){return x instanceof N||x!=null&&x._isAMomentObject!=null}function v(x){r.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+x)}function b(x,D){var M=!0;return E(function(){if(r.deprecationHandler!=null&&r.deprecationHandler(null,x),M){var B=[],Z,ne,ce,je=arguments.length;for(ne=0;ne<je;ne++){if(Z="",typeof arguments[ne]=="object"){Z+=` [`+ne+"] ";for(ce in arguments[0])l(arguments[0],ce)&&(Z+=ce+": "+arguments[0][ce]+", ");Z=Z.slice(0,-2)}else Z=arguments[ne];B.push(Z)}v(x+` Arguments: `+Array.prototype.slice.call(B).join("")+` `+new Error().stack),M=!1}return D.apply(this,arguments)},D)}var P={};function F(x,D){r.deprecationHandler!=null&&r.deprecationHandler(x,D),P[x]||(v(D),P[x]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function I(x){return typeof Function<"u"&&x instanceof Function||Object.prototype.toString.call(x)==="[object Function]"}function T(x){var D,M;for(M in x)l(x,M)&&(D=x[M],I(D)?this[M]=D:this["_"+M]=D);this._config=x,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function q(x,D){var M=E({},x),B;for(B in D)l(D,B)&&(a(x[B])&&a(D[B])?(M[B]={},E(M[B],x[B]),E(M[B],D[B])):D[B]!=null?M[B]=D[B]:delete M[B]);for(B in x)l(x,B)&&!l(D,B)&&a(x[B])&&(M[B]=E({},M[B]));return M}function W(x){x!=null&&this.set(x)}var G;Object.keys?G=Object.keys:G=function(x){var D,M=[];for(D in x)l(x,D)&&M.push(D);return M};var H={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function j(x,D,M){var B=this._calendar[x]||this._calendar.sameElse;return I(B)?B.call(D,M):B}function U(x,D,M){var B=""+Math.abs(x),Z=D-B.length,ne=x>=0;return(ne?M?"+":"":"-")+Math.pow(10,Math.max(0,Z)).toString().substr(1)+B}var L=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,K=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Y={},te={};function J(x,D,M,B){var Z=B;typeof B=="string"&&(Z=function(){return this[B]()}),x&&(te[x]=Z),D&&(te[D[0]]=function(){return U(Z.apply(this,arguments),D[1],D[2])}),M&&(te[M]=function(){return this.localeData().ordinal(Z.apply(this,arguments),x)})}function Q(x){return x.match(/\[[\s\S]/)?x.replace(/^\[|\]$/g,""):x.replace(/\\/g,"")}function oe(x){var D=x.match(L),M,B;for(M=0,B=D.length;M<B;M++)te[D[M]]?D[M]=te[D[M]]:D[M]=Q(D[M]);return function(Z){var ne="",ce;for(ce=0;ce<B;ce++)ne+=I(D[ce])?D[ce].call(Z,x):D[ce];return ne}}function pe(x,D){return x.isValid()?(D=ye(D,x.localeData()),Y[D]=Y[D]||oe(D),Y[D](x)):x.localeData().invalidDate()}function ye(x,D){var M=5;function B(Z){return D.longDateFormat(Z)||Z}for(K.lastIndex=0;M>=0&&K.test(x);)x=x.replace(K,B),K.lastIndex=0,M-=1;return x}var Pe={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Me(x){var D=this._longDateFormat[x],M=this._longDateFormat[x.toUpperCase()];return D||!M?D:(this._longDateFormat[x]=M.match(L).map(function(B){return B==="MMMM"||B==="MM"||B==="DD"||B==="dddd"?B.slice(1):B}).join(""),this._longDateFormat[x])}var He="Invalid date";function ie(){return this._invalidDate}var Se="%d",he=/\d{1,2}/;function Je(x){return this._ordinal.replace("%d",x)}var Ct={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function de(x,D,M,B){var Z=this._relativeTime[M];return I(Z)?Z(x,D,M,B):Z.replace(/%d/i,x)}function le(x,D){var M=this._relativeTime[x>0?"future":"past"];return I(M)?M(D):M.replace(/%s/i,D)}var Oe={};function Ke(x,D){var M=x.toLowerCase();Oe[M]=Oe[M+"s"]=Oe[D]=x}function it(x){return typeof x=="string"?Oe[x]||Oe[x.toLowerCase()]:void 0}function It(x){var D={},M,B;for(B in x)l(x,B)&&(M=it(B),M&&(D[M]=x[B]));return D}var wn={};function me(x,D){wn[x]=D}function Kt(x){var D=[],M;for(M in x)l(x,M)&&D.push({unit:M,priority:wn[M]});return D.sort(function(B,Z){return B.priority-Z.priority}),D}function Bn(x){return x%4===0&&x%100!==0||x%400===0}function Sn(x){return x<0?Math.ceil(x)||0:Math.floor(x)}function nt(x){var D=+x,M=0;return D!==0&&isFinite(D)&&(M=Sn(D)),M}function Un(x,D){return function(M){return M!=null?(X(this,x,M),r.updateOffset(this,D),this):Ve(this,x)}}function Ve(x,D){return x.isValid()?x._d["get"+(x._isUTC?"UTC":"")+D]():NaN}function X(x,D,M){x.isValid()&&!isNaN(M)&&(D==="FullYear"&&Bn(x.year())&&x.month()===1&&x.date()===29?(M=nt(M),x._d["set"+(x._isUTC?"UTC":"")+D](M,x.month(),Yp(M,x.month()))):x._d["set"+(x._isUTC?"UTC":"")+D](M))}function re(x){return x=it(x),I(this[x])?this[x]():this}function fe(x,D){if(typeof x=="object"){x=It(x);var M=Kt(x),B,Z=M.length;for(B=0;B<Z;B++)this[M[B].unit](x[M[B].unit])}else if(x=it(x),I(this[x]))return this[x](D);return this}var ue=/\d/,be=/\d\d/,ze=/\d{3}/,Be=/\d{4}/,yt=/[+-]?\d{6}/,qe=/\d\d?/,Zt=/\d\d\d\d?/,Jt=/\d\d\d\d\d\d?/,On=/\d{1,3}/,br=/\d{1,4}/,Fs=/[+-]?\d{1,6}/,$i=/\d+/,$p=/[+-]?\d+/,bj=/Z|[+-]\d\d:?\d\d/gi,Bp=/Z|[+-]\d\d(?::?\d\d)?/gi,vj=/[+-]?\d+(\.\d{1,3})?/,xu=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Up;Up={};function De(x,D,M){Up[x]=I(D)?D:function(B,Z){return B&&M?M:D}}function _j(x,D){return l(Up,x)?Up[x](D._strict,D._locale):new RegExp(wj(x))}function wj(x){return Hr(x.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(D,M,B,Z,ne){return M||B||Z||ne}))}function Hr(x){return x.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var zv={};function Mt(x,D){var M,B=D,Z;for(typeof x=="string"&&(x=[x]),u(D)&&(B=function(ne,ce){ce[D]=nt(ne)}),Z=x.length,M=0;M<Z;M++)zv[x[M]]=B}function Cu(x,D){Mt(x,function(M,B,Z,ne){Z._w=Z._w||{},D(M,Z._w,Z,ne)})}function xj(x,D,M){D!=null&&l(zv,x)&&zv[x](D,M._a,M,x)}var rr=0,Do=1,io=2,In=3,Ds=4,ko=5,Xa=6,Cj=7,Ej=8;function Sj(x,D){return(x%D+D)%D}var An;Array.prototype.indexOf?An=Array.prototype.indexOf:An=function(x){var D;for(D=0;D<this.length;++D)if(this[D]===x)return D;return-1};function Yp(x,D){if(isNaN(x)||isNaN(D))return NaN;var M=Sj(D,12);return x+=(D-M)/12,M===1?Bn(x)?29:28:31-M%7%2}J("M",["MM",2],"Mo",function(){return this.month()+1}),J("MMM",0,0,function(x){return this.localeData().monthsShort(this,x)}),J("MMMM",0,0,function(x){return this.localeData().months(this,x)}),Ke("month","M"),me("month",8),De("M",qe),De("MM",qe,be),De("MMM",function(x,D){return D.monthsShortRegex(x)}),De("MMMM",function(x,D){return D.monthsRegex(x)}),Mt(["M","MM"],function(x,D){D[Do]=nt(x)-1}),Mt(["MMM","MMMM"],function(x,D,M,B){var Z=M._locale.monthsParse(x,B,M._strict);Z!=null?D[Do]=Z:_(M).invalidMonth=x});var Aj="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),zA="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),qA=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Nj=xu,Rj=xu;function Pj(x,D){return x?o(this._months)?this._months[x.month()]:this._months[(this._months.isFormat||qA).test(D)?"format":"standalone"][x.month()]:o(this._months)?this._months:this._months.standalone}function Oj(x,D){return x?o(this._monthsShort)?this._monthsShort[x.month()]:this._monthsShort[qA.test(D)?"format":"standalone"][x.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Fj(x,D,M){var B,Z,ne,ce=x.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],B=0;B<12;++B)ne=S([2e3,B]),this._shortMonthsParse[B]=this.monthsShort(ne,"").toLocaleLowerCase(),this._longMonthsParse[B]=this.months(ne,"").toLocaleLowerCase();return M?D==="MMM"?(Z=An.call(this._shortMonthsParse,ce),Z!==-1?Z:null):(Z=An.call(this._longMonthsParse,ce),Z!==-1?Z:null):D==="MMM"?(Z=An.call(this._shortMonthsParse,ce),Z!==-1?Z:(Z=An.call(this._longMonthsParse,ce),Z!==-1?Z:null)):(Z=An.call(this._longMonthsParse,ce),Z!==-1?Z:(Z=An.call(this._shortMonthsParse,ce),Z!==-1?Z:null))}function Dj(x,D,M){var B,Z,ne;if(this._monthsParseExact)return Fj.call(this,x,D,M);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),B=0;B<12;B++){if(Z=S([2e3,B]),M&&!this._longMonthsParse[B]&&(this._longMonthsParse[B]=new RegExp("^"+this.months(Z,"").replace(".","")+"$","i"),this._shortMonthsParse[B]=new RegExp("^"+this.monthsShort(Z,"").replace(".","")+"$","i")),!M&&!this._monthsParse[B]&&(ne="^"+this.months(Z,"")+"|^"+this.monthsShort(Z,""),this._monthsParse[B]=new RegExp(ne.replace(".",""),"i")),M&&D==="MMMM"&&this._longMonthsParse[B].test(x))return B;if(M&&D==="MMM"&&this._shortMonthsParse[B].test(x))return B;if(!M&&this._monthsParse[B].test(x))return B}}function jA(x,D){var M;if(!x.isValid())return x;if(typeof D=="string"){if(/^\d+$/.test(D))D=nt(D);else if(D=x.localeData().monthsParse(D),!u(D))return x}return M=Math.min(x.date(),Yp(x.year(),D)),x._d["set"+(x._isUTC?"UTC":"")+"Month"](D,M),x}function $A(x){return x!=null?(jA(this,x),r.updateOffset(this,!0),this):Ve(this,"Month")}function kj(){return Yp(this.year(),this.month())}function Tj(x){return this._monthsParseExact?(l(this,"_monthsRegex")||BA.call(this),x?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=Nj),this._monthsShortStrictRegex&&x?this._monthsShortStrictRegex:this._monthsShortRegex)}function Ij(x){return this._monthsParseExact?(l(this,"_monthsRegex")||BA.call(this),x?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=Rj),this._monthsStrictRegex&&x?this._monthsStrictRegex:this._monthsRegex)}function BA(){function x(ce,je){return je.length-ce.length}var D=[],M=[],B=[],Z,ne;for(Z=0;Z<12;Z++)ne=S([2e3,Z]),D.push(this.monthsShort(ne,"")),M.push(this.months(ne,"")),B.push(this.months(ne,"")),B.push(this.monthsShort(ne,""));for(D.sort(x),M.sort(x),B.sort(x),Z=0;Z<12;Z++)D[Z]=Hr(D[Z]),M[Z]=Hr(M[Z]);for(Z=0;Z<24;Z++)B[Z]=Hr(B[Z]);this._monthsRegex=new RegExp("^("+B.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+M.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+D.join("|")+")","i")}J("Y",0,0,function(){var x=this.year();return x<=9999?U(x,4):"+"+x}),J(0,["YY",2],0,function(){return this.year()%100}),J(0,["YYYY",4],0,"year"),J(0,["YYYYY",5],0,"year"),J(0,["YYYYYY",6,!0],0,"year"),Ke("year","y"),me("year",1),De("Y",$p),De("YY",qe,be),De("YYYY",br,Be),De("YYYYY",Fs,yt),De("YYYYYY",Fs,yt),Mt(["YYYYY","YYYYYY"],rr),Mt("YYYY",function(x,D){D[rr]=x.length===2?r.parseTwoDigitYear(x):nt(x)}),Mt("YY",function(x,D){D[rr]=r.parseTwoDigitYear(x)}),Mt("Y",function(x,D){D[rr]=parseInt(x,10)});function Eu(x){return Bn(x)?366:365}r.parseTwoDigitYear=function(x){return nt(x)+(nt(x)>68?1900:2e3)};var UA=Un("FullYear",!0);function Mj(){return Bn(this.year())}function Lj(x,D,M,B,Z,ne,ce){var je;return x<100&&x>=0?(je=new Date(x+400,D,M,B,Z,ne,ce),isFinite(je.getFullYear())&&je.setFullYear(x)):je=new Date(x,D,M,B,Z,ne,ce),je}function Su(x){var D,M;return x<100&&x>=0?(M=Array.prototype.slice.call(arguments),M[0]=x+400,D=new Date(Date.UTC.apply(null,M)),isFinite(D.getUTCFullYear())&&D.setUTCFullYear(x)):D=new Date(Date.UTC.apply(null,arguments)),D}function Hp(x,D,M){var B=7+D-M,Z=(7+Su(x,0,B).getUTCDay()-D)%7;return-Z+B-1}function YA(x,D,M,B,Z){var ne=(7+M-B)%7,ce=Hp(x,B,Z),je=1+7*(D-1)+ne+ce,ct,Lt;return je<=0?(ct=x-1,Lt=Eu(ct)+je):je>Eu(x)?(ct=x+1,Lt=je-Eu(x)):(ct=x,Lt=je),{year:ct,dayOfYear:Lt}}function Au(x,D,M){var B=Hp(x.year(),D,M),Z=Math.floor((x.dayOfYear()-B-1)/7)+1,ne,ce;return Z<1?(ce=x.year()-1,ne=Z+To(ce,D,M)):Z>To(x.year(),D,M)?(ne=Z-To(x.year(),D,M),ce=x.year()+1):(ce=x.year(),ne=Z),{week:ne,year:ce}}function To(x,D,M){var B=Hp(x,D,M),Z=Hp(x+1,D,M);return(Eu(x)-B+Z)/7}J("w",["ww",2],"wo","week"),J("W",["WW",2],"Wo","isoWeek"),Ke("week","w"),Ke("isoWeek","W"),me("week",5),me("isoWeek",5),De("w",qe),De("ww",qe,be),De("W",qe),De("WW",qe,be),Cu(["w","ww","W","WW"],function(x,D,M,B){D[B.substr(0,1)]=nt(x)});function zj(x){return Au(x,this._week.dow,this._week.doy).week}var qj={dow:0,doy:6};function jj(){return this._week.dow}function $j(){return this._week.doy}function Bj(x){var D=this.localeData().week(this);return x==null?D:this.add((x-D)*7,"d")}function Uj(x){var D=Au(this,1,4).week;return x==null?D:this.add((x-D)*7,"d")}J("d",0,"do","day"),J("dd",0,0,function(x){return this.localeData().weekdaysMin(this,x)}),J("ddd",0,0,function(x){return this.localeData().weekdaysShort(this,x)}),J("dddd",0,0,function(x){return this.localeData().weekdays(this,x)}),J("e",0,0,"weekday"),J("E",0,0,"isoWeekday"),Ke("day","d"),Ke("weekday","e"),Ke("isoWeekday","E"),me("day",11),me("weekday",11),me("isoWeekday",11),De("d",qe),De("e",qe),De("E",qe),De("dd",function(x,D){return D.weekdaysMinRegex(x)}),De("ddd",function(x,D){return D.weekdaysShortRegex(x)}),De("dddd",function(x,D){return D.weekdaysRegex(x)}),Cu(["dd","ddd","dddd"],function(x,D,M,B){var Z=M._locale.weekdaysParse(x,B,M._strict);Z!=null?D.d=Z:_(M).invalidWeekday=x}),Cu(["d","e","E"],function(x,D,M,B){D[B]=nt(x)});function Yj(x,D){return typeof x!="string"?x:isNaN(x)?(x=D.weekdaysParse(x),typeof x=="number"?x:null):parseInt(x,10)}function Hj(x,D){return typeof x=="string"?D.weekdaysParse(x)%7||7:isNaN(x)?null:x}function qv(x,D){return x.slice(D,7).concat(x.slice(0,D))}var Gj="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),HA="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Wj="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Vj=xu,Kj=xu,Zj=xu;function Jj(x,D){var M=o(this._weekdays)?this._weekdays:this._weekdays[x&&x!==!0&&this._weekdays.isFormat.test(D)?"format":"standalone"];return x===!0?qv(M,this._week.dow):x?M[x.day()]:M}function Xj(x){return x===!0?qv(this._weekdaysShort,this._week.dow):x?this._weekdaysShort[x.day()]:this._weekdaysShort}function Qj(x){return x===!0?qv(this._weekdaysMin,this._week.dow):x?this._weekdaysMin[x.day()]:this._weekdaysMin}function e$(x,D,M){var B,Z,ne,ce=x.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],B=0;B<7;++B)ne=S([2e3,1]).day(B),this._minWeekdaysParse[B]=this.weekdaysMin(ne,"").toLocaleLowerCase(),this._shortWeekdaysParse[B]=this.weekdaysShort(ne,"").toLocaleLowerCase(),this._weekdaysParse[B]=this.weekdays(ne,"").toLocaleLowerCase();return M?D==="dddd"?(Z=An.call(this._weekdaysParse,ce),Z!==-1?Z:null):D==="ddd"?(Z=An.call(this._shortWeekdaysParse,ce),Z!==-1?Z:null):(Z=An.call(this._minWeekdaysParse,ce),Z!==-1?Z:null):D==="dddd"?(Z=An.call(this._weekdaysParse,ce),Z!==-1||(Z=An.call(this._shortWeekdaysParse,ce),Z!==-1)?Z:(Z=An.call(this._minWeekdaysParse,ce),Z!==-1?Z:null)):D==="ddd"?(Z=An.call(this._shortWeekdaysParse,ce),Z!==-1||(Z=An.call(this._weekdaysParse,ce),Z!==-1)?Z:(Z=An.call(this._minWeekdaysParse,ce),Z!==-1?Z:null)):(Z=An.call(this._minWeekdaysParse,ce),Z!==-1||(Z=An.call(this._weekdaysParse,ce),Z!==-1)?Z:(Z=An.call(this._shortWeekdaysParse,ce),Z!==-1?Z:null))}function t$(x,D,M){var B,Z,ne;if(this._weekdaysParseExact)return e$.call(this,x,D,M);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),B=0;B<7;B++){if(Z=S([2e3,1]).day(B),M&&!this._fullWeekdaysParse[B]&&(this._fullWeekdaysParse[B]=new RegExp("^"+this.weekdays(Z,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[B]=new RegExp("^"+this.weekdaysShort(Z,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[B]=new RegExp("^"+this.weekdaysMin(Z,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[B]||(ne="^"+this.weekdays(Z,"")+"|^"+this.weekdaysShort(Z,"")+"|^"+this.weekdaysMin(Z,""),this._weekdaysParse[B]=new RegExp(ne.replace(".",""),"i")),M&&D==="dddd"&&this._fullWeekdaysParse[B].test(x))return B;if(M&&D==="ddd"&&this._shortWeekdaysParse[B].test(x))return B;if(M&&D==="dd"&&this._minWeekdaysParse[B].test(x))return B;if(!M&&this._weekdaysParse[B].test(x))return B}}function n$(x){if(!this.isValid())return x!=null?this:NaN;var D=this._isUTC?this._d.getUTCDay():this._d.getDay();return x!=null?(x=Yj(x,this.localeData()),this.add(x-D,"d")):D}function r$(x){if(!this.isValid())return x!=null?this:NaN;var D=(this.day()+7-this.localeData()._week.dow)%7;return x==null?D:this.add(x-D,"d")}function s$(x){if(!this.isValid())return x!=null?this:NaN;if(x!=null){var D=Hj(x,this.localeData());return this.day(this.day()%7?D:D-7)}else return this.day()||7}function o$(x){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||jv.call(this),x?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=Vj),this._weekdaysStrictRegex&&x?this._weekdaysStrictRegex:this._weekdaysRegex)}function i$(x){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||jv.call(this),x?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Kj),this._weekdaysShortStrictRegex&&x?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function a$(x){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||jv.call(this),x?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Zj),this._weekdaysMinStrictRegex&&x?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function jv(){function x(vr,qo){return qo.length-vr.length}var D=[],M=[],B=[],Z=[],ne,ce,je,ct,Lt;for(ne=0;ne<7;ne++)ce=S([2e3,1]).day(ne),je=Hr(this.weekdaysMin(ce,"")),ct=Hr(this.weekdaysShort(ce,"")),Lt=Hr(this.weekdays(ce,"")),D.push(je),M.push(ct),B.push(Lt),Z.push(je),Z.push(ct),Z.push(Lt);D.sort(x),M.sort(x),B.sort(x),Z.sort(x),this._weekdaysRegex=new RegExp("^("+Z.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+B.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+M.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+D.join("|")+")","i")}function $v(){return this.hours()%12||12}function l$(){return this.hours()||24}J("H",["HH",2],0,"hour"),J("h",["hh",2],0,$v),J("k",["kk",2],0,l$),J("hmm",0,0,function(){return""+$v.apply(this)+U(this.minutes(),2)}),J("hmmss",0,0,function(){return""+$v.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)}),J("Hmm",0,0,function(){return""+this.hours()+U(this.minutes(),2)}),J("Hmmss",0,0,function(){return""+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)});function GA(x,D){J(x,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),D)})}GA("a",!0),GA("A",!1),Ke("hour","h"),me("hour",13);function WA(x,D){return D._meridiemParse}De("a",WA),De("A",WA),De("H",qe),De("h",qe),De("k",qe),De("HH",qe,be),De("hh",qe,be),De("kk",qe,be),De("hmm",Zt),De("hmmss",Jt),De("Hmm",Zt),De("Hmmss",Jt),Mt(["H","HH"],In),Mt(["k","kk"],function(x,D,M){var B=nt(x);D[In]=B===24?0:B}),Mt(["a","A"],function(x,D,M){M._isPm=M._locale.isPM(x),M._meridiem=x}),Mt(["h","hh"],function(x,D,M){D[In]=nt(x),_(M).bigHour=!0}),Mt("hmm",function(x,D,M){var B=x.length-2;D[In]=nt(x.substr(0,B)),D[Ds]=nt(x.substr(B)),_(M).bigHour=!0}),Mt("hmmss",function(x,D,M){var B=x.length-4,Z=x.length-2;D[In]=nt(x.substr(0,B)),D[Ds]=nt(x.substr(B,2)),D[ko]=nt(x.substr(Z)),_(M).bigHour=!0}),Mt("Hmm",function(x,D,M){var B=x.length-2;D[In]=nt(x.substr(0,B)),D[Ds]=nt(x.substr(B))}),Mt("Hmmss",function(x,D,M){var B=x.length-4,Z=x.length-2;D[In]=nt(x.substr(0,B)),D[Ds]=nt(x.substr(B,2)),D[ko]=nt(x.substr(Z))});function c$(x){return(x+"").toLowerCase().charAt(0)==="p"}var d$=/[ap]\.?m?\.?/i,u$=Un("Hours",!0);function f$(x,D,M){return x>11?M?"pm":"PM":M?"am":"AM"}var VA={calendar:H,longDateFormat:Pe,invalidDate:He,ordinal:Se,dayOfMonthOrdinalParse:he,relativeTime:Ct,months:Aj,monthsShort:zA,week:qj,weekdays:Gj,weekdaysMin:Wj,weekdaysShort:HA,meridiemParse:d$},dn={},Nu={},Ru;function h$(x,D){var M,B=Math.min(x.length,D.length);for(M=0;M<B;M+=1)if(x[M]!==D[M])return M;return B}function KA(x){return x&&x.toLowerCase().replace("_","-")}function p$(x){for(var D=0,M,B,Z,ne;D<x.length;){for(ne=KA(x[D]).split("-"),M=ne.length,B=KA(x[D+1]),B=B?B.split("-"):null;M>0;){if(Z=Gp(ne.slice(0,M).join("-")),Z)return Z;if(B&&B.length>=M&&h$(ne,B)>=M-1)break;M--}D++}return Ru}function m$(x){return x.match("^[^/\\\\]*$")!=null}function Gp(x){var D=null,M;if(dn[x]===void 0&&t&&t.exports&&m$(x))try{D=Ru._abbr,M=EL,M("./locale/"+x),Bi(D)}catch{dn[x]=null}return dn[x]}function Bi(x,D){var M;return x&&(d(D)?M=Io(x):M=Bv(x,D),M?Ru=M:typeof console<"u"&&console.warn&&console.warn("Locale "+x+" not found. Did you forget to load it?")),Ru._abbr}function Bv(x,D){if(D!==null){var M,B=VA;if(D.abbr=x,dn[x]!=null)F("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),B=dn[x]._config;else if(D.parentLocale!=null)if(dn[D.parentLocale]!=null)B=dn[D.parentLocale]._config;else if(M=Gp(D.parentLocale),M!=null)B=M._config;else return Nu[D.parentLocale]||(Nu[D.parentLocale]=[]),Nu[D.parentLocale].push({name:x,config:D}),null;return dn[x]=new W(q(B,D)),Nu[x]&&Nu[x].forEach(function(Z){Bv(Z.name,Z.config)}),Bi(x),dn[x]}else return delete dn[x],null}function g$(x,D){if(D!=null){var M,B,Z=VA;dn[x]!=null&&dn[x].parentLocale!=null?dn[x].set(q(dn[x]._config,D)):(B=Gp(x),B!=null&&(Z=B._config),D=q(Z,D),B==null&&(D.abbr=x),M=new W(D),M.parentLocale=dn[x],dn[x]=M),Bi(x)}else dn[x]!=null&&(dn[x].parentLocale!=null?(dn[x]=dn[x].parentLocale,x===Bi()&&Bi(x)):dn[x]!=null&&delete dn[x]);return dn[x]}function Io(x){var D;if(x&&x._locale&&x._locale._abbr&&(x=x._locale._abbr),!x)return Ru;if(!o(x)){if(D=Gp(x),D)return D;x=[x]}return p$(x)}function y$(){return G(dn)}function Uv(x){var D,M=x._a;return M&&_(x).overflow===-2&&(D=M[Do]<0||M[Do]>11?Do:M[io]<1||M[io]>Yp(M[rr],M[Do])?io:M[In]<0||M[In]>24||M[In]===24&&(M[Ds]!==0||M[ko]!==0||M[Xa]!==0)?In:M[Ds]<0||M[Ds]>59?Ds:M[ko]<0||M[ko]>59?ko:M[Xa]<0||M[Xa]>999?Xa:-1,_(x)._overflowDayOfYear&&(D<rr||D>io)&&(D=io),_(x)._overflowWeeks&&D===-1&&(D=Cj),_(x)._overflowWeekday&&D===-1&&(D=Ej),_(x).overflow=D),x}var b$=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,v$=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_$=/Z|[+-]\d\d(?::?\d\d)?/,Wp=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Yv=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],w$=/^\/?Date\((-?\d+)/i,x$=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,C$={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function ZA(x){var D,M,B=x._i,Z=b$.exec(B)||v$.exec(B),ne,ce,je,ct,Lt=Wp.length,vr=Yv.length;if(Z){for(_(x).iso=!0,D=0,M=Lt;D<M;D++)if(Wp[D][1].exec(Z[1])){ce=Wp[D][0],ne=Wp[D][2]!==!1;break}if(ce==null){x._isValid=!1;return}if(Z[3]){for(D=0,M=vr;D<M;D++)if(Yv[D][1].exec(Z[3])){je=(Z[2]||" ")+Yv[D][0];break}if(je==null){x._isValid=!1;return}}if(!ne&&je!=null){x._isValid=!1;return}if(Z[4])if(_$.exec(Z[4]))ct="Z";else{x._isValid=!1;return}x._f=ce+(je||"")+(ct||""),Gv(x)}else x._isValid=!1}function E$(x,D,M,B,Z,ne){var ce=[S$(x),zA.indexOf(D),parseInt(M,10),parseInt(B,10),parseInt(Z,10)];return ne&&ce.push(parseInt(ne,10)),ce}function S$(x){var D=parseInt(x,10);return D<=49?2e3+D:D<=999?1900+D:D}function A$(x){return x.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function N$(x,D,M){if(x){var B=HA.indexOf(x),Z=new Date(D[0],D[1],D[2]).getDay();if(B!==Z)return _(M).weekdayMismatch=!0,M._isValid=!1,!1}return!0}function R$(x,D,M){if(x)return C$[x];if(D)return 0;var B=parseInt(M,10),Z=B%100,ne=(B-Z)/100;return ne*60+Z}function JA(x){var D=x$.exec(A$(x._i)),M;if(D){if(M=E$(D[4],D[3],D[2],D[5],D[6],D[7]),!N$(D[1],M,x))return;x._a=M,x._tzm=R$(D[8],D[9],D[10]),x._d=Su.apply(null,x._a),x._d.setUTCMinutes(x._d.getUTCMinutes()-x._tzm),_(x).rfc2822=!0}else x._isValid=!1}function P$(x){var D=w$.exec(x._i);if(D!==null){x._d=new Date(+D[1]);return}if(ZA(x),x._isValid===!1)delete x._isValid;else return;if(JA(x),x._isValid===!1)delete x._isValid;else return;x._strict?x._isValid=!1:r.createFromInputFallback(x)}r.createFromInputFallback=b("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(x){x._d=new Date(x._i+(x._useUTC?" UTC":""))});function uc(x,D,M){return x??D??M}function O$(x){var D=new Date(r.now());return x._useUTC?[D.getUTCFullYear(),D.getUTCMonth(),D.getUTCDate()]:[D.getFullYear(),D.getMonth(),D.getDate()]}function Hv(x){var D,M,B=[],Z,ne,ce;if(!x._d){for(Z=O$(x),x._w&&x._a[io]==null&&x._a[Do]==null&&F$(x),x._dayOfYear!=null&&(ce=uc(x._a[rr],Z[rr]),(x._dayOfYear>Eu(ce)||x._dayOfYear===0)&&(_(x)._overflowDayOfYear=!0),M=Su(ce,0,x._dayOfYear),x._a[Do]=M.getUTCMonth(),x._a[io]=M.getUTCDate()),D=0;D<3&&x._a[D]==null;++D)x._a[D]=B[D]=Z[D];for(;D<7;D++)x._a[D]=B[D]=x._a[D]==null?D===2?1:0:x._a[D];x._a[In]===24&&x._a[Ds]===0&&x._a[ko]===0&&x._a[Xa]===0&&(x._nextDay=!0,x._a[In]=0),x._d=(x._useUTC?Su:Lj).apply(null,B),ne=x._useUTC?x._d.getUTCDay():x._d.getDay(),x._tzm!=null&&x._d.setUTCMinutes(x._d.getUTCMinutes()-x._tzm),x._nextDay&&(x._a[In]=24),x._w&&typeof x._w.d<"u"&&x._w.d!==ne&&(_(x).weekdayMismatch=!0)}}function F$(x){var D,M,B,Z,ne,ce,je,ct,Lt;D=x._w,D.GG!=null||D.W!=null||D.E!=null?(ne=1,ce=4,M=uc(D.GG,x._a[rr],Au(Xt(),1,4).year),B=uc(D.W,1),Z=uc(D.E,1),(Z<1||Z>7)&&(ct=!0)):(ne=x._locale._week.dow,ce=x._locale._week.doy,Lt=Au(Xt(),ne,ce),M=uc(D.gg,x._a[rr],Lt.year),B=uc(D.w,Lt.week),D.d!=null?(Z=D.d,(Z<0||Z>6)&&(ct=!0)):D.e!=null?(Z=D.e+ne,(D.e<0||D.e>6)&&(ct=!0)):Z=ne),B<1||B>To(M,ne,ce)?_(x)._overflowWeeks=!0:ct!=null?_(x)._overflowWeekday=!0:(je=YA(M,B,Z,ne,ce),x._a[rr]=je.year,x._dayOfYear=je.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function Gv(x){if(x._f===r.ISO_8601){ZA(x);return}if(x._f===r.RFC_2822){JA(x);return}x._a=[],_(x).empty=!0;var D=""+x._i,M,B,Z,ne,ce,je=D.length,ct=0,Lt,vr;for(Z=ye(x._f,x._locale).match(L)||[],vr=Z.length,M=0;M<vr;M++)ne=Z[M],B=(D.match(_j(ne,x))||[])[0],B&&(ce=D.substr(0,D.indexOf(B)),ce.length>0&&_(x).unusedInput.push(ce),D=D.slice(D.indexOf(B)+B.length),ct+=B.length),te[ne]?(B?_(x).empty=!1:_(x).unusedTokens.push(ne),xj(ne,B,x)):x._strict&&!B&&_(x).unusedTokens.push(ne);_(x).charsLeftOver=je-ct,D.length>0&&_(x).unusedInput.push(D),x._a[In]<=12&&_(x).bigHour===!0&&x._a[In]>0&&(_(x).bigHour=void 0),_(x).parsedDateParts=x._a.slice(0),_(x).meridiem=x._meridiem,x._a[In]=D$(x._locale,x._a[In],x._meridiem),Lt=_(x).era,Lt!==null&&(x._a[rr]=x._locale.erasConvertYear(Lt,x._a[rr])),Hv(x),Uv(x)}function D$(x,D,M){var B;return M==null?D:x.meridiemHour!=null?x.meridiemHour(D,M):(x.isPM!=null&&(B=x.isPM(M),B&&D<12&&(D+=12),!B&&D===12&&(D=0)),D)}function k$(x){var D,M,B,Z,ne,ce,je=!1,ct=x._f.length;if(ct===0){_(x).invalidFormat=!0,x._d=new Date(NaN);return}for(Z=0;Z<ct;Z++)ne=0,ce=!1,D=O({},x),x._useUTC!=null&&(D._useUTC=x._useUTC),D._f=x._f[Z],Gv(D),m(D)&&(ce=!0),ne+=_(D).charsLeftOver,ne+=_(D).unusedTokens.length*10,_(D).score=ne,je?ne<B&&(B=ne,M=D):(B==null||ne<B||ce)&&(B=ne,M=D,ce&&(je=!0));E(x,M||D)}function T$(x){if(!x._d){var D=It(x._i),M=D.day===void 0?D.date:D.day;x._a=g([D.year,D.month,M,D.hour,D.minute,D.second,D.millisecond],function(B){return B&&parseInt(B,10)}),Hv(x)}}function I$(x){var D=new N(Uv(XA(x)));return D._nextDay&&(D.add(1,"d"),D._nextDay=void 0),D}function XA(x){var D=x._i,M=x._f;return x._locale=x._locale||Io(x._l),D===null||M===void 0&&D===""?A({nullInput:!0}):(typeof D=="string"&&(x._i=D=x._locale.preparse(D)),y(D)?new N(Uv(D)):(f(D)?x._d=D:o(M)?k$(x):M?Gv(x):M$(x),m(x)||(x._d=null),x))}function M$(x){var D=x._i;d(D)?x._d=new Date(r.now()):f(D)?x._d=new Date(D.valueOf()):typeof D=="string"?P$(x):o(D)?(x._a=g(D.slice(0),function(M){return parseInt(M,10)}),Hv(x)):a(D)?T$(x):u(D)?x._d=new Date(D):r.createFromInputFallback(x)}function QA(x,D,M,B,Z){var ne={};return(D===!0||D===!1)&&(B=D,D=void 0),(M===!0||M===!1)&&(B=M,M=void 0),(a(x)&&c(x)||o(x)&&x.length===0)&&(x=void 0),ne._isAMomentObject=!0,ne._useUTC=ne._isUTC=Z,ne._l=M,ne._i=x,ne._f=D,ne._strict=B,I$(ne)}function Xt(x,D,M,B){return QA(x,D,M,B,!1)}var L$=b("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var x=Xt.apply(null,arguments);return this.isValid()&&x.isValid()?x<this?this:x:A()}),z$=b("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var x=Xt.apply(null,arguments);return this.isValid()&&x.isValid()?x>this?this:x:A()});function eN(x,D){var M,B;if(D.length===1&&o(D[0])&&(D=D[0]),!D.length)return Xt();for(M=D[0],B=1;B<D.length;++B)(!D[B].isValid()||D[B][x](M))&&(M=D[B]);return M}function q$(){var x=[].slice.call(arguments,0);return eN("isBefore",x)}function j$(){var x=[].slice.call(arguments,0);return eN("isAfter",x)}var $$=function(){return Date.now?Date.now():+new Date},Pu=["year","quarter","month","week","day","hour","minute","second","millisecond"];function B$(x){var D,M=!1,B,Z=Pu.length;for(D in x)if(l(x,D)&&!(An.call(Pu,D)!==-1&&(x[D]==null||!isNaN(x[D]))))return!1;for(B=0;B<Z;++B)if(x[Pu[B]]){if(M)return!1;parseFloat(x[Pu[B]])!==nt(x[Pu[B]])&&(M=!0)}return!0}function U$(){return this._isValid}function Y$(){return ks(NaN)}function Vp(x){var D=It(x),M=D.year||0,B=D.quarter||0,Z=D.month||0,ne=D.week||D.isoWeek||0,ce=D.day||0,je=D.hour||0,ct=D.minute||0,Lt=D.second||0,vr=D.millisecond||0;this._isValid=B$(D),this._milliseconds=+vr+Lt*1e3+ct*6e4+je*1e3*60*60,this._days=+ce+ne*7,this._months=+Z+B*3+M*12,this._data={},this._locale=Io(),this._bubble()}function Kp(x){return x instanceof Vp}function Wv(x){return x<0?Math.round(-1*x)*-1:Math.round(x)}function H$(x,D,M){var B=Math.min(x.length,D.length),Z=Math.abs(x.length-D.length),ne=0,ce;for(ce=0;ce<B;ce++)(M&&x[ce]!==D[ce]||!M&&nt(x[ce])!==nt(D[ce]))&&ne++;return ne+Z}function tN(x,D){J(x,0,0,function(){var M=this.utcOffset(),B="+";return M<0&&(M=-M,B="-"),B+U(~~(M/60),2)+D+U(~~M%60,2)})}tN("Z",":"),tN("ZZ",""),De("Z",Bp),De("ZZ",Bp),Mt(["Z","ZZ"],function(x,D,M){M._useUTC=!0,M._tzm=Vv(Bp,x)});var G$=/([\+\-]|\d\d)/gi;function Vv(x,D){var M=(D||"").match(x),B,Z,ne;return M===null?null:(B=M[M.length-1]||[],Z=(B+"").match(G$)||["-",0,0],ne=+(Z[1]*60)+nt(Z[2]),ne===0?0:Z[0]==="+"?ne:-ne)}function Kv(x,D){var M,B;return D._isUTC?(M=D.clone(),B=(y(x)||f(x)?x.valueOf():Xt(x).valueOf())-M.valueOf(),M._d.setTime(M._d.valueOf()+B),r.updateOffset(M,!1),M):Xt(x).local()}function Zv(x){return-Math.round(x._d.getTimezoneOffset())}r.updateOffset=function(){};function W$(x,D,M){var B=this._offset||0,Z;if(!this.isValid())return x!=null?this:NaN;if(x!=null){if(typeof x=="string"){if(x=Vv(Bp,x),x===null)return this}else Math.abs(x)<16&&!M&&(x=x*60);return!this._isUTC&&D&&(Z=Zv(this)),this._offset=x,this._isUTC=!0,Z!=null&&this.add(Z,"m"),B!==x&&(!D||this._changeInProgress?oN(this,ks(x-B,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?B:Zv(this)}function V$(x,D){return x!=null?(typeof x!="string"&&(x=-x),this.utcOffset(x,D),this):-this.utcOffset()}function K$(x){return this.utcOffset(0,x)}function Z$(x){return this._isUTC&&(this.utcOffset(0,x),this._isUTC=!1,x&&this.subtract(Zv(this),"m")),this}function J$(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var x=Vv(bj,this._i);x!=null?this.utcOffset(x):this.utcOffset(0,!0)}return this}function X$(x){return this.isValid()?(x=x?Xt(x).utcOffset():0,(this.utcOffset()-x)%60===0):!1}function Q$(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function e6(){if(!d(this._isDSTShifted))return this._isDSTShifted;var x={},D;return O(x,this),x=XA(x),x._a?(D=x._isUTC?S(x._a):Xt(x._a),this._isDSTShifted=this.isValid()&&H$(x._a,D.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function t6(){return this.isValid()?!this._isUTC:!1}function n6(){return this.isValid()?this._isUTC:!1}function nN(){return this.isValid()?this._isUTC&&this._offset===0:!1}var r6=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,s6=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ks(x,D){var M=x,B=null,Z,ne,ce;return Kp(x)?M={ms:x._milliseconds,d:x._days,M:x._months}:u(x)||!isNaN(+x)?(M={},D?M[D]=+x:M.milliseconds=+x):(B=r6.exec(x))?(Z=B[1]==="-"?-1:1,M={y:0,d:nt(B[io])*Z,h:nt(B[In])*Z,m:nt(B[Ds])*Z,s:nt(B[ko])*Z,ms:nt(Wv(B[Xa]*1e3))*Z}):(B=s6.exec(x))?(Z=B[1]==="-"?-1:1,M={y:Qa(B[2],Z),M:Qa(B[3],Z),w:Qa(B[4],Z),d:Qa(B[5],Z),h:Qa(B[6],Z),m:Qa(B[7],Z),s:Qa(B[8],Z)}):M==null?M={}:typeof M=="object"&&("from"in M||"to"in M)&&(ce=o6(Xt(M.from),Xt(M.to)),M={},M.ms=ce.milliseconds,M.M=ce.months),ne=new Vp(M),Kp(x)&&l(x,"_locale")&&(ne._locale=x._locale),Kp(x)&&l(x,"_isValid")&&(ne._isValid=x._isValid),ne}ks.fn=Vp.prototype,ks.invalid=Y$;function Qa(x,D){var M=x&&parseFloat(x.replace(",","."));return(isNaN(M)?0:M)*D}function rN(x,D){var M={};return M.months=D.month()-x.month()+(D.year()-x.year())*12,x.clone().add(M.months,"M").isAfter(D)&&--M.months,M.milliseconds=+D-+x.clone().add(M.months,"M"),M}function o6(x,D){var M;return x.isValid()&&D.isValid()?(D=Kv(D,x),x.isBefore(D)?M=rN(x,D):(M=rN(D,x),M.milliseconds=-M.milliseconds,M.months=-M.months),M):{milliseconds:0,months:0}}function sN(x,D){return function(M,B){var Z,ne;return B!==null&&!isNaN(+B)&&(F(D,"moment()."+D+"(period, number) is deprecated. Please use moment()."+D+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),ne=M,M=B,B=ne),Z=ks(M,B),oN(this,Z,x),this}}function oN(x,D,M,B){var Z=D._milliseconds,ne=Wv(D._days),ce=Wv(D._months);x.isValid()&&(B=B??!0,ce&&jA(x,Ve(x,"Month")+ce*M),ne&&X(x,"Date",Ve(x,"Date")+ne*M),Z&&x._d.setTime(x._d.valueOf()+Z*M),B&&r.updateOffset(x,ne||ce))}var i6=sN(1,"add"),a6=sN(-1,"subtract");function iN(x){return typeof x=="string"||x instanceof String}function l6(x){return y(x)||f(x)||iN(x)||u(x)||d6(x)||c6(x)||x===null||x===void 0}function c6(x){var D=a(x)&&!c(x),M=!1,B=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],Z,ne,ce=B.length;for(Z=0;Z<ce;Z+=1)ne=B[Z],M=M||l(x,ne);return D&&M}function d6(x){var D=o(x),M=!1;return D&&(M=x.filter(function(B){return!u(B)&&iN(x)}).length===0),D&&M}function u6(x){var D=a(x)&&!c(x),M=!1,B=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],Z,ne;for(Z=0;Z<B.length;Z+=1)ne=B[Z],M=M||l(x,ne);return D&&M}function f6(x,D){var M=x.diff(D,"days",!0);return M<-6?"sameElse":M<-1?"lastWeek":M<0?"lastDay":M<1?"sameDay":M<2?"nextDay":M<7?"nextWeek":"sameElse"}function h6(x,D){arguments.length===1&&(arguments[0]?l6(arguments[0])?(x=arguments[0],D=void 0):u6(arguments[0])&&(D=arguments[0],x=void 0):(x=void 0,D=void 0));var M=x||Xt(),B=Kv(M,this).startOf("day"),Z=r.calendarFormat(this,B)||"sameElse",ne=D&&(I(D[Z])?D[Z].call(this,M):D[Z]);return this.format(ne||this.localeData().calendar(Z,this,Xt(M)))}function p6(){return new N(this)}function m6(x,D){var M=y(x)?x:Xt(x);return this.isValid()&&M.isValid()?(D=it(D)||"millisecond",D==="millisecond"?this.valueOf()>M.valueOf():M.valueOf()<this.clone().startOf(D).valueOf()):!1}function g6(x,D){var M=y(x)?x:Xt(x);return this.isValid()&&M.isValid()?(D=it(D)||"millisecond",D==="millisecond"?this.valueOf()<M.valueOf():this.clone().endOf(D).valueOf()<M.valueOf()):!1}function y6(x,D,M,B){var Z=y(x)?x:Xt(x),ne=y(D)?D:Xt(D);return this.isValid()&&Z.isValid()&&ne.isValid()?(B=B||"()",(B[0]==="("?this.isAfter(Z,M):!this.isBefore(Z,M))&&(B[1]===")"?this.isBefore(ne,M):!this.isAfter(ne,M))):!1}function b6(x,D){var M=y(x)?x:Xt(x),B;return this.isValid()&&M.isValid()?(D=it(D)||"millisecond",D==="millisecond"?this.valueOf()===M.valueOf():(B=M.valueOf(),this.clone().startOf(D).valueOf()<=B&&B<=this.clone().endOf(D).valueOf())):!1}function v6(x,D){return this.isSame(x,D)||this.isAfter(x,D)}function _6(x,D){return this.isSame(x,D)||this.isBefore(x,D)}function w6(x,D,M){var B,Z,ne;if(!this.isValid())return NaN;if(B=Kv(x,this),!B.isValid())return NaN;switch(Z=(B.utcOffset()-this.utcOffset())*6e4,D=it(D),D){case"year":ne=Zp(this,B)/12;break;case"month":ne=Zp(this,B);break;case"quarter":ne=Zp(this,B)/3;break;case"second":ne=(this-B)/1e3;break;case"minute":ne=(this-B)/6e4;break;case"hour":ne=(this-B)/36e5;break;case"day":ne=(this-B-Z)/864e5;break;case"week":ne=(this-B-Z)/6048e5;break;default:ne=this-B}return M?ne:Sn(ne)}function Zp(x,D){if(x.date()<D.date())return-Zp(D,x);var M=(D.year()-x.year())*12+(D.month()-x.month()),B=x.clone().add(M,"months"),Z,ne;return D-B<0?(Z=x.clone().add(M-1,"months"),ne=(D-B)/(B-Z)):(Z=x.clone().add(M+1,"months"),ne=(D-B)/(Z-B)),-(M+ne)||0}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function x6(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function C6(x){if(!this.isValid())return null;var D=x!==!0,M=D?this.clone().utc():this;return M.year()<0||M.year()>9999?pe(M,D?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):I(Date.prototype.toISOString)?D?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",pe(M,"Z")):pe(M,D?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function E6(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var x="moment",D="",M,B,Z,ne;return this.isLocal()||(x=this.utcOffset()===0?"moment.utc":"moment.parseZone",D="Z"),M="["+x+'("]',B=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",Z="-MM-DD[T]HH:mm:ss.SSS",ne=D+'[")]',this.format(M+B+Z+ne)}function S6(x){x||(x=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var D=pe(this,x);return this.localeData().postformat(D)}function A6(x,D){return this.isValid()&&(y(x)&&x.isValid()||Xt(x).isValid())?ks({to:this,from:x}).locale(this.locale()).humanize(!D):this.localeData().invalidDate()}function N6(x){return this.from(Xt(),x)}function R6(x,D){return this.isValid()&&(y(x)&&x.isValid()||Xt(x).isValid())?ks({from:this,to:x}).locale(this.locale()).humanize(!D):this.localeData().invalidDate()}function P6(x){return this.to(Xt(),x)}function aN(x){var D;return x===void 0?this._locale._abbr:(D=Io(x),D!=null&&(this._locale=D),this)}var lN=b("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(x){return x===void 0?this.localeData():this.locale(x)});function cN(){return this._locale}var Jp=1e3,fc=60*Jp,Xp=60*fc,dN=(365*400+97)*24*Xp;function hc(x,D){return(x%D+D)%D}function uN(x,D,M){return x<100&&x>=0?new Date(x+400,D,M)-dN:new Date(x,D,M).valueOf()}function fN(x,D,M){return x<100&&x>=0?Date.UTC(x+400,D,M)-dN:Date.UTC(x,D,M)}function O6(x){var D,M;if(x=it(x),x===void 0||x==="millisecond"||!this.isValid())return this;switch(M=this._isUTC?fN:uN,x){case"year":D=M(this.year(),0,1);break;case"quarter":D=M(this.year(),this.month()-this.month()%3,1);break;case"month":D=M(this.year(),this.month(),1);break;case"week":D=M(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":D=M(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":D=M(this.year(),this.month(),this.date());break;case"hour":D=this._d.valueOf(),D-=hc(D+(this._isUTC?0:this.utcOffset()*fc),Xp);break;case"minute":D=this._d.valueOf(),D-=hc(D,fc);break;case"second":D=this._d.valueOf(),D-=hc(D,Jp);break}return this._d.setTime(D),r.updateOffset(this,!0),this}function F6(x){var D,M;if(x=it(x),x===void 0||x==="millisecond"||!this.isValid())return this;switch(M=this._isUTC?fN:uN,x){case"year":D=M(this.year()+1,0,1)-1;break;case"quarter":D=M(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":D=M(this.year(),this.month()+1,1)-1;break;case"week":D=M(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":D=M(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":D=M(this.year(),this.month(),this.date()+1)-1;break;case"hour":D=this._d.valueOf(),D+=Xp-hc(D+(this._isUTC?0:this.utcOffset()*fc),Xp)-1;break;case"minute":D=this._d.valueOf(),D+=fc-hc(D,fc)-1;break;case"second":D=this._d.valueOf(),D+=Jp-hc(D,Jp)-1;break}return this._d.setTime(D),r.updateOffset(this,!0),this}function D6(){return this._d.valueOf()-(this._offset||0)*6e4}function k6(){return Math.floor(this.valueOf()/1e3)}function T6(){return new Date(this.valueOf())}function I6(){var x=this;return[x.year(),x.month(),x.date(),x.hour(),x.minute(),x.second(),x.millisecond()]}function M6(){var x=this;return{years:x.year(),months:x.month(),date:x.date(),hours:x.hours(),minutes:x.minutes(),seconds:x.seconds(),milliseconds:x.milliseconds()}}function L6(){return this.isValid()?this.toISOString():null}function z6(){return m(this)}function q6(){return E({},_(this))}function j6(){return _(this).overflow}function $6(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}J("N",0,0,"eraAbbr"),J("NN",0,0,"eraAbbr"),J("NNN",0,0,"eraAbbr"),J("NNNN",0,0,"eraName"),J("NNNNN",0,0,"eraNarrow"),J("y",["y",1],"yo","eraYear"),J("y",["yy",2],0,"eraYear"),J("y",["yyy",3],0,"eraYear"),J("y",["yyyy",4],0,"eraYear"),De("N",Jv),De("NN",Jv),De("NNN",Jv),De("NNNN",X6),De("NNNNN",Q6),Mt(["N","NN","NNN","NNNN","NNNNN"],function(x,D,M,B){var Z=M._locale.erasParse(x,B,M._strict);Z?_(M).era=Z:_(M).invalidEra=x}),De("y",$i),De("yy",$i),De("yyy",$i),De("yyyy",$i),De("yo",eB),Mt(["y","yy","yyy","yyyy"],rr),Mt(["yo"],function(x,D,M,B){var Z;M._locale._eraYearOrdinalRegex&&(Z=x.match(M._locale._eraYearOrdinalRegex)),M._locale.eraYearOrdinalParse?D[rr]=M._locale.eraYearOrdinalParse(x,Z):D[rr]=parseInt(x,10)});function B6(x,D){var M,B,Z,ne=this._eras||Io("en")._eras;for(M=0,B=ne.length;M<B;++M){switch(typeof ne[M].since){case"string":Z=r(ne[M].since).startOf("day"),ne[M].since=Z.valueOf();break}switch(typeof ne[M].until){case"undefined":ne[M].until=1/0;break;case"string":Z=r(ne[M].until).startOf("day").valueOf(),ne[M].until=Z.valueOf();break}}return ne}function U6(x,D,M){var B,Z,ne=this.eras(),ce,je,ct;for(x=x.toUpperCase(),B=0,Z=ne.length;B<Z;++B)if(ce=ne[B].name.toUpperCase(),je=ne[B].abbr.toUpperCase(),ct=ne[B].narrow.toUpperCase(),M)switch(D){case"N":case"NN":case"NNN":if(je===x)return ne[B];break;case"NNNN":if(ce===x)return ne[B];break;case"NNNNN":if(ct===x)return ne[B];break}else if([ce,je,ct].indexOf(x)>=0)return ne[B]}function Y6(x,D){var M=x.since<=x.until?1:-1;return D===void 0?r(x.since).year():r(x.since).year()+(D-x.offset)*M}function H6(){var x,D,M,B=this.localeData().eras();for(x=0,D=B.length;x<D;++x)if(M=this.clone().startOf("day").valueOf(),B[x].since<=M&&M<=B[x].until||B[x].until<=M&&M<=B[x].since)return B[x].name;return""}function G6(){var x,D,M,B=this.localeData().eras();for(x=0,D=B.length;x<D;++x)if(M=this.clone().startOf("day").valueOf(),B[x].since<=M&&M<=B[x].until||B[x].until<=M&&M<=B[x].since)return B[x].narrow;return""}function W6(){var x,D,M,B=this.localeData().eras();for(x=0,D=B.length;x<D;++x)if(M=this.clone().startOf("day").valueOf(),B[x].since<=M&&M<=B[x].until||B[x].until<=M&&M<=B[x].since)return B[x].abbr;return""}function V6(){var x,D,M,B,Z=this.localeData().eras();for(x=0,D=Z.length;x<D;++x)if(M=Z[x].since<=Z[x].until?1:-1,B=this.clone().startOf("day").valueOf(),Z[x].since<=B&&B<=Z[x].until||Z[x].until<=B&&B<=Z[x].since)return(this.year()-r(Z[x].since).year())*M+Z[x].offset;return this.year()}function K6(x){return l(this,"_erasNameRegex")||Xv.call(this),x?this._erasNameRegex:this._erasRegex}function Z6(x){return l(this,"_erasAbbrRegex")||Xv.call(this),x?this._erasAbbrRegex:this._erasRegex}function J6(x){return l(this,"_erasNarrowRegex")||Xv.call(this),x?this._erasNarrowRegex:this._erasRegex}function Jv(x,D){return D.erasAbbrRegex(x)}function X6(x,D){return D.erasNameRegex(x)}function Q6(x,D){return D.erasNarrowRegex(x)}function eB(x,D){return D._eraYearOrdinalRegex||$i}function Xv(){var x=[],D=[],M=[],B=[],Z,ne,ce=this.eras();for(Z=0,ne=ce.length;Z<ne;++Z)D.push(Hr(ce[Z].name)),x.push(Hr(ce[Z].abbr)),M.push(Hr(ce[Z].narrow)),B.push(Hr(ce[Z].name)),B.push(Hr(ce[Z].abbr)),B.push(Hr(ce[Z].narrow));this._erasRegex=new RegExp("^("+B.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+D.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+x.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+M.join("|")+")","i")}J(0,["gg",2],0,function(){return this.weekYear()%100}),J(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Qp(x,D){J(0,[x,x.length],0,D)}Qp("gggg","weekYear"),Qp("ggggg","weekYear"),Qp("GGGG","isoWeekYear"),Qp("GGGGG","isoWeekYear"),Ke("weekYear","gg"),Ke("isoWeekYear","GG"),me("weekYear",1),me("isoWeekYear",1),De("G",$p),De("g",$p),De("GG",qe,be),De("gg",qe,be),De("GGGG",br,Be),De("gggg",br,Be),De("GGGGG",Fs,yt),De("ggggg",Fs,yt),Cu(["gggg","ggggg","GGGG","GGGGG"],function(x,D,M,B){D[B.substr(0,2)]=nt(x)}),Cu(["gg","GG"],function(x,D,M,B){D[B]=r.parseTwoDigitYear(x)});function tB(x){return hN.call(this,x,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function nB(x){return hN.call(this,x,this.isoWeek(),this.isoWeekday(),1,4)}function rB(){return To(this.year(),1,4)}function sB(){return To(this.isoWeekYear(),1,4)}function oB(){var x=this.localeData()._week;return To(this.year(),x.dow,x.doy)}function iB(){var x=this.localeData()._week;return To(this.weekYear(),x.dow,x.doy)}function hN(x,D,M,B,Z){var ne;return x==null?Au(this,B,Z).year:(ne=To(x,B,Z),D>ne&&(D=ne),aB.call(this,x,D,M,B,Z))}function aB(x,D,M,B,Z){var ne=YA(x,D,M,B,Z),ce=Su(ne.year,0,ne.dayOfYear);return this.year(ce.getUTCFullYear()),this.month(ce.getUTCMonth()),this.date(ce.getUTCDate()),this}J("Q",0,"Qo","quarter"),Ke("quarter","Q"),me("quarter",7),De("Q",ue),Mt("Q",function(x,D){D[Do]=(nt(x)-1)*3});function lB(x){return x==null?Math.ceil((this.month()+1)/3):this.month((x-1)*3+this.month()%3)}J("D",["DD",2],"Do","date"),Ke("date","D"),me("date",9),De("D",qe),De("DD",qe,be),De("Do",function(x,D){return x?D._dayOfMonthOrdinalParse||D._ordinalParse:D._dayOfMonthOrdinalParseLenient}),Mt(["D","DD"],io),Mt("Do",function(x,D){D[io]=nt(x.match(qe)[0])});var pN=Un("Date",!0);J("DDD",["DDDD",3],"DDDo","dayOfYear"),Ke("dayOfYear","DDD"),me("dayOfYear",4),De("DDD",On),De("DDDD",ze),Mt(["DDD","DDDD"],function(x,D,M){M._dayOfYear=nt(x)});function cB(x){var D=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return x==null?D:this.add(x-D,"d")}J("m",["mm",2],0,"minute"),Ke("minute","m"),me("minute",14),De("m",qe),De("mm",qe,be),Mt(["m","mm"],Ds);var dB=Un("Minutes",!1);J("s",["ss",2],0,"second"),Ke("second","s"),me("second",15),De("s",qe),De("ss",qe,be),Mt(["s","ss"],ko);var uB=Un("Seconds",!1);J("S",0,0,function(){return~~(this.millisecond()/100)}),J(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),J(0,["SSS",3],0,"millisecond"),J(0,["SSSS",4],0,function(){return this.millisecond()*10}),J(0,["SSSSS",5],0,function(){return this.millisecond()*100}),J(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),J(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),J(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),J(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),Ke("millisecond","ms"),me("millisecond",16),De("S",On,ue),De("SS",On,be),De("SSS",On,ze);var Ui,mN;for(Ui="SSSS";Ui.length<=9;Ui+="S")De(Ui,$i);function fB(x,D){D[Xa]=nt(("0."+x)*1e3)}for(Ui="S";Ui.length<=9;Ui+="S")Mt(Ui,fB);mN=Un("Milliseconds",!1),J("z",0,0,"zoneAbbr"),J("zz",0,0,"zoneName");function hB(){return this._isUTC?"UTC":""}function pB(){return this._isUTC?"Coordinated Universal Time":""}var we=N.prototype;we.add=i6,we.calendar=h6,we.clone=p6,we.diff=w6,we.endOf=F6,we.format=S6,we.from=A6,we.fromNow=N6,we.to=R6,we.toNow=P6,we.get=re,we.invalidAt=j6,we.isAfter=m6,we.isBefore=g6,we.isBetween=y6,we.isSame=b6,we.isSameOrAfter=v6,we.isSameOrBefore=_6,we.isValid=z6,we.lang=lN,we.locale=aN,we.localeData=cN,we.max=z$,we.min=L$,we.parsingFlags=q6,we.set=fe,we.startOf=O6,we.subtract=a6,we.toArray=I6,we.toObject=M6,we.toDate=T6,we.toISOString=C6,we.inspect=E6,typeof Symbol<"u"&&Symbol.for!=null&&(we[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),we.toJSON=L6,we.toString=x6,we.unix=k6,we.valueOf=D6,we.creationData=$6,we.eraName=H6,we.eraNarrow=G6,we.eraAbbr=W6,we.eraYear=V6,we.year=UA,we.isLeapYear=Mj,we.weekYear=tB,we.isoWeekYear=nB,we.quarter=we.quarters=lB,we.month=$A,we.daysInMonth=kj,we.week=we.weeks=Bj,we.isoWeek=we.isoWeeks=Uj,we.weeksInYear=oB,we.weeksInWeekYear=iB,we.isoWeeksInYear=rB,we.isoWeeksInISOWeekYear=sB,we.date=pN,we.day=we.days=n$,we.weekday=r$,we.isoWeekday=s$,we.dayOfYear=cB,we.hour=we.hours=u$,we.minute=we.minutes=dB,we.second=we.seconds=uB,we.millisecond=we.milliseconds=mN,we.utcOffset=W$,we.utc=K$,we.local=Z$,we.parseZone=J$,we.hasAlignedHourOffset=X$,we.isDST=Q$,we.isLocal=t6,we.isUtcOffset=n6,we.isUtc=nN,we.isUTC=nN,we.zoneAbbr=hB,we.zoneName=pB,we.dates=b("dates accessor is deprecated. Use date instead.",pN),we.months=b("months accessor is deprecated. Use month instead",$A),we.years=b("years accessor is deprecated. Use year instead",UA),we.zone=b("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",V$),we.isDSTShifted=b("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",e6);function mB(x){return Xt(x*1e3)}function gB(){return Xt.apply(null,arguments).parseZone()}function gN(x){return x}var St=W.prototype;St.calendar=j,St.longDateFormat=Me,St.invalidDate=ie,St.ordinal=Je,St.preparse=gN,St.postformat=gN,St.relativeTime=de,St.pastFuture=le,St.set=T,St.eras=B6,St.erasParse=U6,St.erasConvertYear=Y6,St.erasAbbrRegex=Z6,St.erasNameRegex=K6,St.erasNarrowRegex=J6,St.months=Pj,St.monthsShort=Oj,St.monthsParse=Dj,St.monthsRegex=Ij,St.monthsShortRegex=Tj,St.week=zj,St.firstDayOfYear=$j,St.firstDayOfWeek=jj,St.weekdays=Jj,St.weekdaysMin=Qj,St.weekdaysShort=Xj,St.weekdaysParse=t$,St.weekdaysRegex=o$,St.weekdaysShortRegex=i$,St.weekdaysMinRegex=a$,St.isPM=c$,St.meridiem=f$;function em(x,D,M,B){var Z=Io(),ne=S().set(B,D);return Z[M](ne,x)}function yN(x,D,M){if(u(x)&&(D=x,x=void 0),x=x||"",D!=null)return em(x,D,M,"month");var B,Z=[];for(B=0;B<12;B++)Z[B]=em(x,B,M,"month");return Z}function Qv(x,D,M,B){typeof x=="boolean"?(u(D)&&(M=D,D=void 0),D=D||""):(D=x,M=D,x=!1,u(D)&&(M=D,D=void 0),D=D||"");var Z=Io(),ne=x?Z._week.dow:0,ce,je=[];if(M!=null)return em(D,(M+ne)%7,B,"day");for(ce=0;ce<7;ce++)je[ce]=em(D,(ce+ne)%7,B,"day");return je}function yB(x,D){return yN(x,D,"months")}function bB(x,D){return yN(x,D,"monthsShort")}function vB(x,D,M){return Qv(x,D,M,"weekdays")}function _B(x,D,M){return Qv(x,D,M,"weekdaysShort")}function wB(x,D,M){return Qv(x,D,M,"weekdaysMin")}Bi("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(x){var D=x%10,M=nt(x%100/10)===1?"th":D===1?"st":D===2?"nd":D===3?"rd":"th";return x+M}}),r.lang=b("moment.lang is deprecated. Use moment.locale instead.",Bi),r.langData=b("moment.langData is deprecated. Use moment.localeData instead.",Io);var Mo=Math.abs;function xB(){var x=this._data;return this._milliseconds=Mo(this._milliseconds),this._days=Mo(this._days),this._months=Mo(this._months),x.milliseconds=Mo(x.milliseconds),x.seconds=Mo(x.seconds),x.minutes=Mo(x.minutes),x.hours=Mo(x.hours),x.months=Mo(x.months),x.years=Mo(x.years),this}function bN(x,D,M,B){var Z=ks(D,M);return x._milliseconds+=B*Z._milliseconds,x._days+=B*Z._days,x._months+=B*Z._months,x._bubble()}function CB(x,D){return bN(this,x,D,1)}function EB(x,D){return bN(this,x,D,-1)}function vN(x){return x<0?Math.floor(x):Math.ceil(x)}function SB(){var x=this._milliseconds,D=this._days,M=this._months,B=this._data,Z,ne,ce,je,ct;return x>=0&&D>=0&&M>=0||x<=0&&D<=0&&M<=0||(x+=vN(e0(M)+D)*864e5,D=0,M=0),B.milliseconds=x%1e3,Z=Sn(x/1e3),B.seconds=Z%60,ne=Sn(Z/60),B.minutes=ne%60,ce=Sn(ne/60),B.hours=ce%24,D+=Sn(ce/24),ct=Sn(_N(D)),M+=ct,D-=vN(e0(ct)),je=Sn(M/12),M%=12,B.days=D,B.months=M,B.years=je,this}function _N(x){return x*4800/146097}function e0(x){return x*146097/4800}function AB(x){if(!this.isValid())return NaN;var D,M,B=this._milliseconds;if(x=it(x),x==="month"||x==="quarter"||x==="year")switch(D=this._days+B/864e5,M=this._months+_N(D),x){case"month":return M;case"quarter":return M/3;case"year":return M/12}else switch(D=this._days+Math.round(e0(this._months)),x){case"week":return D/7+B/6048e5;case"day":return D+B/864e5;case"hour":return D*24+B/36e5;case"minute":return D*1440+B/6e4;case"second":return D*86400+B/1e3;case"millisecond":return Math.floor(D*864e5)+B;default:throw new Error("Unknown unit "+x)}}function NB(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+nt(this._months/12)*31536e6:NaN}function Lo(x){return function(){return this.as(x)}}var RB=Lo("ms"),PB=Lo("s"),OB=Lo("m"),FB=Lo("h"),DB=Lo("d"),kB=Lo("w"),TB=Lo("M"),IB=Lo("Q"),MB=Lo("y");function LB(){return ks(this)}function zB(x){return x=it(x),this.isValid()?this[x+"s"]():NaN}function el(x){return function(){return this.isValid()?this._data[x]:NaN}}var qB=el("milliseconds"),jB=el("seconds"),$B=el("minutes"),BB=el("hours"),UB=el("days"),YB=el("months"),HB=el("years");function GB(){return Sn(this.days()/7)}var zo=Math.round,pc={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function WB(x,D,M,B,Z){return Z.relativeTime(D||1,!!M,x,B)}function VB(x,D,M,B){var Z=ks(x).abs(),ne=zo(Z.as("s")),ce=zo(Z.as("m")),je=zo(Z.as("h")),ct=zo(Z.as("d")),Lt=zo(Z.as("M")),vr=zo(Z.as("w")),qo=zo(Z.as("y")),Yi=ne<=M.ss&&["s",ne]||ne<M.s&&["ss",ne]||ce<=1&&["m"]||ce<M.m&&["mm",ce]||je<=1&&["h"]||je<M.h&&["hh",je]||ct<=1&&["d"]||ct<M.d&&["dd",ct];return M.w!=null&&(Yi=Yi||vr<=1&&["w"]||vr<M.w&&["ww",vr]),Yi=Yi||Lt<=1&&["M"]||Lt<M.M&&["MM",Lt]||qo<=1&&["y"]||["yy",qo],Yi[2]=D,Yi[3]=+x>0,Yi[4]=B,WB.apply(null,Yi)}function KB(x){return x===void 0?zo:typeof x=="function"?(zo=x,!0):!1}function ZB(x,D){return pc[x]===void 0?!1:D===void 0?pc[x]:(pc[x]=D,x==="s"&&(pc.ss=D-1),!0)}function JB(x,D){if(!this.isValid())return this.localeData().invalidDate();var M=!1,B=pc,Z,ne;return typeof x=="object"&&(D=x,x=!1),typeof x=="boolean"&&(M=x),typeof D=="object"&&(B=Object.assign({},pc,D),D.s!=null&&D.ss==null&&(B.ss=D.s-1)),Z=this.localeData(),ne=VB(this,!M,B,Z),M&&(ne=Z.pastFuture(+this,ne)),Z.postformat(ne)}var t0=Math.abs;function mc(x){return(x>0)-(x<0)||+x}function tm(){if(!this.isValid())return this.localeData().invalidDate();var x=t0(this._milliseconds)/1e3,D=t0(this._days),M=t0(this._months),B,Z,ne,ce,je=this.asSeconds(),ct,Lt,vr,qo;return je?(B=Sn(x/60),Z=Sn(B/60),x%=60,B%=60,ne=Sn(M/12),M%=12,ce=x?x.toFixed(3).replace(/\.?0+$/,""):"",ct=je<0?"-":"",Lt=mc(this._months)!==mc(je)?"-":"",vr=mc(this._days)!==mc(je)?"-":"",qo=mc(this._milliseconds)!==mc(je)?"-":"",ct+"P"+(ne?Lt+ne+"Y":"")+(M?Lt+M+"M":"")+(D?vr+D+"D":"")+(Z||B||x?"T":"")+(Z?qo+Z+"H":"")+(B?qo+B+"M":"")+(x?qo+ce+"S":"")):"P0D"}var _t=Vp.prototype;_t.isValid=U$,_t.abs=xB,_t.add=CB,_t.subtract=EB,_t.as=AB,_t.asMilliseconds=RB,_t.asSeconds=PB,_t.asMinutes=OB,_t.asHours=FB,_t.asDays=DB,_t.asWeeks=kB,_t.asMonths=TB,_t.asQuarters=IB,_t.asYears=MB,_t.valueOf=NB,_t._bubble=SB,_t.clone=LB,_t.get=zB,_t.milliseconds=qB,_t.seconds=jB,_t.minutes=$B,_t.hours=BB,_t.days=UB,_t.weeks=GB,_t.months=YB,_t.years=HB,_t.humanize=JB,_t.toISOString=tm,_t.toString=tm,_t.toJSON=tm,_t.locale=aN,_t.localeData=cN,_t.toIsoString=b("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",tm),_t.lang=lN,J("X",0,0,"unix"),J("x",0,0,"valueOf"),De("x",$p),De("X",vj),Mt("X",function(x,D,M){M._d=new Date(parseFloat(x)*1e3)}),Mt("x",function(x,D,M){M._d=new Date(nt(x))});//! moment.js return r.version="2.29.4",s(Xt),r.fn=we,r.min=q$,r.max=j$,r.now=$$,r.utc=S,r.unix=mB,r.months=yB,r.isDate=f,r.locale=Bi,r.invalid=A,r.duration=ks,r.isMoment=y,r.weekdays=vB,r.parseZone=gB,r.localeData=Io,r.isDuration=Kp,r.monthsShort=bB,r.weekdaysMin=wB,r.defineLocale=Bv,r.updateLocale=g$,r.locales=y$,r.weekdaysShort=_B,r.normalizeUnits=it,r.relativeTimeRounding=KB,r.relativeTimeThreshold=ZB,r.calendarFormat=f6,r.prototype=we,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r})})(SL);var AL=SL.exports;const se=to(AL),F2="/assets/TerresMenu-6dd49071.gif",BK=()=>{const[t,e]=C.useState(!1),[n,r]=C.useState(!1);C.useEffect(()=>{function a(){e(window.innerWidth<=992)}return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]);const s=()=>{r(!n),setTimeout(()=>{const a=document.querySelector(".deslizarMenu");a&&a.scrollTo(0,-1)},0)};C.useEffect(()=>{n?document.body.classList.add("bodyWithOpenMenu"):document.body.classList.remove("bodyWithOpenMenu")},[n]);const o=()=>{window.scrollTo({top:0,behavior:"smooth"})};return p(ee,{children:[n&&i("div",{className:"fondoConMenuAbierto",onClick:()=>r(!1)}),t?i(ae,{style:{height:"auto"},children:i(df,{variant:"secondary",id:"dropdown-menu-align-left",title:n?p(ee,{children:[i(p2,{})," MENÚ"]}):p(ee,{children:[i(p2,{})," MENÚ"]}),onClick:s,drop:"up",style:{position:"fixed",bottom:"0px",left:"0px",zIndex:"999",fontFamily:"Roboto Condensed, sans-serif"},children:p(ae,{children:[p("div",{className:"text-dark menu-container deslizarMenu scrollMenu ",style:{width:"270px",height:"auto"},children:[i("div",{className:"mb-2",style:{marginLeft:-19},children:i(Ge.Item,{as:"a",href:"https://fincamt.com/?utm_source=segundopalo&utm_medium=banner&utm_campaign=terresvinos&utm_id=2&utm_term=vinos+terres&utm_content=terres+menu",target:"_blank",rel:"noopener noreferrer",children:i("img",{src:F2,alt:"Banner Horizontal",className:"anchoImgBannerMenu"})})}),p("p",{className:"text-white text-center ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:17,backgroundColor:"#001c31"},children:[" ",i("span",{className:"mr-2 fw-bolder",children:" DESTACADO "})]}),i(Ge.Item,{as:"a",href:"/premiossegundopalo",className:"row d-flex justify-content-center text-white mt-1",style:{backgroundColor:"#030303",marginLeft:0},children:i("span",{children:i("p",{className:"text-start fw-bolder",style:{color:"#b89552",fontFamily:"poppins",fontWeight:500,backgroundColor:"#030303",margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"PREMIOS FUTURO"})})}),i(Ge.Item,{as:"a",href:"/mundialfutsal",className:"row d-flex justify-content-center text-white mt-1",style:{backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-start fw-bolder",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"UZBEKISTAN 2024"})})}),i(Ge.Item,{as:"a",href:"/primeraa",className:"row d-flex justify-content-center text-white mt-1",style:{backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-start fw-bolder",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:'PRIMERA "A"'})})}),i(Ge.Item,{as:"a",href:"/primerab",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center fw-bolder",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:'PRIMERA "B"'})})}),i(Ge.Item,{as:"a",href:"/primerac",className:"row d-flex justify-content-center text-white mb-1 mt-1",style:{backgroundColor:"#015496",marginLeft:0},children:i("span",{clas:!0,children:i("p",{className:"text-start fw-bolder ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:'PRIMERA "C"'})})}),i(Ge.Item,{as:"a",href:"/futuro",className:"row d-flex justify-content-center text-dark mt-1",style:{backgroundColor:"#f2b700",marginLeft:0},children:i("span",{children:i("p",{className:"text-start fw-bolder",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"SEGUND⚽PALO FUTURO"})})}),i(Ge.Item,{as:"a",href:"/copaargentinafutsal",className:"row d-flex justify-content-center text-white mb-1 mt-1",style:{backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-start fw-bolder ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"COPA ARGENTINA"})})}),i(Ge.Item,{as:"a",href:"/copaargentinafemeninafutsal",className:"row d-flex justify-content-center text-white mb-1 mt-1",style:{backgroundColor:"#350070",marginLeft:0},children:i("span",{clas:!0,children:i("p",{className:"text-start fw-bolder ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"COPA ARGENTINA FEM"})})}),i(Ge.Item,{as:"a",href:"/rankingfifa",className:"row d-flex justify-content-center text-dark mt-1 bg-info",style:{fontSize:20,marginLeft:0},children:i("span",{children:i("p",{className:"text-center fw-bolder",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"RANKING SELECCIONES FIFA"})})}),p("p",{className:"text-white text-center mt-2 bg-dark",style:{fontSize:17},children:["FUTSAL MASCULINO ",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina"})," "]}),i(Ge.Item,{as:"a",href:"/primeraa",className:"row d-flex justify-content-center text-white",style:{backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-start ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:'PRIMERA "A"'})})}),i(Ge.Item,{as:"a",href:"/primerab",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:'PRIMERA "B"'})})}),i(Ge.Item,{as:"a",href:"/primerac",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:'PRIMERA "C"'})})}),i(Ge.Item,{as:"a",href:"/primerad1",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:'PRIMERA "D1"'})})}),i(Ge.Item,{as:"a",href:"/primerad2",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:'PRIMERA "D2"'})})}),i(Ge.Item,{as:"a",href:"/torneointegracion",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"INTEGRACION"})})}),p("p",{className:"text-white text-center mt-2 bg-dark",style:{fontSize:17},children:["FUTSAL FEMENINO ",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina"})," "]}),i(Ge.Item,{as:"a",href:"/primeraafemenino",className:"row d-flex justify-content-center text-white",style:{backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-start ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:'PRIMERA "A"'})})}),i(Ge.Item,{as:"a",href:"/primerabfemenino",className:"row d-flex justify-content-center text-white mt-1",style:{backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-start ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:'PRIMERA "B"'})})}),i(Ge.Item,{as:"a",href:"/primeracfemenino",className:"row d-flex justify-content-center text-white mt-1",style:{backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-start ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:'PRIMERA "C"'})})}),p("p",{className:"text-white text-center mt-2 bg-dark",style:{fontSize:17},children:["INFERIORES ",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina"})," "]}),i(Ge.Item,{as:"a",href:"/futuro",className:"row d-flex justify-content-center text-dark mt-1",style:{backgroundColor:"#f2b700",marginLeft:0},children:i("span",{children:i("p",{className:"text-start fw-bolder",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"SEGUND⚽PALO FUTURO"})})}),i("p",{className:"text-white text-center mt-3 bg-dark",style:{fontSize:17},children:"LIGAS INT. "}),i(Ge.Item,{as:"a",href:"/españafutsal",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:p("p",{className:"text-center",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:["LNFS ",i("img",{className:"me-2",src:"https://flagcdn.com/w20/es.png",srcSet:"https://flagcdn.com/w40/es.png 2x",width:"20",alt:"España",style:{marginLeft:"8px"}})]})})}),p("p",{className:"text-white text-center mt-2 bg-dark",style:{fontSize:17},children:["COPAS ",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina"})," "]}),i(Ge.Item,{as:"a",href:"/copaargentinafutsal",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center fst-italic",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"COPA ARGENTINA"})})}),i(Ge.Item,{as:"a",href:"/copaargentinafemeninafutsal",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#350070",marginLeft:0},children:i("span",{children:i("p",{className:"text-center fst-italic",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"COPA ARGENTINA FEM"})})}),i(Ge.Item,{as:"a",href:"/copalibertadoresfutsal",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center fst-italic",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"LIBERTADORES"})})}),i(Ge.Item,{as:"a",href:"/copalibertadoresfemeninafutsal",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#350070",marginLeft:0},children:i("span",{clas:!0,children:i("p",{className:"text-center fst-italic",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"LIBERTADORES FEM"})})}),i(Ge.Item,{as:"a",href:"/lnfafutsal",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{clas:!0,children:i("p",{className:"text-center fst-italic",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"LNFA"})})}),i(Ge.Item,{as:"a",href:"/copadeorofutsal",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center fst-italic",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"COPA DE ORO"})})}),i(Ge.Item,{as:"a",href:"/copadeplatafutsal",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center fst-italic",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"COPA DE PLATA"})})}),p("p",{className:"text-white text-center bg-dark mt-2",style:{fontSize:17},children:["ARGENLIGA ",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina"})," "]}),i(Ge.Item,{as:"a",href:"/argenligazona1",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:'PRIMERA A "Z1"'})})}),i(Ge.Item,{as:"a",href:"/argenligazona2",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:'PRIMERA A "Z2"'})})}),i(Ge.Item,{as:"a",href:"/argenligabzona1",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:'PRIMERA B "Z1"'})})}),i(Ge.Item,{as:"a",href:"/argenligabzona2",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:'PRIMERA B "Z2"'})})}),p("p",{className:"text-white text-center bg-dark mt-2",style:{fontSize:17},children:["LAAMBA ",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina"})," "]}),i(Ge.Item,{as:"a",href:"/laambaelite",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"ELITE - MASC"})})}),i(Ge.Item,{as:"a",href:"/laambaelitefemenino",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"ELITE - FEM"})})}),p("p",{className:"text-white text-center bg-dark mt-2",style:{fontSize:17},children:["INTERNACIONAL ",i(Ft,{})," "]}),i(Ge.Item,{as:"a",href:"/uruguay",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:p("p",{className:"text-center ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:["LIGA URUGUAYA ",i("img",{style:{margin:2},src:"https://flagcdn.com/w20/uy.png",srcSet:"https://flagcdn.com/w40/uy.png 2x",width:"20",alt:"Uruguay"})]})})}),p("p",{className:"text-white text-center bg-dark mt-2",style:{fontSize:17},children:["CLASIFICACION MUNDIAL ",i(Ft,{})," "]}),i(Ge.Item,{as:"a",href:"/copaamericafutsal",className:"row d-flex justify-content-center text-white",style:{backgroundColor:"#015496",marginLeft:0},children:i("span",{clas:!0,children:i("p",{className:"text-center ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"COPA AMERICA"})})}),i(Ge.Item,{as:"a",href:"/uefaclasificacionmunadialfutsal",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"UEFA"})})}),i(Ge.Item,{as:"a",href:"/copaasiafutsal",className:"row d-flex justify-content-center text-white mt-1",style:{backgroundColor:"#015496",marginLeft:0},children:i("span",{clas:!0,children:i("p",{className:"text-center ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"COPA ASIA"})})}),i(Ge.Item,{as:"a",href:"/copaafricafutsal",className:"row d-flex justify-content-center text-white mt-1",style:{backgroundColor:"#015496",marginLeft:0},children:i("span",{clas:!0,children:i("p",{className:"text-center ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"COPA AFRICA"})})}),i(Ge.Item,{as:"a",href:"/concacaffutsal",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"CONCACAF"})})}),p("p",{className:"text-white text-center bg-dark mt-2",style:{fontSize:17},children:["SELECCIONES ",i(Ft,{})," "]}),i(Ge.Item,{as:"a",href:"/mundialfutsal",className:"row d-flex justify-content-center text-white ",style:{backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-start ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"UZBEKISTAN 2024"})})}),i(Ge.Item,{as:"a",href:"/amistososinternacionalesfutsal",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"AMISTOSOS INT."})})}),p("p",{className:"text-white text-center bg-dark mt-2",style:{fontSize:17},children:["ESTADISTICAS ",i(qd,{})," "]}),i(Ge.Item,{as:"a",href:"/sextafaltasestadisticas",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"SEXTA FALTA"})})}),i(Ge.Item,{as:"a",href:"/origendelosgoles",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"ORIGEN DE LOS GOLES"})})}),p("p",{className:"text-white text-center bg-dark mt-2",style:{fontSize:17},children:["CONVOCATORIAS ",i(O2,{})," "]}),i(Ge.Item,{as:"a",href:"/pruebajugadoresfutsal",className:"row d-flex justify-content-center text-white mt-1",style:{fontSize:20,backgroundColor:"#015496",marginLeft:0},children:i("span",{children:i("p",{className:"text-center ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:17},children:"PRUEBA JUGADORES "})})}),i(Ge.Item,{as:"a",href:"/calendario",className:"row d-flex justify-content-center text-white mt-4 mb-5 bg-dark ",style:{fontSize:20,marginLeft:0},children:i("span",{children:i("p",{className:"text-center ",style:{margin:"auto",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",fontSize:18},children:"CALENDARIO EXTENDIDO "})})})]}),p("div",{className:"text-center",style:{height:"125px"},children:[i("a",{href:"https://www.instagram.com/segundopalo_ok/",target:"_blank",children:i(hw,{style:{color:"black",fontSize:"17px",marginRight:10}})}),i("a",{href:"https://twitter.com/segundopalo_ok/",target:"_blank",children:i(pw,{style:{color:"black",fontSize:"17px"}})}),i(Ge.Item,{as:ve,to:"/legales",children:i("p",{style:{fontSize:12,color:"black"},children:"Legal-Privacidad"})}),i("p",{style:{fontSize:12},children:"info©segundopalo.com.ar"}),i("p",{className:"",style:{fontSize:10,color:"black"},children:"© 2023 SEGUNDOPALO "})]})]})})}):p(mo,{collapseOnSelect:!0,className:"navVertical menuEscritorio",children:[i(mo.Toggle,{"aria-controls":"responsive-navbar-nav"}),i(mo.Collapse,{className:"responsive-navbar-nav",children:p(ul,{className:"flex-column navItems text-center",children:[i("div",{className:"mb-2",children:i("a",{href:"https://fincamt.com/?utm_source=segundopalo&utm_medium=banner&utm_campaign=terresvinos&utm_id=2&utm_term=vinos+terres&utm_content=terres+menu",target:"_blank",rel:"noopener noreferrer",children:i("img",{src:F2,alt:"Banner Horizontal",width:150})})}),p("p",{className:"text-white ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,backgroundColor:"#001c31"},children:[" ",i(KW,{className:"fw-bolder"}),i("span",{className:"mr-2 fw-bolder",children:" DESTACADO "})]}),i(ve,{to:"/premiossegundopalo",className:"bgNavItems fw-bolder mb-1 ",style:{color:"#b89552",fontFamily:"poppins",fontSize:14,backgroundColor:"#030303"},children:"PREMIOS FUTURO"}),i(ve,{to:"/mundialfutsal",className:"bgNavItems text-white fw-bolder mb-1 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},children:"UZBEKISTAN 2024"}),i(ve,{to:"/primeraa",className:"bgNavItems fw-bolder text-white mb-1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},children:'PRIMERA "A"'}),i(ve,{to:"/primerab",className:"bgNavItems text-white fw-bolder mb-1 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},children:'PRIMERA "B"'}),i(ve,{to:"/primerac",className:"bgNavItems fw-bolder text-white mb-1 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},children:'PRIMERA "C"'}),i(ve,{to:"/futuro",className:" fw-bolder text-dark mb-1 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,backgroundColor:"#f2b700"},children:"SEGUND⚽PALO- FUTURO"}),i(ve,{to:"/copaargentinafutsal",className:"bgNavItems text-white fw-bolder mb-1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},children:"COPA ARGENTINA"}),i(ve,{to:"/copaargentinafemeninafutsal",className:"text-white fw-bolder mb-1 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,backgroundColor:"#350070"},onClick:o,children:"COPA ARGENTINA FEM"}),i(ve,{to:"/rankingfifa",className:"bgNavItems bg-info text-dark fw-bolder mb-2 mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:"RANKING SELECCIONES FIFA"}),p("p",{className:"text-white mt-3 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,backgroundColor:"#001c31"},children:["FUTSAL MASCULINO ",i("img",{className:"mb-1",src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"15",alt:"Argentina"})," "]}),i(ve,{to:"/primeraa",className:"bgNavItems text-white",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:'PRIMERA "A"'}),i(ve,{to:"/primerab",className:"bgNavItems text-white mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:'PRIMERA "B"'}),i(ve,{to:"/primerac",className:"bgNavItems text-white mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:'PRIMERA "C" '}),i(ve,{to:"/primerad1",className:"bgNavItems text-white mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:'PRIMERA "D1"'}),i(ve,{to:"/primerad2",className:"bgNavItems text-white mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:'PRIMERA "D2"'}),i(ve,{to:"/torneointegracion",className:"bgNavItems text-white mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},children:"INTEGRACION"}),p("p",{className:"text-white mt-3 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,backgroundColor:"#001c31"},children:["FUTSAL FEMENINO ",i("img",{className:"mb-1",src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"15",alt:"Argentina"})," "]}),i(ve,{to:"/primeraafemenino",className:"bgNavItems text-white",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:'PRIMERA "A"'}),i(ve,{to:"/primerabfemenino",className:"bgNavItems text-white mt-1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:'PRIMERA "B"'}),i(ve,{to:"/primeracfemenino",className:"bgNavItems text-white mt-1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:'PRIMERA "C"'}),p("p",{className:"text-white mt-3 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,backgroundColor:"#001c31"},children:["INFERIORES ",i("img",{className:"mb-1",src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"15",alt:"Argentina"})," "]}),i(ve,{to:"/futuro",className:" fw-bolder text-dark mb-1 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,backgroundColor:"#f2b700"},children:"SEGUND⚽PALO- FUTURO"}),i("p",{className:"text-white mt-3 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,backgroundColor:"#001c31"},children:"LIGAS INT. "}),p(ve,{to:"/españafutsal",className:"bgNavItems text-white ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:["LNFS ",i("img",{className:"mb-1",src:"https://flagcdn.com/w20/es.png",srcSet:"https://flagcdn.com/w40/es.png 2x",width:"15",alt:"España"})]}),p("p",{className:"text-white mt-3 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,backgroundColor:"#001c31"},children:[i("span",{className:"mr-2",children:" COPAS "}),i("img",{className:"mb-1",src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"15",alt:"Argentina"})," "]}),i(ve,{to:"/copaargentinafutsal",className:"bgNavItems text-white fst-italic mb-1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:"COPA ARGENTINA"}),i(ve,{to:"/copaargentinafemeninafutsal",className:"bgNavItems fw-bolder text-white fst-italic mb-1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,backgroundColor:"#350070"},onClick:o,children:"COPA ARGENTINA FEM"}),i(ve,{to:"/copalibertadoresfutsal",className:"bgNavItems text-white fst-italic mb-1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:"LIBERTADORES"}),i(ve,{to:"/copalibertadoresfemeninafutsal",className:"fw-bolder text-white fst-italic mb-1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,backgroundColor:"#350070"},onClick:o,children:"LIBERTADORES FEM"}),i(ve,{to:"/lnfafutsal",className:"bgNavItems text-white fst-italic mb-1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:"LNFA"}),i(ve,{to:"/copadeorofutsal",className:"bgNavItems text-white fst-italic mb-1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:"COPA DE ORO"}),i(ve,{to:"/copadeplatafutsal",className:"bgNavItems text-white fst-italic mb-1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:"COPA DE PLATA"}),i(ve,{to:"/supercopamasculinofutsal",className:"bgNavItems text-white fst-italic mb-4",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:"SUPERCOPA MASC"}),p("p",{className:"text-white ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,backgroundColor:"#001c31"},children:["ARGENLIGA ",i("img",{className:"mb-1",src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"15",alt:"Argentina"})]}),i(ve,{to:"/argenligazona1",className:"bgNavItems text-white",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:'PRIMERA A "Z1"'}),i(ve,{to:"/argenligazona2",className:"bgNavItems text-white mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:'PRIMERA A "Z2""'}),i(ve,{to:"/argenligabzona1",className:"bgNavItems text-white mt-2",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:'PRIMERA B "Z1"'}),i(ve,{to:"/argenligabzona2",className:"bgNavItems text-white mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:'PRIMERA B "Z2""'}),p("p",{className:"text-white mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,backgroundColor:"#001c31"},children:["LAAMBA ",i("img",{className:"mb-1",src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"15",alt:"Argentina"})," "]}),i(ve,{to:"/laambaelite",className:"bgNavItems text-white",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:"Elite - MASC"}),i(ve,{to:"/laambaelitefemenino",className:"bgNavItems text-white mt-1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:"Elite - FEM"}),p("p",{className:"text-white mt-3 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,backgroundColor:"#001c31"},children:[p("span",{className:"mr-2",children:[" INTERNACIONAL ",i(Ft,{})," "]})," "]}),p(ve,{to:"/uruguay",className:"bgNavItems text-white mt-1 mb-4",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,marginTop:"-18px"},onClick:o,children:["LIGA URUGUAYA ",i("img",{style:{margin:2},src:"https://flagcdn.com/w20/uy.png",srcSet:"https://flagcdn.com/w40/uy.png 2x",width:"15",alt:"Uruguay"})," "]}),p("p",{className:"text-white ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,backgroundColor:"#001c31"},children:[p("span",{className:"mr-2",children:[" CLASIFICACION MUNDIAL",i(Ft,{})," "]})," "]}),i(ve,{to:"/copaamericafutsal",className:"bgNavItems text-white mt-1 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,marginTop:"-18px"},onClick:o,children:"COPA AMERICA "}),i(ve,{to:"/uefaclasificacionmunadialfutsal",className:"bgNavItems text-white mt-1 mb-4",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,marginTop:"-18px"},onClick:o,children:"UEFA "}),i(ve,{to:"/copaasiafutsal",className:"bgNavItems text-white mb-4",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,marginTop:"-18px"},onClick:o,children:"COPA ASIA "}),i(ve,{to:"/copaafricafutsal",className:"bgNavItems text-white mb-4",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,marginTop:"-18px"},onClick:o,children:"COPA AFRICA "}),i(ve,{to:"/concacaffutsal",className:"bgNavItems text-white mb-3",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,marginTop:"-18px"},onClick:o,children:"CONCACAF "}),p("p",{className:"text-white ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,backgroundColor:"#001c31"},children:[i("span",{className:"mr-2",children:" SELECCIONES "})," ",i(Ft,{})," "]}),i(ve,{to:"/mundialfutsal",className:"bgNavItems text-white mb-1 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14},onClick:o,children:"UZBEKISTAN 2024"}),i(ve,{to:"/amistososinternacionalesfutsal",className:"bgNavItems text-white mt-1 mb-4",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,marginTop:"-18px"},onClick:o,children:"AMISTOSOS INT."}),p("p",{className:"text-white ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,backgroundColor:"#001c31"},children:[p("span",{className:"mr-2",children:[" ESTADISTICAS",i(qd,{style:{marginLeft:"5px"}})," "]})," "]}),i(ve,{to:"/sextafaltasestadisticas",className:"bgNavItems text-white mt-1 mb-4",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,marginTop:"-18px"},onClick:o,children:"SEXTA FALTA "}),i(ve,{to:"/origendelosgoles",className:"bgNavItems text-white mb-4",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,marginTop:"-18px"},onClick:o,children:"ORIGEN DE LOS GOLES "}),p("p",{className:"text-white ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:15,backgroundColor:"#001c31"},children:[p("span",{className:"mr-2",children:[" CONVOCATORIAS",i(O2,{style:{marginLeft:"5px"}})," "]})," "]}),i(ve,{to:"/pruebajugadoresfutsal",className:"bgNavItems text-white mt-1 mb-4",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:14,marginTop:"-18px"},onClick:o,children:"PRUEBA JUGADORES "}),i(ve,{cl:!0,to:"/calendario",style:{fontFamily:"Roboto Condensed, sans-serif"},children:i("button",{className:" m-1 btn text-white fw-bolder btn-sm bgNavItems mb-3 ",style:{fontSize:11},onClick:o,children:"CALENDARIO EXTENDIDO"})}),p("div",{className:" mb-3 ",children:[i("a",{href:"https://www.instagram.com/segundopalo_ok/",target:"_blank",children:i(hw,{style:{color:"white",fontSize:"32px"}})}),i("a",{href:"https://twitter.com/segundopalo_ok/",target:"_blank",children:i(pw,{style:{color:"white",fontSize:"32px",marginLeft:10}})})]}),p("div",{children:[i(ve,{to:"/legales",style:{fontSize:12,color:"white"},onClick:o,children:"Legales"}),i("p",{className:"text-dark",style:{fontSize:12},children:"info©segundopalo.com.ar "}),i("p",{style:{fontSize:10},children:"© 2023 SEGUNDOPALO "})]})]})})]})]})};function UK(t){return t&&typeof t=="object"&&"default"in t?t.default:t}var NL=C,YK=UK(NL);function D2(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function HK(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var GK=!!(typeof window<"u"&&window.document&&window.document.createElement);function WK(t,e,n){if(typeof t!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof e!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof n<"u"&&typeof n!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function r(s){return s.displayName||s.name||"Component"}return function(o){if(typeof o!="function")throw new Error("Expected WrappedComponent to be a React component.");var a=[],l;function c(){l=t(a.map(function(u){return u.props})),d.canUseDOM?e(l):n&&(l=n(l))}var d=function(u){HK(f,u);function f(){return u.apply(this,arguments)||this}f.peek=function(){return l},f.rewind=function(){if(f.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var S=l;return l=void 0,a=[],S};var g=f.prototype;return g.UNSAFE_componentWillMount=function(){a.push(this),c()},g.componentDidUpdate=function(){c()},g.componentWillUnmount=function(){var S=a.indexOf(this);a.splice(S,1),c()},g.render=function(){return YK.createElement(o,this.props)},f}(NL.PureComponent);return D2(d,"displayName","SideEffect("+r(o)+")"),D2(d,"canUseDOM",GK),d}}var VK=WK;const KK=to(VK);var ZK=typeof Element<"u",JK=typeof Map=="function",XK=typeof Set=="function",QK=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function vg(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,s;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!vg(t[r],e[r]))return!1;return!0}var o;if(JK&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o=t.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;for(o=t.entries();!(r=o.next()).done;)if(!vg(r.value[1],e.get(r.value[0])))return!1;return!0}if(XK&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o=t.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(QK&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[r]))return!1;if(ZK&&t instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&t.$$typeof)&&!vg(t[s[r]],e[s[r]]))return!1;return!0}return t!==t&&e!==e}var PE=function(e,n){try{return vg(e,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const eZ=to(PE);/* object-assign (c) Sindre Sorhus @license MIT */var k2=Object.getOwnPropertySymbols,tZ=Object.prototype.hasOwnProperty,nZ=Object.prototype.propertyIsEnumerable;function rZ(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function sZ(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(o){return e[o]});if(r.join("")!=="0123456789")return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach(function(o){s[o]=o}),Object.keys(Object.assign({},s)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var oZ=sZ()?Object.assign:function(t,e){for(var n,r=rZ(t),s,o=1;o<arguments.length;o++){n=Object(arguments[o]);for(var a in n)tZ.call(n,a)&&(r[a]=n[a]);if(k2){s=k2(n);for(var l=0;l<s.length;l++)nZ.call(n,s[l])&&(r[s[l]]=n[s[l]])}}return r};const iZ=to(oZ);var Ol={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},rt={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(rt).map(function(t){return rt[t]});var un={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src",TARGET:"target"},my={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},xh={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},aZ=Object.keys(my).reduce(function(t,e){return t[my[e]]=e,t},{}),lZ=[rt.NOSCRIPT,rt.SCRIPT,rt.STYLE],Bs="data-react-helmet",cZ=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},dZ=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},uZ=function(){function t(e,n){for(var r=0;r<n.length;r++){var s=n[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Dr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},fZ=function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},T2=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},hZ=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t},vw=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},pZ=function(e){var n=hd(e,rt.TITLE),r=hd(e,xh.TITLE_TEMPLATE);if(r&&n)return r.replace(/%s/g,function(){return Array.isArray(n)?n.join(""):n});var s=hd(e,xh.DEFAULT_TITLE);return n||s||void 0},mZ=function(e){return hd(e,xh.ON_CHANGE_CLIENT_STATE)||function(){}},B0=function(e,n){return n.filter(function(r){return typeof r[e]<"u"}).map(function(r){return r[e]}).reduce(function(r,s){return Dr({},r,s)},{})},gZ=function(e,n){return n.filter(function(r){return typeof r[rt.BASE]<"u"}).map(function(r){return r[rt.BASE]}).reverse().reduce(function(r,s){if(!r.length)for(var o=Object.keys(s),a=0;a<o.length;a++){var l=o[a],c=l.toLowerCase();if(e.indexOf(c)!==-1&&s[c])return r.concat(s)}return r},[])},ju=function(e,n,r){var s={};return r.filter(function(o){return Array.isArray(o[e])?!0:(typeof o[e]<"u"&&_Z("Helmet: "+e+' should be of type "Array". Instead found type "'+cZ(o[e])+'"'),!1)}).map(function(o){return o[e]}).reverse().reduce(function(o,a){var l={};a.filter(function(g){for(var E=void 0,S=Object.keys(g),w=0;w<S.length;w++){var _=S[w],h=_.toLowerCase();n.indexOf(h)!==-1&&!(E===un.REL&&g[E].toLowerCase()==="canonical")&&!(h===un.REL&&g[h].toLowerCase()==="stylesheet")&&(E=h),n.indexOf(_)!==-1&&(_===un.INNER_HTML||_===un.CSS_TEXT||_===un.ITEM_PROP)&&(E=_)}if(!E||!g[E])return!1;var m=g[E].toLowerCase();return s[E]||(s[E]={}),l[E]||(l[E]={}),s[E][m]?!1:(l[E][m]=!0,!0)}).reverse().forEach(function(g){return o.push(g)});for(var c=Object.keys(l),d=0;d<c.length;d++){var u=c[d],f=iZ({},s[u],l[u]);s[u]=f}return o},[]).reverse()},hd=function(e,n){for(var r=e.length-1;r>=0;r--){var s=e[r];if(s.hasOwnProperty(n))return s[n]}return null},yZ=function(e){return{baseTag:gZ([un.HREF,un.TARGET],e),bodyAttributes:B0(Ol.BODY,e),defer:hd(e,xh.DEFER),encode:hd(e,xh.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:B0(Ol.HTML,e),linkTags:ju(rt.LINK,[un.REL,un.HREF],e),metaTags:ju(rt.META,[un.NAME,un.CHARSET,un.HTTPEQUIV,un.PROPERTY,un.ITEM_PROP],e),noscriptTags:ju(rt.NOSCRIPT,[un.INNER_HTML],e),onChangeClientState:mZ(e),scriptTags:ju(rt.SCRIPT,[un.SRC,un.INNER_HTML],e),styleTags:ju(rt.STYLE,[un.CSS_TEXT],e),title:pZ(e),titleAttributes:B0(Ol.TITLE,e)}},_w=function(){var t=Date.now();return function(e){var n=Date.now();n-t>16?(t=n,e(n)):setTimeout(function(){_w(e)},0)}}(),I2=function(e){return clearTimeout(e)},bZ=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||_w:global.requestAnimationFrame||_w,vZ=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||I2:global.cancelAnimationFrame||I2,_Z=function(e){return console&&typeof console.warn=="function"&&console.warn(e)},$u=null,wZ=function(e){$u&&vZ($u),e.defer?$u=bZ(function(){M2(e,function(){$u=null})}):(M2(e),$u=null)},M2=function(e,n){var r=e.baseTag,s=e.bodyAttributes,o=e.htmlAttributes,a=e.linkTags,l=e.metaTags,c=e.noscriptTags,d=e.onChangeClientState,u=e.scriptTags,f=e.styleTags,g=e.title,E=e.titleAttributes;ww(rt.BODY,s),ww(rt.HTML,o),xZ(g,E);var S={baseTag:Ec(rt.BASE,r),linkTags:Ec(rt.LINK,a),metaTags:Ec(rt.META,l),noscriptTags:Ec(rt.NOSCRIPT,c),scriptTags:Ec(rt.SCRIPT,u),styleTags:Ec(rt.STYLE,f)},w={},_={};Object.keys(S).forEach(function(h){var m=S[h],A=m.newTags,k=m.oldTags;A.length&&(w[h]=A),k.length&&(_[h]=S[h].oldTags)}),n&&n(),d(e,w,_)},RL=function(e){return Array.isArray(e)?e.join(""):e},xZ=function(e,n){typeof e<"u"&&document.title!==e&&(document.title=RL(e)),ww(rt.TITLE,n)},ww=function(e,n){var r=document.getElementsByTagName(e)[0];if(r){for(var s=r.getAttribute(Bs),o=s?s.split(","):[],a=[].concat(o),l=Object.keys(n),c=0;c<l.length;c++){var d=l[c],u=n[d]||"";r.getAttribute(d)!==u&&r.setAttribute(d,u),o.indexOf(d)===-1&&o.push(d);var f=a.indexOf(d);f!==-1&&a.splice(f,1)}for(var g=a.length-1;g>=0;g--)r.removeAttribute(a[g]);o.length===a.length?r.removeAttribute(Bs):r.getAttribute(Bs)!==l.join(",")&&r.setAttribute(Bs,l.join(","))}},Ec=function(e,n){var r=document.head||document.querySelector(rt.HEAD),s=r.querySelectorAll(e+"["+Bs+"]"),o=Array.prototype.slice.call(s),a=[],l=void 0;return n&&n.length&&n.forEach(function(c){var d=document.createElement(e);for(var u in c)if(c.hasOwnProperty(u))if(u===un.INNER_HTML)d.innerHTML=c.innerHTML;else if(u===un.CSS_TEXT)d.styleSheet?d.styleSheet.cssText=c.cssText:d.appendChild(document.createTextNode(c.cssText));else{var f=typeof c[u]>"u"?"":c[u];d.setAttribute(u,f)}d.setAttribute(Bs,"true"),o.some(function(g,E){return l=E,d.isEqualNode(g)})?o.splice(l,1):a.push(d)}),o.forEach(function(c){return c.parentNode.removeChild(c)}),a.forEach(function(c){return r.appendChild(c)}),{oldTags:o,newTags:a}},PL=function(e){return Object.keys(e).reduce(function(n,r){var s=typeof e[r]<"u"?r+'="'+e[r]+'"':""+r;return n?n+" "+s:s},"")},CZ=function(e,n,r,s){var o=PL(r),a=RL(n);return o?"<"+e+" "+Bs+'="true" '+o+">"+vw(a,s)+"</"+e+">":"<"+e+" "+Bs+'="true">'+vw(a,s)+"</"+e+">"},EZ=function(e,n,r){return n.reduce(function(s,o){var a=Object.keys(o).filter(function(d){return!(d===un.INNER_HTML||d===un.CSS_TEXT)}).reduce(function(d,u){var f=typeof o[u]>"u"?u:u+'="'+vw(o[u],r)+'"';return d?d+" "+f:f},""),l=o.innerHTML||o.cssText||"",c=lZ.indexOf(e)===-1;return s+"<"+e+" "+Bs+'="true" '+a+(c?"/>":">"+l+"</"+e+">")},"")},OL=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(e).reduce(function(r,s){return r[my[s]||s]=e[s],r},n)},SZ=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(e).reduce(function(r,s){return r[aZ[s]||s]=e[s],r},n)},AZ=function(e,n,r){var s,o=(s={key:n},s[Bs]=!0,s),a=OL(r,o);return[Fe.createElement(rt.TITLE,a,n)]},NZ=function(e,n){return n.map(function(r,s){var o,a=(o={key:s},o[Bs]=!0,o);return Object.keys(r).forEach(function(l){var c=my[l]||l;if(c===un.INNER_HTML||c===un.CSS_TEXT){var d=r.innerHTML||r.cssText;a.dangerouslySetInnerHTML={__html:d}}else a[c]=r[l]}),Fe.createElement(e,a)})},jo=function(e,n,r){switch(e){case rt.TITLE:return{toComponent:function(){return AZ(e,n.title,n.titleAttributes)},toString:function(){return CZ(e,n.title,n.titleAttributes,r)}};case Ol.BODY:case Ol.HTML:return{toComponent:function(){return OL(n)},toString:function(){return PL(n)}};default:return{toComponent:function(){return NZ(e,n)},toString:function(){return EZ(e,n,r)}}}},FL=function(e){var n=e.baseTag,r=e.bodyAttributes,s=e.encode,o=e.htmlAttributes,a=e.linkTags,l=e.metaTags,c=e.noscriptTags,d=e.scriptTags,u=e.styleTags,f=e.title,g=f===void 0?"":f,E=e.titleAttributes;return{base:jo(rt.BASE,n,s),bodyAttributes:jo(Ol.BODY,r,s),htmlAttributes:jo(Ol.HTML,o,s),link:jo(rt.LINK,a,s),meta:jo(rt.META,l,s),noscript:jo(rt.NOSCRIPT,c,s),script:jo(rt.SCRIPT,d,s),style:jo(rt.STYLE,u,s),title:jo(rt.TITLE,{title:g,titleAttributes:E},s)}},RZ=function(e){var n,r;return r=n=function(s){fZ(o,s);function o(){return dZ(this,o),hZ(this,s.apply(this,arguments))}return o.prototype.shouldComponentUpdate=function(l){return!eZ(this.props,l)},o.prototype.mapNestedChildrenToProps=function(l,c){if(!c)return null;switch(l.type){case rt.SCRIPT:case rt.NOSCRIPT:return{innerHTML:c};case rt.STYLE:return{cssText:c}}throw new Error("<"+l.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},o.prototype.flattenArrayTypeChildren=function(l){var c,d=l.child,u=l.arrayTypeChildren,f=l.newChildProps,g=l.nestedChildren;return Dr({},u,(c={},c[d.type]=[].concat(u[d.type]||[],[Dr({},f,this.mapNestedChildrenToProps(d,g))]),c))},o.prototype.mapObjectTypeChildren=function(l){var c,d,u=l.child,f=l.newProps,g=l.newChildProps,E=l.nestedChildren;switch(u.type){case rt.TITLE:return Dr({},f,(c={},c[u.type]=E,c.titleAttributes=Dr({},g),c));case rt.BODY:return Dr({},f,{bodyAttributes:Dr({},g)});case rt.HTML:return Dr({},f,{htmlAttributes:Dr({},g)})}return Dr({},f,(d={},d[u.type]=Dr({},g),d))},o.prototype.mapArrayTypeChildrenToProps=function(l,c){var d=Dr({},c);return Object.keys(l).forEach(function(u){var f;d=Dr({},d,(f={},f[u]=l[u],f))}),d},o.prototype.warnOnInvalidChildren=function(l,c){return!0},o.prototype.mapChildrenToProps=function(l,c){var d=this,u={};return Fe.Children.forEach(l,function(f){if(!(!f||!f.props)){var g=f.props,E=g.children,S=T2(g,["children"]),w=SZ(S);switch(d.warnOnInvalidChildren(f,E),f.type){case rt.LINK:case rt.META:case rt.NOSCRIPT:case rt.SCRIPT:case rt.STYLE:u=d.flattenArrayTypeChildren({child:f,arrayTypeChildren:u,newChildProps:w,nestedChildren:E});break;default:c=d.mapObjectTypeChildren({child:f,newProps:c,newChildProps:w,nestedChildren:E});break}}}),c=this.mapArrayTypeChildrenToProps(u,c),c},o.prototype.render=function(){var l=this.props,c=l.children,d=T2(l,["children"]),u=Dr({},d);return c&&(u=this.mapChildrenToProps(c,u)),Fe.createElement(e,u)},uZ(o,null,[{key:"canUseDOM",set:function(l){e.canUseDOM=l}}]),o}(Fe.Component),n.propTypes={base:Ue.object,bodyAttributes:Ue.object,children:Ue.oneOfType([Ue.arrayOf(Ue.node),Ue.node]),defaultTitle:Ue.string,defer:Ue.bool,encodeSpecialCharacters:Ue.bool,htmlAttributes:Ue.object,link:Ue.arrayOf(Ue.object),meta:Ue.arrayOf(Ue.object),noscript:Ue.arrayOf(Ue.object),onChangeClientState:Ue.func,script:Ue.arrayOf(Ue.object),style:Ue.arrayOf(Ue.object),title:Ue.string,titleAttributes:Ue.object,titleTemplate:Ue.string},n.defaultProps={defer:!0,encodeSpecialCharacters:!0},n.peek=e.peek,n.rewind=function(){var s=e.rewind();return s||(s=FL({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),s},r},PZ=function(){return null},OZ=KK(yZ,wZ,FL)(PZ),Xe=RZ(OZ);Xe.renderStatic=Xe.rewind;const FZ=()=>p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO FUTSAL AFA - LEGALES-"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera A: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),i(ae,{className:"tamañoTorneo mt-5 mb-5",style:{backgroundColor:"#001c31"},children:p("div",{className:"container text-center",children:[i("h1",{className:"text-center text-white",style:{fontFamily:"Roboto Condensed, sans-serif"},children:"SEGUND⚽PALO"}),i("div",{className:"row",children:i("div",{className:"col",children:p("u",{className:"text-white",children:[i("h4",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:"POLÍTICA DE PRIVACIDAD"}),i("h4",{style:{fontFamily:"Roboto Condensed, sans-serif mt-2"},children:"Legales"})]})})}),i("div",{className:"row",children:p("div",{className:"col-12 col-sm-12 text-center text-white",children:[i("p",{style:{fontSize:15,backgroundColor:"#0e94ff",fontFamily:"Roboto Condensed, sans-serif"},children:" 1- Segundopalo.com.ar no guarda ni utiliza los correos electrónicos de sus usuarios para enviar spam ni comparte información con terceros. Todas las actualizaciones son anunciadas en las redes sociales en las que participa (Twitter, Instagram)."}),i("p",{style:{fontSize:15,backgroundColor:"#0e94ff",fontFamily:"Roboto Condensed, sans-serif"},children:"2- Los partidos en línea y los videos resumen vinculados desde Segundopalo son transmisiones/videos de dominio público de plataformas públicas -por ejemplo, Youtube/Facebook-."}),i("p",{style:{fontSize:15,backgroundColor:"#0e94ff",fontFamily:"Roboto Condensed, sans-serif"},children:"3-La información en Segundopalo.com.ar puede ser compartida libremente, incluidas las capturas de pantalla, siempre y cuando se cite la fuente."})]})}),i("div",{className:"row",children:i("div",{className:"col",children:i("u",{className:"text-white",children:i("h4",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:"Privacidad"})})})}),i("div",{className:"row",children:p("div",{className:"col text-white",children:[i("p",{style:{fontSize:15,backgroundColor:"#0e94ff",fontFamily:"Roboto Condensed, sans-serif"},children:"1-En Segundopalo.com.ar, valoramos su privacidad. No requerimos ningún tipo de autenticación ni recopilamos información personal de nuestros visitantes para la visualización de nuestra plataforma. Solo solicitamos registro e inicio de sesión para aquellos usuarios que deseen postear en nuestro foro, esto con el fin de identificar al usuario. No vendemos ni compartimos información personal con terceros. Si tiene alguna pregunta o inquietud sobre nuestras políticas de privacidad, no dude en ponerse en contacto con nosotros."}),i("p",{style:{fontSize:15,backgroundColor:"#0e94ff",fontFamily:"Roboto Condensed, sans-serif"},children:"2-En Segundopalo.com.ar, utilizamos cookies para recopilar información estadística sobre el tráfico en nuestro sitio web. Una cookie es un pequeño archivo de texto que se guarda en su dispositivo cuando visita un sitio web, y que permite al sitio reconocer su dispositivo en su próxima visita. La información recopilada a través de cookies se utiliza únicamente para analizar el tráfico en nuestro sitio web y mejorar la experiencia del usuario. Una vez recopilada y analizada, la información se elimina de forma permanente. Si desea deshabilitar las cookies en su navegador, puede hacerlo siguiendo las instrucciones del fabricante del navegador. Sin embargo, tenga en cuenta que algunas funciones de nuestro sitio web pueden verse afectadas si deshabilita las cookies."}),i("p",{style:{fontSize:15,backgroundColor:"#0e94ff",fontFamily:"Roboto Condensed, sans-serif"},children:"3-En Segundopalo.com.ar, nos comprometemos a proteger su privacidad y a no vender ni distribuir su información personal a terceros sin su consentimiento. Sin embargo, puede haber casos en los que seamos requeridos por ley a proporcionar información a las autoridades. En esos casos, seguiremos las leyes y regulaciones aplicables."}),i("p",{style:{fontSize:15,backgroundColor:"#0e94ff",fontFamily:"Roboto Condensed, sans-serif"},children:"4-Tengan en cuenta que nos reservamos el derecho de modificar esta política de privacidad en cualquier momento. Si realizamos cambios significativos en nuestra política, le notificaremos mediante un aviso en nuestro sitio web.Le recomendamos revisar esta política de privacidad periódicamente para estar al tanto de cualquier cambio."}),i("br",{})]})})]})})]}),DZ="/assets/error404-a7ab77f4.png",kZ=()=>i(ae,{className:"tamañoTorneo",children:i(V,{children:i($,{style:{display:"flex",justifyContent:"center"},children:i("img",{src:DZ,alt:"Error 404",width:400,className:"img-fluid"})})})}),TZ=({dataEquipos:t,dataFixture:e})=>{const s=(o=>{const a=o.reduce((l,c)=>{const d=c.llavePlayOff;return l[d]||(l[d]=[]),l[d].push(c),l},{});return Object.entries(a).map(([l,c])=>({llave:l,partidos:c}))})(e||[]);return i(ee,{children:i(ae,{className:"bracket-container",children:i(ae,{className:"bracket",children:i(V,{children:p($,{children:[p("div",{className:"round quarterfinals",children:[p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="1"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="2"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]}),p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="3"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="4"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})]}),i("div",{className:"round semifinals",children:p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="5"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="6"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})}),i("div",{className:"round finals",children:i("div",{className:"winners",children:i("div",{className:"matchups",children:i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="7"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))})})})})]})})})})})},Vt=({goleadores:t,dataEquipos:e})=>{const n=t||[],r=e||[];return i(ee,{children:p(ae,{className:"mt-3 mb-5",children:[i(V,{children:p($,{children:[i("h6",{className:"text-white text-center",style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:"20"},children:"Goleadores"}),p(Ie,{bordered:!0,size:"sm",children:[i("thead",{children:p("tr",{className:"text-white text-center",style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:12,backgroundColor:"#001c31"},children:[i("th",{children:"Jugador"}),i("th",{children:"Goles"})]})}),i("tbody",{children:n.sort((s,o)=>o.goles-s.goles).slice(0,12).map((s,o)=>{const a=r.find(l=>l.nombre===s.equipo);return p("tr",{children:[p("td",{className:"text-dark text-center fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12,display:"flex",justifyContent:"start"},children:[a&&i("img",{src:a.escudos,alt:a.nombre,style:{marginRight:"10px",width:"15px",height:"15px"}}),s.nombre," (",s.equipo,")"]}),i("td",{className:"text-dark text-center fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:s.goles})]},o)})})]})]})}),i(V,{children:i($,{children:i("p",{className:"text-white text-start fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"13px",transform:"skewX(-20deg)"},children:"*La tabla de goleadores no se actualiza en tiempo real"})})}),t.some(s=>s.torneo!=="MUNDIAL")&&i(V,{children:i($,{children:i("a",{href:"/formulariogoleadores",style:{color:"white",textDecoration:"underline"},children:i("p",{className:"text-white text-start fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"16px",transform:"skewX(-20deg)"},children:"Ayudanos a completar la tabla de goleadores - Aquí"})})})})]})})};function gy(t){return gy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gy(t)}function Am(t,e,n,r){if(gy(n)!==r)throw new TypeError("Invalid prop '".concat(e,"' of type '").concat(gy(n),"' supplied to '").concat(t,"', expected '").concat(r,"'."))}function IZ(t,e){e===void 0&&(e={});var n=e.insertAt;if(t&&typeof document<"u"){var r=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",n==="top"&&r.firstChild?r.insertBefore(s,r.firstChild):r.appendChild(s),s.styleSheet?s.styleSheet.cssText=t:s.appendChild(document.createTextNode(t))}}var MZ="Ring-module_container__1mCd7";function Ee(t){var e=t.size,n=e===void 0?40:e,r=t.color,s=r===void 0?"black":r,o=t.lineWeight,a=o===void 0?5:o,l=t.speed,c=l===void 0?2:l;return Am("Ring","size",n,"number"),Am("Ring","color",s,"string"),Am("Ring","lineWeight",a,"number"),Am("Ring","speed",c,"number"),Fe.createElement("svg",{height:n,width:n,className:MZ,viewBox:"25 25 50 50",style:{"--uib-size":n+"px","--uib-color":s,"--uib-speed":c+"s"}},Fe.createElement("circle",{cx:"50",cy:"50",r:"20",strokeWidth:a}))}IZ(".Ring-module_container__1mCd7{animation:Ring-module_rotate__RBwLl var(--uib-speed) linear infinite;height:var(--uib-size);transform-origin:center;vertical-align:middle;width:var(--uib-size);will-change:transform}.Ring-module_container__1mCd7 circle{fill:none;stroke:var(--uib-color);stroke-dasharray:1,200;stroke-dashoffset:0;stroke-linecap:round;animation:Ring-module_stretch__L-1Qd calc(var(--uib-speed)*.75) ease-in-out infinite;will-change:stroke-dasharray,stroke-dashoffset}@keyframes Ring-module_rotate__RBwLl{to{transform:rotate(1turn)}}@keyframes Ring-module_stretch__L-1Qd{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,200;stroke-dashoffset:-35px}to{stroke-dashoffset:-124px}}");(function(t,e){(function(n,r){r(typeof EL=="function"?AL:n.moment)})(vf,function(n){//! moment.js locale configuration var r="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),s="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),o=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],a=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,l=n.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(c,d){return c?/-MMM-/.test(d)?s[c.month()]:r[c.month()]:r},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:o,longMonthsParse:o,shortMonthsParse:o,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"});return l})})();function Ns(t){return Pt({tag:"svg",attr:{version:"1",viewBox:"0 0 48 48",enableBackground:"new 0 0 48 48"},child:[{tag:"path",attr:{fill:"#F44336",d:"M38,42H10c-2.2,0-4-1.8-4-4V10c0-2.2,1.8-4,4-4h28c2.2,0,4,1.8,4,4v28C42,40.2,40.2,42,38,42z"},child:[]},{tag:"polygon",attr:{fill:"#fff",points:"31,24 20,16 20,32"},child:[]}]})(t)}const DL=({dataEquipos:t,dataFixture:e,canalesTvPlayoff:n})=>{var A;const[r,s]=C.useState(!0),[o,a]=C.useState([]),[l,c]=C.useState([]),[d,u]=C.useState([]),[f,g]=C.useState([]),E=e||[];C.useEffect(()=>{c(t),u(n),a(S(e)),s(!1)},[t,e]);const S=k=>{const R={};k.forEach(N=>{const y=N.faseCopas,v=N.llavePlayOff;R[y]||(R[y]={}),R[y][v]||(R[y][v]=[]),R[y][v].push(N)});const O={};return Object.keys(R).sort().forEach(N=>{O[N]={};const y=["Ida","Vuelta","Tercer partido"];Object.keys(R[N]).sort().forEach(v=>{R[N][v].sort((b,P)=>y.indexOf(b.partidoPlayOff)-y.indexOf(P.partidoPlayOff)),O[N][v]=R[N][v]})}),O},w=S(E),_=(k,R)=>{h("/videos",{state:{url:k,data:R}})},h=Rt(),m=["Final","3 puesto","Semi final","Cuartos de final","Octavos de final","16avos","32avos","5 puesto","7 puesto","5 a 8 puesto","9 puesto","11 puesto","2° Fase","1° Fase"];return(A=E[0])==null||A.torneo,p(ae,{className:"anchoPlayoff",children:[Object.entries(w).sort((k,R)=>{const O=k[0],N=R[0],y=m.indexOf(O),v=m.indexOf(N);return y-v}).map(([k,R])=>i(ee,{children:p(ae,{className:" mt-1",children:[p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"15px"},children:[" ",k.toUpperCase()]}),i($,{children:Object.entries(R).map(([O,N])=>i(ee,{children:i($,{md:12,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{children:Array.isArray(N)&&N.map(y=>{var U,L,K,Y,te;const v=y.equipolocal,b=y.equipovisitante,P=y.transmision,F=Array.isArray(l)?(U=l.find(J=>J.nombre===v))==null?void 0:U.escudos:void 0,I=Array.isArray(l)?(L=l.find(J=>J.nombre===b))==null?void 0:L.escudos:void 0,T=(K=d.find(J=>J.idTv===P))==null?void 0:K.logo,q=y.hora?se(y.hora,"HH:mm:ss").format("HH:mm"):"A conf",W=f===y.id&&y.estado==="Jugandose"?"#dc3545":"white",G=f===y.id&&y.estado==="Jugandose"?"white":"black",H=se(y.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("DD/MM"),j=se(y.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("dddd").toUpperCase();return p(Fe.Fragment,{children:[y.fecha!==null?i("tr",{children:p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[j," ",H]})}):i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"FECHA Y HORA A CONFIRMAR"}),i("tr",{children:i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:y.partidoPlayOff})}),p("tr",{children:[y.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder",style:{fontSize:9,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):y.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",y.motivossuspension,")"]})]}):y.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:y.estado}):y.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Parc ",T&&i("img",{src:T,alt:P,style:{width:"20px",height:"20px"}})]}):y.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:[y.tiempodelpartido," ",T&&i("img",{src:T,alt:P,style:{width:"20px",height:"20px"}})]}):y.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[y.hora===""?i(ee,{children:"A conf"}):q," ",T&&i("img",{src:T,alt:P,style:{width:"20px",height:"20px"}}),i("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"}})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[F&&i("img",{src:F,alt:v,style:{width:"15px",height:"15px"}})," ",i("span",{style:{height:"auto"},children:v!==""?v:"A conf"})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:W,color:G,width:"auto"},children:[y.estado!=="Pendiente"?y.goleslocal:null,y.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+y.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:W,color:G},children:[y.estado!=="Pendiente"?y.golesvisitante:null,y.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+y.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[F&&i("img",{src:I,alt:b,style:{width:"15px",height:"15px"}})," ",p("span",{style:{height:"auto"},children:[" ",b!==""?b:"A conf"]})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[y.linkgoles===null||y.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{_(y.linkgoles,{id:y.id,estado:y.estado,equipolocal:y.equipolocal,equipovisitante:y.equipovisitante,goleslocal:y.goleslocal,penaleslocal:y.penaleslocal,penalesvisitante:y.penalesvisitante,golesvisitante:y.golesvisitante,escudoLocal:F,escudoVisitante:I,tiempodelpartido:y.tiempodelpartido,hora:q,goleadoresLocal:y.goleadoresLocal,goleadoresVisitante:y.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})}),y.linkvivo===null||y.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{_(y.linkvivo,{id:y.id,estado:y.estado,equipolocal:y.equipolocal,equipovisitante:y.equipovisitante,goleslocal:y.goleslocal,penaleslocal:y.penaleslocal,penalesvisitante:y.penalesvisitante,golesvisitante:y.golesvisitante,escudoLocal:F,escudoVisitante:I,tiempodelpartido:y.tiempodelpartido,hora:q,goleadoresLocal:y.goleadoresLocal,goleadoresVisitante:y.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Ns,{style:{fontSize:"12px"}})})]})})]},y.id),(y.goleadoresLocal||y.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(Y=y.goleadoresLocal)==null?void 0:Y.split(",").map((J,Q)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[Q>0&&"-",J.trim().slice(0,-1)]},Q))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(te=y.goleadoresVisitante)==null?void 0:te.split(",").map((J,Q)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[Q>0&&"-",J.trim().slice(0,-1)]},Q))})})]})]},y.id)})})]})})}))},k)]})})),i(V,{})]})},LZ=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState([]),[a,l]=C.useState([]);C.useEffect(()=>{c(),d(),u(),f();const g=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},E=>{u()}).subscribe();return()=>{g.unsubscribe()}},[]);const c=async()=>{try{const{data:g,error:E}=await z.from("Goleadores").select("*").eq("torneo","SUPERCOPAMASC").eq("añoGoleadores",2024);E?console.error("Error",E):e(g)}catch(g){console.error("Error",g.message)}},d=async()=>{try{const{data:g,error:E}=await z.from("Equipos").select("*").eq("genero","Masculino");E?console.error("Error",E):r(g)}catch(g){console.error("Error",g.message)}},u=async()=>{try{const{data:g,error:E}=await z.from("Fixture2023").select("*").eq("torneo","SUPERCOPAMASC").eq("añoTorneo",2024);E?console.error("Error",E):o(g)}catch(g){console.error("Error",g.message)}},f=async()=>{try{const{data:g,error:E}=await z.from("CanalesTv").select("*");E?console.error("Error",E):l(g)}catch(g){console.error("Error",g.message)}};return p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL - SUPERCOPA FUTSAL AFA - FIXTURES - PARTIDOS"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de LA SUPERCOPA DE Futsal AFA , fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo mb-5",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"SUPERCOPA FUTSAL AFA",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{md:12,children:i(et,{})})}),i(V,{children:i($,{className:"text-center d-flex justify-content-center mb-2 mt-2",style:{overflowY:"auto"},children:i(TZ,{dataFixture:s,dataEquipos:n})})}),i(V,{children:i($,{md:12,children:i(DL,{dataFixture:s,dataEquipos:n,canalesTvPlayoff:a})})}),i(V,{children:i($,{md:12,className:"mb-5",children:i(Vt,{goleadores:t,dataEquipos:n})})})]})]})};var kL={},TL={},jt={},zZ=function(e,n,r){var s=document.head||document.getElementsByTagName("head")[0],o=document.createElement("script");typeof n=="function"&&(r=n,n={}),n=n||{},r=r||function(){},o.type=n.type||"text/javascript",o.charset=n.charset||"utf8",o.async="async"in n?!!n.async:!0,o.src=e,n.attrs&&qZ(o,n.attrs),n.text&&(o.text=""+n.text);var a="onload"in o?L2:jZ;a(o,r),o.onload||L2(o,r),s.appendChild(o)};function qZ(t,e){for(var n in e)t.setAttribute(n,e[n])}function L2(t,e){t.onload=function(){this.onerror=this.onload=null,e(null,t)},t.onerror=function(){this.onerror=this.onload=null,e(new Error("Failed to load "+this.src),t)}}function jZ(t,e){t.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,e(null,t))}}var $Z=function(e){return BZ(e)&&!UZ(e)};function BZ(t){return!!t&&typeof t=="object"}function UZ(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||GZ(t)}var YZ=typeof Symbol=="function"&&Symbol.for,HZ=YZ?Symbol.for("react.element"):60103;function GZ(t){return t.$$typeof===HZ}function WZ(t){return Array.isArray(t)?[]:{}}function Ch(t,e){return e.clone!==!1&&e.isMergeableObject(t)?jd(WZ(t),t,e):t}function VZ(t,e,n){return t.concat(e).map(function(r){return Ch(r,n)})}function KZ(t,e){if(!e.customMerge)return jd;var n=e.customMerge(t);return typeof n=="function"?n:jd}function ZZ(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function z2(t){return Object.keys(t).concat(ZZ(t))}function IL(t,e){try{return e in t}catch{return!1}}function JZ(t,e){return IL(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function XZ(t,e,n){var r={};return n.isMergeableObject(t)&&z2(t).forEach(function(s){r[s]=Ch(t[s],n)}),z2(e).forEach(function(s){JZ(t,s)||(IL(t,s)&&n.isMergeableObject(e[s])?r[s]=KZ(s,n)(t[s],e[s],n):r[s]=Ch(e[s],n))}),r}function jd(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||VZ,n.isMergeableObject=n.isMergeableObject||$Z,n.cloneUnlessOtherwiseSpecified=Ch;var r=Array.isArray(e),s=Array.isArray(t),o=r===s;return o?r?n.arrayMerge(t,e,n):XZ(t,e,n):Ch(e,n)}jd.all=function(e,n){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(r,s){return jd(r,s,n)},{})};var QZ=jd,ML=QZ;Object.defineProperty(jt,"__esModule",{value:!0});jt.parseStartTime=uJ;jt.parseEndTime=fJ;jt.randomString=hJ;jt.queryString=pJ;jt.getSDK=mJ;jt.getConfig=gJ;jt.omit=yJ;jt.callPlayer=bJ;jt.isMediaStream=vJ;jt.isBlobUrl=_J;jt.supportsWebKitPresentationMode=wJ;var eJ=LL(zZ),tJ=LL(ML);function LL(t){return t&&t.__esModule?t:{default:t}}function nJ(t,e){return iJ(t)||oJ(t,e)||sJ(t,e)||rJ()}function rJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sJ(t,e){if(t){if(typeof t=="string")return q2(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return q2(t,e)}}function q2(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function oJ(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var n=[],r=!0,s=!1,o=void 0;try{for(var a=t[Symbol.iterator](),l;!(r=(l=a.next()).done)&&(n.push(l.value),!(e&&n.length===e));r=!0);}catch(c){s=!0,o=c}finally{try{!r&&a.return!=null&&a.return()}finally{if(s)throw o}}return n}}function iJ(t){if(Array.isArray(t))return t}var aJ=/[?&#](?:start|t)=([0-9hms]+)/,lJ=/[?&#]end=([0-9hms]+)/,xw=/(\d+)(h|m|s)/g,cJ=/^\d+$/;function zL(t,e){if(!(t instanceof Array)){var n=t.match(e);if(n){var r=n[1];if(r.match(xw))return dJ(r);if(cJ.test(r))return parseInt(r)}}}function dJ(t){for(var e=0,n=xw.exec(t);n!==null;){var r=n,s=nJ(r,3),o=s[1],a=s[2];a==="h"&&(e+=parseInt(o,10)*60*60),a==="m"&&(e+=parseInt(o,10)*60),a==="s"&&(e+=parseInt(o,10)),n=xw.exec(t)}return e}function uJ(t){return zL(t,aJ)}function fJ(t){return zL(t,lJ)}function hJ(){return Math.random().toString(36).substr(2,5)}function pJ(t){return Object.keys(t).map(function(e){return"".concat(e,"=").concat(t[e])}).join("&")}function U0(t){return window[t]?window[t]:window.exports&&window.exports[t]?window.exports[t]:window.module&&window.module.exports&&window.module.exports[t]?window.module.exports[t]:null}var Sc={};function mJ(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){return!0},s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:eJ.default,o=U0(e);return o&&r(o)?Promise.resolve(o):new Promise(function(a,l){if(Sc[t]){Sc[t].push({resolve:a,reject:l});return}Sc[t]=[{resolve:a,reject:l}];var c=function(f){Sc[t].forEach(function(g){return g.resolve(f)})};if(n){var d=window[n];window[n]=function(){d&&d(),c(U0(e))}}s(t,function(u){u?(Sc[t].forEach(function(f){return f.reject(u)}),Sc[t]=null):n||c(U0(e))})})}function gJ(t,e){return(0,tJ.default)(e.config,t.config)}function yJ(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];for(var o=(e=[]).concat.apply(e,r),a={},l=Object.keys(t),c=0,d=l;c<d.length;c++){var u=d[c];o.indexOf(u)===-1&&(a[u]=t[u])}return a}function bJ(t){var e;if(!this.player||!this.player[t]){var n="ReactPlayer: ".concat(this.constructor.displayName," player could not call %c").concat(t,"%c – ");return this.player?this.player[t]||(n+="The method was not available"):n+="The player was not available",console.warn(n,"font-weight: bold",""),null}for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];return(e=this.player)[t].apply(e,s)}function vJ(t){return typeof window<"u"&&typeof window.MediaStream<"u"&&t instanceof window.MediaStream}function _J(t){return/^blob:/.test(t)}function wJ(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document.createElement("video"),e=/iPhone|iPod/.test(navigator.userAgent)===!1;return t.webkitSupportsPresentationMode&&typeof t.webkitSetPresentationMode=="function"&&e}var We={};Object.defineProperty(We,"__esModule",{value:!0});We.canPlay=We.FLV_EXTENSIONS=We.DASH_EXTENSIONS=We.HLS_EXTENSIONS=We.VIDEO_EXTENSIONS=We.AUDIO_EXTENSIONS=We.MATCH_URL_KALTURA=We.MATCH_URL_VIDYARD=We.MATCH_URL_MIXCLOUD=We.MATCH_URL_DAILYMOTION=We.MATCH_URL_TWITCH_CHANNEL=We.MATCH_URL_TWITCH_VIDEO=We.MATCH_URL_WISTIA=We.MATCH_URL_STREAMABLE=We.MATCH_URL_FACEBOOK_WATCH=We.MATCH_URL_FACEBOOK=We.MATCH_URL_VIMEO=We.MATCH_URL_SOUNDCLOUD=We.MATCH_URL_YOUTUBE=void 0;var j2=jt;function xJ(t,e){var n;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(n=CJ(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var r=0,s=function(){};return{s,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(d){throw d},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,l;return{s:function(){n=t[Symbol.iterator]()},n:function(){var d=n.next();return o=d.done,d},e:function(d){a=!0,l=d},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw l}}}}function CJ(t,e){if(t){if(typeof t=="string")return $2(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $2(t,e)}}function $2(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Cw=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//;We.MATCH_URL_YOUTUBE=Cw;var qL=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/;We.MATCH_URL_SOUNDCLOUD=qL;var jL=/vimeo\.com\/(?!progressive_redirect).+/;We.MATCH_URL_VIMEO=jL;var $L=/^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;We.MATCH_URL_FACEBOOK=$L;var BL=/^https?:\/\/fb\.watch\/.+$/;We.MATCH_URL_FACEBOOK_WATCH=BL;var UL=/streamable\.com\/([a-z0-9]+)$/;We.MATCH_URL_STREAMABLE=UL;var YL=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?(.*)$/;We.MATCH_URL_WISTIA=YL;var HL=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;We.MATCH_URL_TWITCH_VIDEO=HL;var GL=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/;We.MATCH_URL_TWITCH_CHANNEL=GL;var WL=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;We.MATCH_URL_DAILYMOTION=WL;var VL=/mixcloud\.com\/([^/]+\/[^/]+)/;We.MATCH_URL_MIXCLOUD=VL;var KL=/vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/;We.MATCH_URL_VIDYARD=KL;var ZL=/^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_].*)$/;We.MATCH_URL_KALTURA=ZL;var OE=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;We.AUDIO_EXTENSIONS=OE;var FE=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i;We.VIDEO_EXTENSIONS=FE;var DE=/\.(m3u8)($|\?)/i;We.HLS_EXTENSIONS=DE;var JL=/\.(mpd)($|\?)/i;We.DASH_EXTENSIONS=JL;var XL=/\.(flv)($|\?)/i;We.FLV_EXTENSIONS=XL;var EJ=function t(e){if(e instanceof Array){var n=xJ(e),r;try{for(n.s();!(r=n.n()).done;){var s=r.value;if(typeof s=="string"&&t(s)||t(s.src))return!0}}catch(o){n.e(o)}finally{n.f()}return!1}return(0,j2.isMediaStream)(e)||(0,j2.isBlobUrl)(e)?!0:OE.test(e)||FE.test(e)||DE.test(e)||JL.test(e)||XL.test(e)},SJ={youtube:function(e){return e instanceof Array?e.every(function(n){return Cw.test(n)}):Cw.test(e)},soundcloud:function(e){return qL.test(e)&&!OE.test(e)},vimeo:function(e){return jL.test(e)&&!FE.test(e)&&!DE.test(e)},facebook:function(e){return $L.test(e)||BL.test(e)},streamable:function(e){return UL.test(e)},wistia:function(e){return YL.test(e)},twitch:function(e){return HL.test(e)||GL.test(e)},dailymotion:function(e){return WL.test(e)},mixcloud:function(e){return VL.test(e)},vidyard:function(e){return KL.test(e)},kaltura:function(e){return ZL.test(e)},file:EJ};We.canPlay=SJ;var Y0={},B2;function AJ(){return B2||(B2=1,function(t){function e(H){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(U){return typeof U}:e=function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},e(H)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(C),r=jt,s=We;function o(){if(typeof WeakMap!="function")return null;var H=new WeakMap;return o=function(){return H},H}function a(H){if(H&&H.__esModule)return H;if(H===null||e(H)!=="object"&&typeof H!="function")return{default:H};var j=o();if(j&&j.has(H))return j.get(H);var U={},L=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var K in H)if(Object.prototype.hasOwnProperty.call(H,K)){var Y=L?Object.getOwnPropertyDescriptor(H,K):null;Y&&(Y.get||Y.set)?Object.defineProperty(U,K,Y):U[K]=H[K]}return U.default=H,j&&j.set(H,U),U}function l(H,j){var U=Object.keys(H);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(H);j&&(L=L.filter(function(K){return Object.getOwnPropertyDescriptor(H,K).enumerable})),U.push.apply(U,L)}return U}function c(H){for(var j=1;j<arguments.length;j++){var U=arguments[j]!=null?arguments[j]:{};j%2?l(Object(U),!0).forEach(function(L){v(H,L,U[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(U)):l(Object(U)).forEach(function(L){Object.defineProperty(H,L,Object.getOwnPropertyDescriptor(U,L))})}return H}function d(H,j){return S(H)||E(H,j)||f(H,j)||u()}function u(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(H,j){if(H){if(typeof H=="string")return g(H,j);var U=Object.prototype.toString.call(H).slice(8,-1);if(U==="Object"&&H.constructor&&(U=H.constructor.name),U==="Map"||U==="Set")return Array.from(H);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return g(H,j)}}function g(H,j){(j==null||j>H.length)&&(j=H.length);for(var U=0,L=new Array(j);U<j;U++)L[U]=H[U];return L}function E(H,j){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(H)))){var U=[],L=!0,K=!1,Y=void 0;try{for(var te=H[Symbol.iterator](),J;!(L=(J=te.next()).done)&&(U.push(J.value),!(j&&U.length===j));L=!0);}catch(Q){K=!0,Y=Q}finally{try{!L&&te.return!=null&&te.return()}finally{if(K)throw Y}}return U}}function S(H){if(Array.isArray(H))return H}function w(H,j){if(!(H instanceof j))throw new TypeError("Cannot call a class as a function")}function _(H,j){for(var U=0;U<j.length;U++){var L=j[U];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(H,L.key,L)}}function h(H,j,U){return j&&_(H.prototype,j),U&&_(H,U),H}function m(H,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function");H.prototype=Object.create(j&&j.prototype,{constructor:{value:H,writable:!0,configurable:!0}}),j&&A(H,j)}function A(H,j){return A=Object.setPrototypeOf||function(L,K){return L.__proto__=K,L},A(H,j)}function k(H){var j=N();return function(){var L=y(H),K;if(j){var Y=y(this).constructor;K=Reflect.construct(L,arguments,Y)}else K=L.apply(this,arguments);return R(this,K)}}function R(H,j){return j&&(e(j)==="object"||typeof j=="function")?j:O(H)}function O(H){if(H===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return H}function N(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function y(H){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(U){return U.__proto__||Object.getPrototypeOf(U)},y(H)}function v(H,j,U){return j in H?Object.defineProperty(H,j,{value:U,enumerable:!0,configurable:!0,writable:!0}):H[j]=U,H}var b="https://www.youtube.com/iframe_api",P="YT",F="onYouTubeIframeAPIReady",I=/[?&](?:list|channel)=([a-zA-Z0-9_-]+)/,T=/user\/([a-zA-Z0-9_-]+)\/?/,q=/youtube-nocookie\.com/,W="https://www.youtube-nocookie.com",G=function(H){m(U,H);var j=k(U);function U(){var L;w(this,U);for(var K=arguments.length,Y=new Array(K),te=0;te<K;te++)Y[te]=arguments[te];return L=j.call.apply(j,[this].concat(Y)),v(O(L),"callPlayer",r.callPlayer),v(O(L),"parsePlaylist",function(J){if(J instanceof Array)return{listType:"playlist",playlist:J.map(L.getID).join(",")};if(I.test(J)){var Q=J.match(I),oe=d(Q,2),pe=oe[1];return{listType:"playlist",list:pe.replace(/^UC/,"UU")}}if(T.test(J)){var ye=J.match(T),Pe=d(ye,2),Me=Pe[1];return{listType:"user_uploads",list:Me}}return{}}),v(O(L),"onStateChange",function(J){var Q=J.data,oe=L.props,pe=oe.onPlay,ye=oe.onPause,Pe=oe.onBuffer,Me=oe.onBufferEnd,He=oe.onEnded,ie=oe.onReady,Se=oe.loop,he=oe.config,Je=he.playerVars,Ct=he.onUnstarted,de=window[P].PlayerState,le=de.UNSTARTED,Oe=de.PLAYING,Ke=de.PAUSED,it=de.BUFFERING,It=de.ENDED,wn=de.CUED;if(Q===le&&Ct(),Q===Oe&&(pe(),Me()),Q===Ke&&ye(),Q===it&&Pe(),Q===It){var me=!!L.callPlayer("getPlaylist");Se&&!me&&(Je.start?L.seekTo(Je.start):L.play()),He()}Q===wn&&ie()}),v(O(L),"mute",function(){L.callPlayer("mute")}),v(O(L),"unmute",function(){L.callPlayer("unMute")}),v(O(L),"ref",function(J){L.container=J}),L}return h(U,[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"getID",value:function(K){return!K||K instanceof Array||I.test(K)?null:K.match(s.MATCH_URL_YOUTUBE)[1]}},{key:"load",value:function(K,Y){var te=this,J=this.props,Q=J.playing,oe=J.muted,pe=J.playsinline,ye=J.controls,Pe=J.loop,Me=J.config,He=J.onError,ie=Me.playerVars,Se=Me.embedOptions,he=this.getID(K);if(Y){if(I.test(K)||T.test(K)||K instanceof Array){this.player.loadPlaylist(this.parsePlaylist(K));return}this.player.cueVideoById({videoId:he,startSeconds:(0,r.parseStartTime)(K)||ie.start,endSeconds:(0,r.parseEndTime)(K)||ie.end});return}(0,r.getSDK)(b,P,F,function(Je){return Je.loaded}).then(function(Je){te.container&&(te.player=new Je.Player(te.container,c({width:"100%",height:"100%",videoId:he,playerVars:c(c({autoplay:Q?1:0,mute:oe?1:0,controls:ye?1:0,start:(0,r.parseStartTime)(K),end:(0,r.parseEndTime)(K),origin:window.location.origin,playsinline:pe?1:0},te.parsePlaylist(K)),ie),events:{onReady:function(){Pe&&te.player.setLoop(!0),te.props.onReady()},onPlaybackRateChange:function(de){return te.props.onPlaybackRateChange(de.data)},onStateChange:te.onStateChange,onError:function(de){return He(de.data)}},host:q.test(K)?W:void 0},Se)))},He),Se.events&&console.warn("Using `embedOptions.events` will likely break things. Use ReactPlayer’s callback props instead, eg onReady, onPlay, onPause")}},{key:"play",value:function(){this.callPlayer("playVideo")}},{key:"pause",value:function(){this.callPlayer("pauseVideo")}},{key:"stop",value:function(){document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}},{key:"seekTo",value:function(K){this.callPlayer("seekTo",K),this.props.playing||this.pause()}},{key:"setVolume",value:function(K){this.callPlayer("setVolume",K*100)}},{key:"setPlaybackRate",value:function(K){this.callPlayer("setPlaybackRate",K)}},{key:"setLoop",value:function(K){this.callPlayer("setLoop",K)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}},{key:"render",value:function(){var K=this.props.display,Y={width:"100%",height:"100%",display:K};return n.default.createElement("div",{style:Y},n.default.createElement("div",{ref:this.ref}))}}]),U}(n.Component);t.default=G,v(G,"displayName","YouTube"),v(G,"canPlay",s.canPlay.youtube)}(Y0)),Y0}var H0={},U2;function NJ(){return U2||(U2=1,function(t){function e(N){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(v){return typeof v}:e=function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},e(N)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(C),r=jt,s=We;function o(){if(typeof WeakMap!="function")return null;var N=new WeakMap;return o=function(){return N},N}function a(N){if(N&&N.__esModule)return N;if(N===null||e(N)!=="object"&&typeof N!="function")return{default:N};var y=o();if(y&&y.has(N))return y.get(N);var v={},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var P in N)if(Object.prototype.hasOwnProperty.call(N,P)){var F=b?Object.getOwnPropertyDescriptor(N,P):null;F&&(F.get||F.set)?Object.defineProperty(v,P,F):v[P]=N[P]}return v.default=N,y&&y.set(N,v),v}function l(N,y){var v=Object.keys(N);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(N);y&&(b=b.filter(function(P){return Object.getOwnPropertyDescriptor(N,P).enumerable})),v.push.apply(v,b)}return v}function c(N){for(var y=1;y<arguments.length;y++){var v=arguments[y]!=null?arguments[y]:{};y%2?l(Object(v),!0).forEach(function(b){A(N,b,v[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(N,Object.getOwnPropertyDescriptors(v)):l(Object(v)).forEach(function(b){Object.defineProperty(N,b,Object.getOwnPropertyDescriptor(v,b))})}return N}function d(N,y){if(!(N instanceof y))throw new TypeError("Cannot call a class as a function")}function u(N,y){for(var v=0;v<y.length;v++){var b=y[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(N,b.key,b)}}function f(N,y,v){return y&&u(N.prototype,y),v&&u(N,v),N}function g(N,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(y&&y.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),y&&E(N,y)}function E(N,y){return E=Object.setPrototypeOf||function(b,P){return b.__proto__=P,b},E(N,y)}function S(N){var y=h();return function(){var b=m(N),P;if(y){var F=m(this).constructor;P=Reflect.construct(b,arguments,F)}else P=b.apply(this,arguments);return w(this,P)}}function w(N,y){return y&&(e(y)==="object"||typeof y=="function")?y:_(N)}function _(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}function h(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function m(N){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},m(N)}function A(N,y,v){return y in N?Object.defineProperty(N,y,{value:v,enumerable:!0,configurable:!0,writable:!0}):N[y]=v,N}var k="https://w.soundcloud.com/player/api.js",R="SC",O=function(N){g(v,N);var y=S(v);function v(){var b;d(this,v);for(var P=arguments.length,F=new Array(P),I=0;I<P;I++)F[I]=arguments[I];return b=y.call.apply(y,[this].concat(F)),A(_(b),"callPlayer",r.callPlayer),A(_(b),"duration",null),A(_(b),"currentTime",null),A(_(b),"fractionLoaded",null),A(_(b),"mute",function(){b.setVolume(0)}),A(_(b),"unmute",function(){b.props.volume!==null&&b.setVolume(b.props.volume)}),A(_(b),"ref",function(T){b.iframe=T}),b}return f(v,[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(P,F){var I=this;(0,r.getSDK)(k,R).then(function(T){if(I.iframe){var q=T.Widget.Events,W=q.PLAY,G=q.PLAY_PROGRESS,H=q.PAUSE,j=q.FINISH,U=q.ERROR;F||(I.player=T.Widget(I.iframe),I.player.bind(W,I.props.onPlay),I.player.bind(H,function(){var L=I.duration-I.currentTime;L<.05||I.props.onPause()}),I.player.bind(G,function(L){I.currentTime=L.currentPosition/1e3,I.fractionLoaded=L.loadedProgress}),I.player.bind(j,function(){return I.props.onEnded()}),I.player.bind(U,function(L){return I.props.onError(L)})),I.player.load(P,c(c({},I.props.config.options),{},{callback:function(){I.player.getDuration(function(K){I.duration=K/1e3,I.props.onReady()})}}))}})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(P){this.callPlayer("seekTo",P*1e3)}},{key:"setVolume",value:function(P){this.callPlayer("setVolume",P*100)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.fractionLoaded*this.duration}},{key:"render",value:function(){var P=this.props.display,F={width:"100%",height:"100%",display:P};return n.default.createElement("iframe",{ref:this.ref,src:"https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),style:F,frameBorder:0,allow:"autoplay"})}}]),v}(n.Component);t.default=O,A(O,"displayName","SoundCloud"),A(O,"canPlay",s.canPlay.soundcloud),A(O,"loopOnEnded",!0)}(H0)),H0}var G0={},Y2;function RJ(){return Y2||(Y2=1,function(t){function e(N){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(v){return typeof v}:e=function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},e(N)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(C),r=jt,s=We;function o(){if(typeof WeakMap!="function")return null;var N=new WeakMap;return o=function(){return N},N}function a(N){if(N&&N.__esModule)return N;if(N===null||e(N)!=="object"&&typeof N!="function")return{default:N};var y=o();if(y&&y.has(N))return y.get(N);var v={},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var P in N)if(Object.prototype.hasOwnProperty.call(N,P)){var F=b?Object.getOwnPropertyDescriptor(N,P):null;F&&(F.get||F.set)?Object.defineProperty(v,P,F):v[P]=N[P]}return v.default=N,y&&y.set(N,v),v}function l(N,y){var v=Object.keys(N);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(N);y&&(b=b.filter(function(P){return Object.getOwnPropertyDescriptor(N,P).enumerable})),v.push.apply(v,b)}return v}function c(N){for(var y=1;y<arguments.length;y++){var v=arguments[y]!=null?arguments[y]:{};y%2?l(Object(v),!0).forEach(function(b){A(N,b,v[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(N,Object.getOwnPropertyDescriptors(v)):l(Object(v)).forEach(function(b){Object.defineProperty(N,b,Object.getOwnPropertyDescriptor(v,b))})}return N}function d(N,y){if(!(N instanceof y))throw new TypeError("Cannot call a class as a function")}function u(N,y){for(var v=0;v<y.length;v++){var b=y[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(N,b.key,b)}}function f(N,y,v){return y&&u(N.prototype,y),v&&u(N,v),N}function g(N,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(y&&y.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),y&&E(N,y)}function E(N,y){return E=Object.setPrototypeOf||function(b,P){return b.__proto__=P,b},E(N,y)}function S(N){var y=h();return function(){var b=m(N),P;if(y){var F=m(this).constructor;P=Reflect.construct(b,arguments,F)}else P=b.apply(this,arguments);return w(this,P)}}function w(N,y){return y&&(e(y)==="object"||typeof y=="function")?y:_(N)}function _(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}function h(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function m(N){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},m(N)}function A(N,y,v){return y in N?Object.defineProperty(N,y,{value:v,enumerable:!0,configurable:!0,writable:!0}):N[y]=v,N}var k="https://player.vimeo.com/api/player.js",R="Vimeo",O=function(N){g(v,N);var y=S(v);function v(){var b;d(this,v);for(var P=arguments.length,F=new Array(P),I=0;I<P;I++)F[I]=arguments[I];return b=y.call.apply(y,[this].concat(F)),A(_(b),"callPlayer",r.callPlayer),A(_(b),"duration",null),A(_(b),"currentTime",null),A(_(b),"secondsLoaded",null),A(_(b),"mute",function(){b.setVolume(0)}),A(_(b),"unmute",function(){b.props.volume!==null&&b.setVolume(b.props.volume)}),A(_(b),"ref",function(T){b.container=T}),b}return f(v,[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(P){var F=this;this.duration=null,(0,r.getSDK)(k,R).then(function(I){if(F.container){var T=F.props.config,q=T.playerOptions,W=T.title;F.player=new I.Player(F.container,c({url:P,autoplay:F.props.playing,muted:F.props.muted,loop:F.props.loop,playsinline:F.props.playsinline,controls:F.props.controls},q)),F.player.ready().then(function(){var G=F.container.querySelector("iframe");G.style.width="100%",G.style.height="100%",W&&(G.title=W)}).catch(F.props.onError),F.player.on("loaded",function(){F.props.onReady(),F.refreshDuration()}),F.player.on("play",function(){F.props.onPlay(),F.refreshDuration()}),F.player.on("pause",F.props.onPause),F.player.on("seeked",function(G){return F.props.onSeek(G.seconds)}),F.player.on("ended",F.props.onEnded),F.player.on("error",F.props.onError),F.player.on("timeupdate",function(G){var H=G.seconds;F.currentTime=H}),F.player.on("progress",function(G){var H=G.seconds;F.secondsLoaded=H}),F.player.on("bufferstart",F.props.onBuffer),F.player.on("bufferend",F.props.onBufferEnd),F.player.on("playbackratechange",function(G){return F.props.onPlaybackRateChange(G.playbackRate)})}},this.props.onError)}},{key:"refreshDuration",value:function(){var P=this;this.player.getDuration().then(function(F){P.duration=F})}},{key:"play",value:function(){var P=this.callPlayer("play");P&&P.catch(this.props.onError)}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("unload")}},{key:"seekTo",value:function(P){this.callPlayer("setCurrentTime",P)}},{key:"setVolume",value:function(P){this.callPlayer("setVolume",P)}},{key:"setLoop",value:function(P){this.callPlayer("setLoop",P)}},{key:"setPlaybackRate",value:function(P){this.callPlayer("setPlaybackRate",P)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var P=this.props.display,F={width:"100%",height:"100%",overflow:"hidden",display:P};return n.default.createElement("div",{key:this.props.url,ref:this.ref,style:F})}}]),v}(n.Component);t.default=O,A(O,"displayName","Vimeo"),A(O,"canPlay",s.canPlay.vimeo),A(O,"forceLoad",!0)}(G0)),G0}var W0={},H2;function PJ(){return H2||(H2=1,function(t){function e(y){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(b){return typeof b}:e=function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},e(y)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(C),r=jt,s=We;function o(){if(typeof WeakMap!="function")return null;var y=new WeakMap;return o=function(){return y},y}function a(y){if(y&&y.__esModule)return y;if(y===null||e(y)!=="object"&&typeof y!="function")return{default:y};var v=o();if(v&&v.has(y))return v.get(y);var b={},P=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in y)if(Object.prototype.hasOwnProperty.call(y,F)){var I=P?Object.getOwnPropertyDescriptor(y,F):null;I&&(I.get||I.set)?Object.defineProperty(b,F,I):b[F]=y[F]}return b.default=y,v&&v.set(y,b),b}function l(){return l=Object.assign||function(y){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var P in b)Object.prototype.hasOwnProperty.call(b,P)&&(y[P]=b[P])}return y},l.apply(this,arguments)}function c(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function d(y,v){for(var b=0;b<v.length;b++){var P=v[b];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(y,P.key,P)}}function u(y,v,b){return v&&d(y.prototype,v),b&&d(y,b),y}function f(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(v&&v.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),v&&g(y,v)}function g(y,v){return g=Object.setPrototypeOf||function(P,F){return P.__proto__=F,P},g(y,v)}function E(y){var v=_();return function(){var P=h(y),F;if(v){var I=h(this).constructor;F=Reflect.construct(P,arguments,I)}else F=P.apply(this,arguments);return S(this,F)}}function S(y,v){return v&&(e(v)==="object"||typeof v=="function")?v:w(y)}function w(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}function _(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function h(y){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},h(y)}function m(y,v,b){return v in y?Object.defineProperty(y,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[v]=b,y}var A="https://connect.facebook.net/en_US/sdk.js",k="FB",R="fbAsyncInit",O="facebook-player-",N=function(y){f(b,y);var v=E(b);function b(){var P;c(this,b);for(var F=arguments.length,I=new Array(F),T=0;T<F;T++)I[T]=arguments[T];return P=v.call.apply(v,[this].concat(I)),m(w(P),"callPlayer",r.callPlayer),m(w(P),"playerID",P.props.config.playerId||"".concat(O).concat((0,r.randomString)())),m(w(P),"mute",function(){P.callPlayer("mute")}),m(w(P),"unmute",function(){P.callPlayer("unmute")}),P}return u(b,[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(F,I){var T=this;if(I){(0,r.getSDK)(A,k,R).then(function(q){return q.XFBML.parse()});return}(0,r.getSDK)(A,k,R).then(function(q){q.init({appId:T.props.config.appId,xfbml:!0,version:T.props.config.version}),q.Event.subscribe("xfbml.render",function(W){T.props.onLoaded()}),q.Event.subscribe("xfbml.ready",function(W){W.type==="video"&&W.id===T.playerID&&(T.player=W.instance,T.player.subscribe("startedPlaying",T.props.onPlay),T.player.subscribe("paused",T.props.onPause),T.player.subscribe("finishedPlaying",T.props.onEnded),T.player.subscribe("startedBuffering",T.props.onBuffer),T.player.subscribe("finishedBuffering",T.props.onBufferEnd),T.player.subscribe("error",T.props.onError),T.props.muted?T.callPlayer("mute"):T.callPlayer("unmute"),T.props.onReady(),document.getElementById(T.playerID).querySelector("iframe").style.visibility="visible")})})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(F){this.callPlayer("seek",F)}},{key:"setVolume",value:function(F){this.callPlayer("setVolume",F)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentPosition")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var F=this.props.config.attributes,I={width:"100%",height:"100%"};return n.default.createElement("div",l({style:I,id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false"},F))}}]),b}(n.Component);t.default=N,m(N,"displayName","Facebook"),m(N,"canPlay",s.canPlay.facebook),m(N,"loopOnEnded",!0)}(W0)),W0}var V0={},G2;function OJ(){return G2||(G2=1,function(t){function e(R){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(N){return typeof N}:e=function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},e(R)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(C),r=jt,s=We;function o(){if(typeof WeakMap!="function")return null;var R=new WeakMap;return o=function(){return R},R}function a(R){if(R&&R.__esModule)return R;if(R===null||e(R)!=="object"&&typeof R!="function")return{default:R};var O=o();if(O&&O.has(R))return O.get(R);var N={},y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in R)if(Object.prototype.hasOwnProperty.call(R,v)){var b=y?Object.getOwnPropertyDescriptor(R,v):null;b&&(b.get||b.set)?Object.defineProperty(N,v,b):N[v]=R[v]}return N.default=R,O&&O.set(R,N),N}function l(R,O){if(!(R instanceof O))throw new TypeError("Cannot call a class as a function")}function c(R,O){for(var N=0;N<O.length;N++){var y=O[N];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(R,y.key,y)}}function d(R,O,N){return O&&c(R.prototype,O),N&&c(R,N),R}function u(R,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(O&&O.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),O&&f(R,O)}function f(R,O){return f=Object.setPrototypeOf||function(y,v){return y.__proto__=v,y},f(R,O)}function g(R){var O=w();return function(){var y=_(R),v;if(O){var b=_(this).constructor;v=Reflect.construct(y,arguments,b)}else v=y.apply(this,arguments);return E(this,v)}}function E(R,O){return O&&(e(O)==="object"||typeof O=="function")?O:S(R)}function S(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function _(R){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(N){return N.__proto__||Object.getPrototypeOf(N)},_(R)}function h(R,O,N){return O in R?Object.defineProperty(R,O,{value:N,enumerable:!0,configurable:!0,writable:!0}):R[O]=N,R}var m="https://cdn.embed.ly/player-0.1.0.min.js",A="playerjs",k=function(R){u(N,R);var O=g(N);function N(){var y;l(this,N);for(var v=arguments.length,b=new Array(v),P=0;P<v;P++)b[P]=arguments[P];return y=O.call.apply(O,[this].concat(b)),h(S(y),"callPlayer",r.callPlayer),h(S(y),"duration",null),h(S(y),"currentTime",null),h(S(y),"secondsLoaded",null),h(S(y),"mute",function(){y.callPlayer("mute")}),h(S(y),"unmute",function(){y.callPlayer("unmute")}),h(S(y),"ref",function(F){y.iframe=F}),y}return d(N,[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(v){var b=this;(0,r.getSDK)(m,A).then(function(P){b.iframe&&(b.player=new P.Player(b.iframe),b.player.setLoop(b.props.loop),b.player.on("ready",b.props.onReady),b.player.on("play",b.props.onPlay),b.player.on("pause",b.props.onPause),b.player.on("seeked",b.props.onSeek),b.player.on("ended",b.props.onEnded),b.player.on("error",b.props.onError),b.player.on("timeupdate",function(F){var I=F.duration,T=F.seconds;b.duration=I,b.currentTime=T}),b.player.on("buffered",function(F){var I=F.percent;b.duration&&(b.secondsLoaded=b.duration*I)}),b.props.muted&&b.player.mute())},this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(v){this.callPlayer("setCurrentTime",v)}},{key:"setVolume",value:function(v){this.callPlayer("setVolume",v*100)}},{key:"setLoop",value:function(v){this.callPlayer("setLoop",v)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var v=this.props.url.match(s.MATCH_URL_STREAMABLE)[1],b={width:"100%",height:"100%"};return n.default.createElement("iframe",{ref:this.ref,src:"https://streamable.com/o/".concat(v),frameBorder:"0",scrolling:"no",style:b,allow:"encrypted-media; autoplay; fullscreen;"})}}]),N}(n.Component);t.default=k,h(k,"displayName","Streamable"),h(k,"canPlay",s.canPlay.streamable)}(V0)),V0}var K0={},W2;function FJ(){return W2||(W2=1,function(t){function e(y){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(b){return typeof b}:e=function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},e(y)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(C),r=jt,s=We;function o(){if(typeof WeakMap!="function")return null;var y=new WeakMap;return o=function(){return y},y}function a(y){if(y&&y.__esModule)return y;if(y===null||e(y)!=="object"&&typeof y!="function")return{default:y};var v=o();if(v&&v.has(y))return v.get(y);var b={},P=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in y)if(Object.prototype.hasOwnProperty.call(y,F)){var I=P?Object.getOwnPropertyDescriptor(y,F):null;I&&(I.get||I.set)?Object.defineProperty(b,F,I):b[F]=y[F]}return b.default=y,v&&v.set(y,b),b}function l(y,v){var b=Object.keys(y);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(y);v&&(P=P.filter(function(F){return Object.getOwnPropertyDescriptor(y,F).enumerable})),b.push.apply(b,P)}return b}function c(y){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?l(Object(b),!0).forEach(function(P){A(y,P,b[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(b)):l(Object(b)).forEach(function(P){Object.defineProperty(y,P,Object.getOwnPropertyDescriptor(b,P))})}return y}function d(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function u(y,v){for(var b=0;b<v.length;b++){var P=v[b];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(y,P.key,P)}}function f(y,v,b){return v&&u(y.prototype,v),b&&u(y,b),y}function g(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(v&&v.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),v&&E(y,v)}function E(y,v){return E=Object.setPrototypeOf||function(P,F){return P.__proto__=F,P},E(y,v)}function S(y){var v=h();return function(){var P=m(y),F;if(v){var I=m(this).constructor;F=Reflect.construct(P,arguments,I)}else F=P.apply(this,arguments);return w(this,F)}}function w(y,v){return v&&(e(v)==="object"||typeof v=="function")?v:_(y)}function _(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}function h(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function m(y){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},m(y)}function A(y,v,b){return v in y?Object.defineProperty(y,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[v]=b,y}var k="https://fast.wistia.com/assets/external/E-v1.js",R="Wistia",O="wistia-player-",N=function(y){g(b,y);var v=S(b);function b(){var P;d(this,b);for(var F=arguments.length,I=new Array(F),T=0;T<F;T++)I[T]=arguments[T];return P=v.call.apply(v,[this].concat(I)),A(_(P),"callPlayer",r.callPlayer),A(_(P),"playerID",P.props.config.playerId||"".concat(O).concat((0,r.randomString)())),A(_(P),"onPlay",function(){var q;return(q=P.props).onPlay.apply(q,arguments)}),A(_(P),"onPause",function(){var q;return(q=P.props).onPause.apply(q,arguments)}),A(_(P),"onSeek",function(){var q;return(q=P.props).onSeek.apply(q,arguments)}),A(_(P),"onEnded",function(){var q;return(q=P.props).onEnded.apply(q,arguments)}),A(_(P),"onPlaybackRateChange",function(){var q;return(q=P.props).onPlaybackRateChange.apply(q,arguments)}),A(_(P),"mute",function(){P.callPlayer("mute")}),A(_(P),"unmute",function(){P.callPlayer("unmute")}),P}return f(b,[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(F){var I=this,T=this.props,q=T.playing,W=T.muted,G=T.controls,H=T.onReady,j=T.config,U=T.onError;(0,r.getSDK)(k,R).then(function(L){j.customControls&&j.customControls.forEach(function(K){return L.defineControl(K)}),window._wq=window._wq||[],window._wq.push({id:I.playerID,options:c({autoPlay:q,silentAutoPlay:"allow",muted:W,controlsVisibleOnLoad:G,fullscreenButton:G,playbar:G,playbackRateControl:G,qualityControl:G,volumeControl:G,settingsControl:G,smallPlayButton:G},j.options),onReady:function(Y){I.player=Y,I.unbind(),I.player.bind("play",I.onPlay),I.player.bind("pause",I.onPause),I.player.bind("seek",I.onSeek),I.player.bind("end",I.onEnded),I.player.bind("playbackratechange",I.onPlaybackRateChange),H()}})},U)}},{key:"unbind",value:function(){this.player.unbind("play",this.onPlay),this.player.unbind("pause",this.onPause),this.player.unbind("seek",this.onSeek),this.player.unbind("end",this.onEnded),this.player.unbind("playbackratechange",this.onPlaybackRateChange)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.unbind(),this.callPlayer("remove")}},{key:"seekTo",value:function(F){this.callPlayer("time",F)}},{key:"setVolume",value:function(F){this.callPlayer("volume",F)}},{key:"setPlaybackRate",value:function(F){this.callPlayer("playbackRate",F)}},{key:"getDuration",value:function(){return this.callPlayer("duration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("time")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var F=this.props.url,I=F&&F.match(s.MATCH_URL_WISTIA)[1],T="wistia_embed wistia_async_".concat(I),q={width:"100%",height:"100%"};return n.default.createElement("div",{id:this.playerID,key:I,className:T,style:q})}}]),b}(n.Component);t.default=N,A(N,"displayName","Wistia"),A(N,"canPlay",s.canPlay.wistia),A(N,"loopOnEnded",!0)}(K0)),K0}var Z0={},V2;function DJ(){return V2||(V2=1,function(t){function e(y){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(b){return typeof b}:e=function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},e(y)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(C),r=jt,s=We;function o(){if(typeof WeakMap!="function")return null;var y=new WeakMap;return o=function(){return y},y}function a(y){if(y&&y.__esModule)return y;if(y===null||e(y)!=="object"&&typeof y!="function")return{default:y};var v=o();if(v&&v.has(y))return v.get(y);var b={},P=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in y)if(Object.prototype.hasOwnProperty.call(y,F)){var I=P?Object.getOwnPropertyDescriptor(y,F):null;I&&(I.get||I.set)?Object.defineProperty(b,F,I):b[F]=y[F]}return b.default=y,v&&v.set(y,b),b}function l(y,v){var b=Object.keys(y);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(y);v&&(P=P.filter(function(F){return Object.getOwnPropertyDescriptor(y,F).enumerable})),b.push.apply(b,P)}return b}function c(y){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?l(Object(b),!0).forEach(function(P){A(y,P,b[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(b)):l(Object(b)).forEach(function(P){Object.defineProperty(y,P,Object.getOwnPropertyDescriptor(b,P))})}return y}function d(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function u(y,v){for(var b=0;b<v.length;b++){var P=v[b];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(y,P.key,P)}}function f(y,v,b){return v&&u(y.prototype,v),b&&u(y,b),y}function g(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(v&&v.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),v&&E(y,v)}function E(y,v){return E=Object.setPrototypeOf||function(P,F){return P.__proto__=F,P},E(y,v)}function S(y){var v=h();return function(){var P=m(y),F;if(v){var I=m(this).constructor;F=Reflect.construct(P,arguments,I)}else F=P.apply(this,arguments);return w(this,F)}}function w(y,v){return v&&(e(v)==="object"||typeof v=="function")?v:_(y)}function _(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}function h(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function m(y){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},m(y)}function A(y,v,b){return v in y?Object.defineProperty(y,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[v]=b,y}var k="https://player.twitch.tv/js/embed/v1.js",R="Twitch",O="twitch-player-",N=function(y){g(b,y);var v=S(b);function b(){var P;d(this,b);for(var F=arguments.length,I=new Array(F),T=0;T<F;T++)I[T]=arguments[T];return P=v.call.apply(v,[this].concat(I)),A(_(P),"callPlayer",r.callPlayer),A(_(P),"playerID",P.props.config.playerId||"".concat(O).concat((0,r.randomString)())),A(_(P),"mute",function(){P.callPlayer("setMuted",!0)}),A(_(P),"unmute",function(){P.callPlayer("setMuted",!1)}),P}return f(b,[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(F,I){var T=this,q=this.props,W=q.playsinline,G=q.onError,H=q.config,j=q.controls,U=s.MATCH_URL_TWITCH_CHANNEL.test(F),L=U?F.match(s.MATCH_URL_TWITCH_CHANNEL)[1]:F.match(s.MATCH_URL_TWITCH_VIDEO)[1];if(I){U?this.player.setChannel(L):this.player.setVideo("v"+L);return}(0,r.getSDK)(k,R).then(function(K){T.player=new K.Player(T.playerID,c({video:U?"":L,channel:U?L:"",height:"100%",width:"100%",playsinline:W,autoplay:T.props.playing,muted:T.props.muted,controls:U?!0:j,time:(0,r.parseStartTime)(F)},H.options));var Y=K.Player,te=Y.READY,J=Y.PLAYING,Q=Y.PAUSE,oe=Y.ENDED,pe=Y.ONLINE,ye=Y.OFFLINE,Pe=Y.SEEK;T.player.addEventListener(te,T.props.onReady),T.player.addEventListener(J,T.props.onPlay),T.player.addEventListener(Q,T.props.onPause),T.player.addEventListener(oe,T.props.onEnded),T.player.addEventListener(Pe,T.props.onSeek),T.player.addEventListener(pe,T.props.onLoaded),T.player.addEventListener(ye,T.props.onLoaded)},G)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("pause")}},{key:"seekTo",value:function(F){this.callPlayer("seek",F)}},{key:"setVolume",value:function(F){this.callPlayer("setVolume",F)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var F={width:"100%",height:"100%"};return n.default.createElement("div",{style:F,id:this.playerID})}}]),b}(n.Component);t.default=N,A(N,"displayName","Twitch"),A(N,"canPlay",s.canPlay.twitch),A(N,"loopOnEnded",!0)}(Z0)),Z0}var J0={},K2;function kJ(){return K2||(K2=1,function(t){function e(T){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(W){return typeof W}:e=function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},e(T)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(C),r=jt,s=We;function o(){if(typeof WeakMap!="function")return null;var T=new WeakMap;return o=function(){return T},T}function a(T){if(T&&T.__esModule)return T;if(T===null||e(T)!=="object"&&typeof T!="function")return{default:T};var q=o();if(q&&q.has(T))return q.get(T);var W={},G=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var H in T)if(Object.prototype.hasOwnProperty.call(T,H)){var j=G?Object.getOwnPropertyDescriptor(T,H):null;j&&(j.get||j.set)?Object.defineProperty(W,H,j):W[H]=T[H]}return W.default=T,q&&q.set(T,W),W}function l(T,q){var W=Object.keys(T);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(T);q&&(G=G.filter(function(H){return Object.getOwnPropertyDescriptor(T,H).enumerable})),W.push.apply(W,G)}return W}function c(T){for(var q=1;q<arguments.length;q++){var W=arguments[q]!=null?arguments[q]:{};q%2?l(Object(W),!0).forEach(function(G){v(T,G,W[G])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(W)):l(Object(W)).forEach(function(G){Object.defineProperty(T,G,Object.getOwnPropertyDescriptor(W,G))})}return T}function d(T,q){return S(T)||E(T,q)||f(T,q)||u()}function u(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(T,q){if(T){if(typeof T=="string")return g(T,q);var W=Object.prototype.toString.call(T).slice(8,-1);if(W==="Object"&&T.constructor&&(W=T.constructor.name),W==="Map"||W==="Set")return Array.from(T);if(W==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(W))return g(T,q)}}function g(T,q){(q==null||q>T.length)&&(q=T.length);for(var W=0,G=new Array(q);W<q;W++)G[W]=T[W];return G}function E(T,q){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(T)))){var W=[],G=!0,H=!1,j=void 0;try{for(var U=T[Symbol.iterator](),L;!(G=(L=U.next()).done)&&(W.push(L.value),!(q&&W.length===q));G=!0);}catch(K){H=!0,j=K}finally{try{!G&&U.return!=null&&U.return()}finally{if(H)throw j}}return W}}function S(T){if(Array.isArray(T))return T}function w(T,q){if(!(T instanceof q))throw new TypeError("Cannot call a class as a function")}function _(T,q){for(var W=0;W<q.length;W++){var G=q[W];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(T,G.key,G)}}function h(T,q,W){return q&&_(T.prototype,q),W&&_(T,W),T}function m(T,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(q&&q.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),q&&A(T,q)}function A(T,q){return A=Object.setPrototypeOf||function(G,H){return G.__proto__=H,G},A(T,q)}function k(T){var q=N();return function(){var G=y(T),H;if(q){var j=y(this).constructor;H=Reflect.construct(G,arguments,j)}else H=G.apply(this,arguments);return R(this,H)}}function R(T,q){return q&&(e(q)==="object"||typeof q=="function")?q:O(T)}function O(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T}function N(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function y(T){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(W){return W.__proto__||Object.getPrototypeOf(W)},y(T)}function v(T,q,W){return q in T?Object.defineProperty(T,q,{value:W,enumerable:!0,configurable:!0,writable:!0}):T[q]=W,T}var b="https://api.dmcdn.net/all.js",P="DM",F="dmAsyncInit",I=function(T){m(W,T);var q=k(W);function W(){var G;w(this,W);for(var H=arguments.length,j=new Array(H),U=0;U<H;U++)j[U]=arguments[U];return G=q.call.apply(q,[this].concat(j)),v(O(G),"callPlayer",r.callPlayer),v(O(G),"onDurationChange",function(){var L=G.getDuration();G.props.onDuration(L)}),v(O(G),"mute",function(){G.callPlayer("setMuted",!0)}),v(O(G),"unmute",function(){G.callPlayer("setMuted",!1)}),v(O(G),"ref",function(L){G.container=L}),G}return h(W,[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(H){var j=this,U=this.props,L=U.controls,K=U.config,Y=U.onError,te=U.playing,J=H.match(s.MATCH_URL_DAILYMOTION),Q=d(J,2),oe=Q[1];if(this.player){this.player.load(oe,{start:(0,r.parseStartTime)(H),autoplay:te});return}(0,r.getSDK)(b,P,F,function(pe){return pe.player}).then(function(pe){if(j.container){var ye=pe.player;j.player=new ye(j.container,{width:"100%",height:"100%",video:oe,params:c({controls:L,autoplay:j.props.playing,mute:j.props.muted,start:(0,r.parseStartTime)(H),origin:window.location.origin},K.params),events:{apiready:j.props.onReady,seeked:function(){return j.props.onSeek(j.player.currentTime)},video_end:j.props.onEnded,durationchange:j.onDurationChange,pause:j.props.onPause,playing:j.props.onPlay,waiting:j.props.onBuffer,error:function(Me){return Y(Me)}}})}},Y)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(H){this.callPlayer("seek",H)}},{key:"setVolume",value:function(H){this.callPlayer("setVolume",H)}},{key:"getDuration",value:function(){return this.player.duration||null}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){return this.player.bufferedTime}},{key:"render",value:function(){var H=this.props.display,j={width:"100%",height:"100%",display:H};return n.default.createElement("div",{style:j},n.default.createElement("div",{ref:this.ref}))}}]),W}(n.Component);t.default=I,v(I,"displayName","DailyMotion"),v(I,"canPlay",s.canPlay.dailymotion),v(I,"loopOnEnded",!0)}(J0)),J0}var X0={},Z2;function TJ(){return Z2||(Z2=1,function(t){function e(N){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(v){return typeof v}:e=function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},e(N)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(C),r=jt,s=We;function o(){if(typeof WeakMap!="function")return null;var N=new WeakMap;return o=function(){return N},N}function a(N){if(N&&N.__esModule)return N;if(N===null||e(N)!=="object"&&typeof N!="function")return{default:N};var y=o();if(y&&y.has(N))return y.get(N);var v={},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var P in N)if(Object.prototype.hasOwnProperty.call(N,P)){var F=b?Object.getOwnPropertyDescriptor(N,P):null;F&&(F.get||F.set)?Object.defineProperty(v,P,F):v[P]=N[P]}return v.default=N,y&&y.set(N,v),v}function l(N,y){var v=Object.keys(N);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(N);y&&(b=b.filter(function(P){return Object.getOwnPropertyDescriptor(N,P).enumerable})),v.push.apply(v,b)}return v}function c(N){for(var y=1;y<arguments.length;y++){var v=arguments[y]!=null?arguments[y]:{};y%2?l(Object(v),!0).forEach(function(b){A(N,b,v[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(N,Object.getOwnPropertyDescriptors(v)):l(Object(v)).forEach(function(b){Object.defineProperty(N,b,Object.getOwnPropertyDescriptor(v,b))})}return N}function d(N,y){if(!(N instanceof y))throw new TypeError("Cannot call a class as a function")}function u(N,y){for(var v=0;v<y.length;v++){var b=y[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(N,b.key,b)}}function f(N,y,v){return y&&u(N.prototype,y),v&&u(N,v),N}function g(N,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(y&&y.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),y&&E(N,y)}function E(N,y){return E=Object.setPrototypeOf||function(b,P){return b.__proto__=P,b},E(N,y)}function S(N){var y=h();return function(){var b=m(N),P;if(y){var F=m(this).constructor;P=Reflect.construct(b,arguments,F)}else P=b.apply(this,arguments);return w(this,P)}}function w(N,y){return y&&(e(y)==="object"||typeof y=="function")?y:_(N)}function _(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}function h(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function m(N){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},m(N)}function A(N,y,v){return y in N?Object.defineProperty(N,y,{value:v,enumerable:!0,configurable:!0,writable:!0}):N[y]=v,N}var k="https://widget.mixcloud.com/media/js/widgetApi.js",R="Mixcloud",O=function(N){g(v,N);var y=S(v);function v(){var b;d(this,v);for(var P=arguments.length,F=new Array(P),I=0;I<P;I++)F[I]=arguments[I];return b=y.call.apply(y,[this].concat(F)),A(_(b),"callPlayer",r.callPlayer),A(_(b),"duration",null),A(_(b),"currentTime",null),A(_(b),"secondsLoaded",null),A(_(b),"mute",function(){}),A(_(b),"unmute",function(){}),A(_(b),"ref",function(T){b.iframe=T}),b}return f(v,[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(P){var F=this;(0,r.getSDK)(k,R).then(function(I){F.player=I.PlayerWidget(F.iframe),F.player.ready.then(function(){F.player.events.play.on(F.props.onPlay),F.player.events.pause.on(F.props.onPause),F.player.events.ended.on(F.props.onEnded),F.player.events.error.on(F.props.error),F.player.events.progress.on(function(T,q){F.currentTime=T,F.duration=q}),F.props.onReady()})},this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(P){this.callPlayer("seek",P)}},{key:"setVolume",value:function(P){}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var P=this.props,F=P.url,I=P.config,T=F.match(s.MATCH_URL_MIXCLOUD)[1],q={width:"100%",height:"100%"},W=(0,r.queryString)(c(c({},I.options),{},{feed:"/".concat(T,"/")}));return n.default.createElement("iframe",{key:T,ref:this.ref,style:q,src:"https://www.mixcloud.com/widget/iframe/?".concat(W),frameBorder:"0",allow:"autoplay"})}}]),v}(n.Component);t.default=O,A(O,"displayName","Mixcloud"),A(O,"canPlay",s.canPlay.mixcloud),A(O,"loopOnEnded",!0)}(X0)),X0}var Q0={},J2;function IJ(){return J2||(J2=1,function(t){function e(y){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(b){return typeof b}:e=function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},e(y)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(C),r=jt,s=We;function o(){if(typeof WeakMap!="function")return null;var y=new WeakMap;return o=function(){return y},y}function a(y){if(y&&y.__esModule)return y;if(y===null||e(y)!=="object"&&typeof y!="function")return{default:y};var v=o();if(v&&v.has(y))return v.get(y);var b={},P=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in y)if(Object.prototype.hasOwnProperty.call(y,F)){var I=P?Object.getOwnPropertyDescriptor(y,F):null;I&&(I.get||I.set)?Object.defineProperty(b,F,I):b[F]=y[F]}return b.default=y,v&&v.set(y,b),b}function l(y,v){var b=Object.keys(y);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(y);v&&(P=P.filter(function(F){return Object.getOwnPropertyDescriptor(y,F).enumerable})),b.push.apply(b,P)}return b}function c(y){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?l(Object(b),!0).forEach(function(P){A(y,P,b[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(b)):l(Object(b)).forEach(function(P){Object.defineProperty(y,P,Object.getOwnPropertyDescriptor(b,P))})}return y}function d(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function u(y,v){for(var b=0;b<v.length;b++){var P=v[b];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(y,P.key,P)}}function f(y,v,b){return v&&u(y.prototype,v),b&&u(y,b),y}function g(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(v&&v.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),v&&E(y,v)}function E(y,v){return E=Object.setPrototypeOf||function(P,F){return P.__proto__=F,P},E(y,v)}function S(y){var v=h();return function(){var P=m(y),F;if(v){var I=m(this).constructor;F=Reflect.construct(P,arguments,I)}else F=P.apply(this,arguments);return w(this,F)}}function w(y,v){return v&&(e(v)==="object"||typeof v=="function")?v:_(y)}function _(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}function h(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function m(y){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},m(y)}function A(y,v,b){return v in y?Object.defineProperty(y,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[v]=b,y}var k="https://play.vidyard.com/embed/v4.js",R="VidyardV4",O="onVidyardAPI",N=function(y){g(b,y);var v=S(b);function b(){var P;d(this,b);for(var F=arguments.length,I=new Array(F),T=0;T<F;T++)I[T]=arguments[T];return P=v.call.apply(v,[this].concat(I)),A(_(P),"callPlayer",r.callPlayer),A(_(P),"mute",function(){P.setVolume(0)}),A(_(P),"unmute",function(){P.props.volume!==null&&P.setVolume(P.props.volume)}),A(_(P),"ref",function(q){P.container=q}),P}return f(b,[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(F){var I=this,T=this.props,q=T.playing,W=T.config,G=T.onError,H=T.onDuration,j=F&&F.match(s.MATCH_URL_VIDYARD)[1];this.player&&this.stop(),(0,r.getSDK)(k,R,O).then(function(U){I.container&&(U.api.addReadyListener(function(L,K){I.player||(I.player=K,I.player.on("ready",I.props.onReady),I.player.on("play",I.props.onPlay),I.player.on("pause",I.props.onPause),I.player.on("seek",I.props.onSeek),I.player.on("playerComplete",I.props.onEnded))},j),U.api.renderPlayer(c({uuid:j,container:I.container,autoplay:q?1:0},W.options)),U.api.getPlayerMetadata(j).then(function(L){I.duration=L.length_in_seconds,H(L.length_in_seconds)}))},G)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){window.VidyardV4.api.destroyPlayer(this.player)}},{key:"seekTo",value:function(F){this.callPlayer("seek",F)}},{key:"setVolume",value:function(F){this.callPlayer("setVolume",F)}},{key:"setPlaybackRate",value:function(F){this.callPlayer("setPlaybackSpeed",F)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.callPlayer("currentTime")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var F=this.props.display,I={width:"100%",height:"100%",display:F};return n.default.createElement("div",{style:I},n.default.createElement("div",{ref:this.ref}))}}]),b}(n.Component);t.default=N,A(N,"displayName","Vidyard"),A(N,"canPlay",s.canPlay.vidyard)}(Q0)),Q0}var e_={},X2;function MJ(){return X2||(X2=1,function(t){function e(R){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(N){return typeof N}:e=function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},e(R)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(C),r=jt,s=We;function o(){if(typeof WeakMap!="function")return null;var R=new WeakMap;return o=function(){return R},R}function a(R){if(R&&R.__esModule)return R;if(R===null||e(R)!=="object"&&typeof R!="function")return{default:R};var O=o();if(O&&O.has(R))return O.get(R);var N={},y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in R)if(Object.prototype.hasOwnProperty.call(R,v)){var b=y?Object.getOwnPropertyDescriptor(R,v):null;b&&(b.get||b.set)?Object.defineProperty(N,v,b):N[v]=R[v]}return N.default=R,O&&O.set(R,N),N}function l(R,O){if(!(R instanceof O))throw new TypeError("Cannot call a class as a function")}function c(R,O){for(var N=0;N<O.length;N++){var y=O[N];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(R,y.key,y)}}function d(R,O,N){return O&&c(R.prototype,O),N&&c(R,N),R}function u(R,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(O&&O.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),O&&f(R,O)}function f(R,O){return f=Object.setPrototypeOf||function(y,v){return y.__proto__=v,y},f(R,O)}function g(R){var O=w();return function(){var y=_(R),v;if(O){var b=_(this).constructor;v=Reflect.construct(y,arguments,b)}else v=y.apply(this,arguments);return E(this,v)}}function E(R,O){return O&&(e(O)==="object"||typeof O=="function")?O:S(R)}function S(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function _(R){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(N){return N.__proto__||Object.getPrototypeOf(N)},_(R)}function h(R,O,N){return O in R?Object.defineProperty(R,O,{value:N,enumerable:!0,configurable:!0,writable:!0}):R[O]=N,R}var m="https://cdn.embed.ly/player-0.1.0.min.js",A="playerjs",k=function(R){u(N,R);var O=g(N);function N(){var y;l(this,N);for(var v=arguments.length,b=new Array(v),P=0;P<v;P++)b[P]=arguments[P];return y=O.call.apply(O,[this].concat(b)),h(S(y),"callPlayer",r.callPlayer),h(S(y),"duration",null),h(S(y),"currentTime",null),h(S(y),"secondsLoaded",null),h(S(y),"mute",function(){y.callPlayer("mute")}),h(S(y),"unmute",function(){y.callPlayer("unmute")}),h(S(y),"ref",function(F){y.iframe=F}),y}return d(N,[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function(v){var b=this;(0,r.getSDK)(m,A).then(function(P){b.iframe&&(b.player=new P.Player(b.iframe),b.player.on("ready",function(){setTimeout(function(){b.player.isReady=!0,b.player.setLoop(b.props.loop),b.props.muted&&b.player.mute(),b.addListeners(b.player,b.props),b.props.onReady()},500)}))},this.props.onError)}},{key:"addListeners",value:function(v,b){var P=this;v.on("play",b.onPlay),v.on("pause",b.onPause),v.on("ended",b.onEnded),v.on("error",b.onError),v.on("timeupdate",function(F){var I=F.duration,T=F.seconds;P.duration=I,P.currentTime=T})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(v){this.callPlayer("setCurrentTime",v)}},{key:"setVolume",value:function(v){this.callPlayer("setVolume",v)}},{key:"setLoop",value:function(v){this.callPlayer("setLoop",v)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var v={width:"100%",height:"100%"};return n.default.createElement("iframe",{ref:this.ref,src:this.props.url,frameBorder:"0",scrolling:"no",style:v,allow:"encrypted-media; autoplay; fullscreen;",referrerPolicy:"no-referrer-when-downgrade"})}}]),N}(n.Component);t.default=k,h(k,"displayName","Kaltura"),h(k,"canPlay",s.canPlay.kaltura)}(e_)),e_}var t_={},Q2;function LJ(){return Q2||(Q2=1,function(t){function e(W){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(H){return typeof H}:e=function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},e(W)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(C),r=jt,s=We;function o(){if(typeof WeakMap!="function")return null;var W=new WeakMap;return o=function(){return W},W}function a(W){if(W&&W.__esModule)return W;if(W===null||e(W)!=="object"&&typeof W!="function")return{default:W};var G=o();if(G&&G.has(W))return G.get(W);var H={},j=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var U in W)if(Object.prototype.hasOwnProperty.call(W,U)){var L=j?Object.getOwnPropertyDescriptor(W,U):null;L&&(L.get||L.set)?Object.defineProperty(H,U,L):H[U]=W[U]}return H.default=W,G&&G.set(W,H),H}function l(){return l=Object.assign||function(W){for(var G=1;G<arguments.length;G++){var H=arguments[G];for(var j in H)Object.prototype.hasOwnProperty.call(H,j)&&(W[j]=H[j])}return W},l.apply(this,arguments)}function c(W,G){if(!(W instanceof G))throw new TypeError("Cannot call a class as a function")}function d(W,G){for(var H=0;H<G.length;H++){var j=G[H];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(W,j.key,j)}}function u(W,G,H){return G&&d(W.prototype,G),H&&d(W,H),W}function f(W,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function");W.prototype=Object.create(G&&G.prototype,{constructor:{value:W,writable:!0,configurable:!0}}),G&&g(W,G)}function g(W,G){return g=Object.setPrototypeOf||function(j,U){return j.__proto__=U,j},g(W,G)}function E(W){var G=_();return function(){var j=h(W),U;if(G){var L=h(this).constructor;U=Reflect.construct(j,arguments,L)}else U=j.apply(this,arguments);return S(this,U)}}function S(W,G){return G&&(e(G)==="object"||typeof G=="function")?G:w(W)}function w(W){if(W===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W}function _(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function h(W){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(H){return H.__proto__||Object.getPrototypeOf(H)},h(W)}function m(W,G,H){return G in W?Object.defineProperty(W,G,{value:H,enumerable:!0,configurable:!0,writable:!0}):W[G]=H,W}var A=typeof navigator<"u",k=A&&navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,R=A&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||k)&&!window.MSStream,O="https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js",N="Hls",y="https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js",v="dashjs",b="https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js",P="flvjs",F=/www\.dropbox\.com\/.+/,I=/https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/,T="https://videodelivery.net/{id}/manifest/video.m3u8",q=function(W){f(H,W);var G=E(H);function H(){var j;c(this,H);for(var U=arguments.length,L=new Array(U),K=0;K<U;K++)L[K]=arguments[K];return j=G.call.apply(G,[this].concat(L)),m(w(j),"onReady",function(){var Y;return(Y=j.props).onReady.apply(Y,arguments)}),m(w(j),"onPlay",function(){var Y;return(Y=j.props).onPlay.apply(Y,arguments)}),m(w(j),"onBuffer",function(){var Y;return(Y=j.props).onBuffer.apply(Y,arguments)}),m(w(j),"onBufferEnd",function(){var Y;return(Y=j.props).onBufferEnd.apply(Y,arguments)}),m(w(j),"onPause",function(){var Y;return(Y=j.props).onPause.apply(Y,arguments)}),m(w(j),"onEnded",function(){var Y;return(Y=j.props).onEnded.apply(Y,arguments)}),m(w(j),"onError",function(){var Y;return(Y=j.props).onError.apply(Y,arguments)}),m(w(j),"onPlayBackRateChange",function(Y){return j.props.onPlaybackRateChange(Y.target.playbackRate)}),m(w(j),"onEnablePIP",function(){var Y;return(Y=j.props).onEnablePIP.apply(Y,arguments)}),m(w(j),"onDisablePIP",function(Y){var te=j.props,J=te.onDisablePIP,Q=te.playing;J(Y),Q&&j.play()}),m(w(j),"onPresentationModeChange",function(Y){if(j.player&&(0,r.supportsWebKitPresentationMode)(j.player)){var te=j.player.webkitPresentationMode;te==="picture-in-picture"?j.onEnablePIP(Y):te==="inline"&&j.onDisablePIP(Y)}}),m(w(j),"onSeek",function(Y){j.props.onSeek(Y.target.currentTime)}),m(w(j),"mute",function(){j.player.muted=!0}),m(w(j),"unmute",function(){j.player.muted=!1}),m(w(j),"renderSourceElement",function(Y,te){return typeof Y=="string"?n.default.createElement("source",{key:te,src:Y}):n.default.createElement("source",l({key:te},Y))}),m(w(j),"renderTrack",function(Y,te){return n.default.createElement("track",l({key:te},Y))}),m(w(j),"ref",function(Y){j.player&&(j.prevPlayer=j.player),j.player=Y}),j}return u(H,[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this),this.addListeners(this.player),R&&this.player.load()}},{key:"componentDidUpdate",value:function(U){this.shouldUseAudio(this.props)!==this.shouldUseAudio(U)&&(this.removeListeners(this.prevPlayer,U.url),this.addListeners(this.player)),this.props.url!==U.url&&!(0,r.isMediaStream)(this.props.url)&&(this.player.srcObject=null)}},{key:"componentWillUnmount",value:function(){this.player.src="",this.removeListeners(this.player),this.hls&&this.hls.destroy()}},{key:"addListeners",value:function(U){var L=this.props,K=L.url,Y=L.playsinline;U.addEventListener("play",this.onPlay),U.addEventListener("waiting",this.onBuffer),U.addEventListener("playing",this.onBufferEnd),U.addEventListener("pause",this.onPause),U.addEventListener("seeked",this.onSeek),U.addEventListener("ended",this.onEnded),U.addEventListener("error",this.onError),U.addEventListener("ratechange",this.onPlayBackRateChange),U.addEventListener("enterpictureinpicture",this.onEnablePIP),U.addEventListener("leavepictureinpicture",this.onDisablePIP),U.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(K)||U.addEventListener("canplay",this.onReady),Y&&(U.setAttribute("playsinline",""),U.setAttribute("webkit-playsinline",""),U.setAttribute("x5-playsinline",""))}},{key:"removeListeners",value:function(U,L){U.removeEventListener("canplay",this.onReady),U.removeEventListener("play",this.onPlay),U.removeEventListener("waiting",this.onBuffer),U.removeEventListener("playing",this.onBufferEnd),U.removeEventListener("pause",this.onPause),U.removeEventListener("seeked",this.onSeek),U.removeEventListener("ended",this.onEnded),U.removeEventListener("error",this.onError),U.removeEventListener("ratechange",this.onPlayBackRateChange),U.removeEventListener("enterpictureinpicture",this.onEnablePIP),U.removeEventListener("leavepictureinpicture",this.onDisablePIP),U.removeEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(L)||U.removeEventListener("canplay",this.onReady)}},{key:"shouldUseAudio",value:function(U){return U.config.forceVideo||U.config.attributes.poster?!1:s.AUDIO_EXTENSIONS.test(U.url)||U.config.forceAudio}},{key:"shouldUseHLS",value:function(U){return this.props.config.forceHLS?!0:R?!1:s.HLS_EXTENSIONS.test(U)||I.test(U)}},{key:"shouldUseDASH",value:function(U){return s.DASH_EXTENSIONS.test(U)||this.props.config.forceDASH}},{key:"shouldUseFLV",value:function(U){return s.FLV_EXTENSIONS.test(U)||this.props.config.forceFLV}},{key:"load",value:function(U){var L=this,K=this.props.config,Y=K.hlsVersion,te=K.hlsOptions,J=K.dashVersion,Q=K.flvVersion;if(this.hls&&this.hls.destroy(),this.dash&&this.dash.reset(),this.shouldUseHLS(U)&&(0,r.getSDK)(O.replace("VERSION",Y),N).then(function(oe){if(L.hls=new oe(te),L.hls.on(oe.Events.MANIFEST_PARSED,function(){L.props.onReady()}),L.hls.on(oe.Events.ERROR,function(ye,Pe){L.props.onError(ye,Pe,L.hls,oe)}),I.test(U)){var pe=U.match(I)[1];L.hls.loadSource(T.replace("{id}",pe))}else L.hls.loadSource(U);L.hls.attachMedia(L.player),L.props.onLoaded()}),this.shouldUseDASH(U)&&(0,r.getSDK)(y.replace("VERSION",J),v).then(function(oe){L.dash=oe.MediaPlayer().create(),L.dash.initialize(L.player,U,L.props.playing),L.dash.on("error",L.props.onError),parseInt(J)<3?L.dash.getDebug().setLogToBrowserConsole(!1):L.dash.updateSettings({debug:{logLevel:oe.Debug.LOG_LEVEL_NONE}}),L.props.onLoaded()}),this.shouldUseFLV(U)&&(0,r.getSDK)(b.replace("VERSION",Q),P).then(function(oe){L.flv=oe.createPlayer({type:"flv",url:U}),L.flv.attachMediaElement(L.player),L.flv.on(oe.Events.ERROR,function(pe,ye){L.props.onError(pe,ye,L.flv,oe)}),L.flv.load(),L.props.onLoaded()}),U instanceof Array)this.player.load();else if((0,r.isMediaStream)(U))try{this.player.srcObject=U}catch{this.player.src=window.URL.createObjectURL(U)}}},{key:"play",value:function(){var U=this.player.play();U&&U.catch(this.props.onError)}},{key:"pause",value:function(){this.player.pause()}},{key:"stop",value:function(){this.player.removeAttribute("src"),this.dash&&this.dash.reset()}},{key:"seekTo",value:function(U){this.player.currentTime=U}},{key:"setVolume",value:function(U){this.player.volume=U}},{key:"enablePIP",value:function(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player?this.player.requestPictureInPicture():(0,r.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="picture-in-picture"&&this.player.webkitSetPresentationMode("picture-in-picture")}},{key:"disablePIP",value:function(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player?document.exitPictureInPicture():(0,r.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="inline"&&this.player.webkitSetPresentationMode("inline")}},{key:"setPlaybackRate",value:function(U){try{this.player.playbackRate=U}catch(L){this.props.onError(L)}}},{key:"getDuration",value:function(){if(!this.player)return null;var U=this.player,L=U.duration,K=U.seekable;return L===1/0&&K.length>0?K.end(K.length-1):L}},{key:"getCurrentTime",value:function(){return this.player?this.player.currentTime:null}},{key:"getSecondsLoaded",value:function(){if(!this.player)return null;var U=this.player.buffered;if(U.length===0)return 0;var L=U.end(U.length-1),K=this.getDuration();return L>K?K:L}},{key:"getSource",value:function(U){var L=this.shouldUseHLS(U),K=this.shouldUseDASH(U),Y=this.shouldUseFLV(U);if(!(U instanceof Array||(0,r.isMediaStream)(U)||L||K||Y))return F.test(U)?U.replace("www.dropbox.com","dl.dropboxusercontent.com"):U}},{key:"render",value:function(){var U=this.props,L=U.url,K=U.playing,Y=U.loop,te=U.controls,J=U.muted,Q=U.config,oe=U.width,pe=U.height,ye=this.shouldUseAudio(this.props),Pe=ye?"audio":"video",Me={width:oe==="auto"?oe:"100%",height:pe==="auto"?pe:"100%"};return n.default.createElement(Pe,l({ref:this.ref,src:this.getSource(L),style:Me,preload:"auto",autoPlay:K||void 0,controls:te,muted:J,loop:Y},Q.attributes),L instanceof Array&&L.map(this.renderSourceElement),Q.tracks.map(this.renderTrack))}}]),H}(n.Component);t.default=q,m(q,"displayName","FilePlayer"),m(q,"canPlay",s.canPlay.file)}(t_)),t_}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=C,n=jt,r=We;function s(c){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?s=function(u){return typeof u}:s=function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},s(c)}function o(){if(typeof WeakMap!="function")return null;var c=new WeakMap;return o=function(){return c},c}function a(c){if(c&&c.__esModule)return c;if(c===null||s(c)!=="object"&&typeof c!="function")return{default:c};var d=o();if(d&&d.has(c))return d.get(c);var u={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in c)if(Object.prototype.hasOwnProperty.call(c,g)){var E=f?Object.getOwnPropertyDescriptor(c,g):null;E&&(E.get||E.set)?Object.defineProperty(u,g,E):u[g]=c[g]}return u.default=c,d&&d.set(c,u),u}var l=[{key:"youtube",name:"YouTube",canPlay:r.canPlay.youtube,lazyPlayer:(0,e.lazy)(function(){return Promise.resolve().then(function(){return a(AJ())})})},{key:"soundcloud",name:"SoundCloud",canPlay:r.canPlay.soundcloud,lazyPlayer:(0,e.lazy)(function(){return Promise.resolve().then(function(){return a(NJ())})})},{key:"vimeo",name:"Vimeo",canPlay:r.canPlay.vimeo,lazyPlayer:(0,e.lazy)(function(){return Promise.resolve().then(function(){return a(RJ())})})},{key:"facebook",name:"Facebook",canPlay:r.canPlay.facebook,lazyPlayer:(0,e.lazy)(function(){return Promise.resolve().then(function(){return a(PJ())})})},{key:"streamable",name:"Streamable",canPlay:r.canPlay.streamable,lazyPlayer:(0,e.lazy)(function(){return Promise.resolve().then(function(){return a(OJ())})})},{key:"wistia",name:"Wistia",canPlay:r.canPlay.wistia,lazyPlayer:(0,e.lazy)(function(){return Promise.resolve().then(function(){return a(FJ())})})},{key:"twitch",name:"Twitch",canPlay:r.canPlay.twitch,lazyPlayer:(0,e.lazy)(function(){return Promise.resolve().then(function(){return a(DJ())})})},{key:"dailymotion",name:"DailyMotion",canPlay:r.canPlay.dailymotion,lazyPlayer:(0,e.lazy)(function(){return Promise.resolve().then(function(){return a(kJ())})})},{key:"mixcloud",name:"Mixcloud",canPlay:r.canPlay.mixcloud,lazyPlayer:(0,e.lazy)(function(){return Promise.resolve().then(function(){return a(TJ())})})},{key:"vidyard",name:"Vidyard",canPlay:r.canPlay.vidyard,lazyPlayer:(0,e.lazy)(function(){return Promise.resolve().then(function(){return a(IJ())})})},{key:"kaltura",name:"Kaltura",canPlay:r.canPlay.kaltura,lazyPlayer:(0,e.lazy)(function(){return Promise.resolve().then(function(){return a(MJ())})})},{key:"file",name:"FilePlayer",canPlay:r.canPlay.file,canEnablePIP:function(d){return r.canPlay.file(d)&&(document.pictureInPictureEnabled||(0,n.supportsWebKitPresentationMode)())&&!r.AUDIO_EXTENSIONS.test(d)},lazyPlayer:(0,e.lazy)(function(){return Promise.resolve().then(function(){return a(LJ())})})}];t.default=l})(TL);var jb={},eP=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function zJ(t,e){return!!(t===e||eP(t)&&eP(e))}function qJ(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!zJ(t[n],e[n]))return!1;return!0}function jJ(t,e){e===void 0&&(e=qJ);var n,r=[],s,o=!1;function a(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return o&&n===this&&e(l,r)||(s=t.apply(this,l),o=!0,n=this,r=l),s}return a}const $J=Object.freeze(Object.defineProperty({__proto__:null,default:jJ},Symbol.toStringTag,{value:"Module"})),BJ=nU($J);var Hl={};Object.defineProperty(Hl,"__esModule",{value:!0});Hl.defaultProps=Hl.propTypes=void 0;var Ii=UJ(yI);function UJ(t){return t&&t.__esModule?t:{default:t}}var _r=Ii.default.string,Gr=Ii.default.bool,Ac=Ii.default.number,n_=Ii.default.array,Bu=Ii.default.oneOfType,us=Ii.default.shape,wr=Ii.default.object,Yn=Ii.default.func,tP=Ii.default.node,YJ={url:Bu([_r,n_,wr]),playing:Gr,loop:Gr,controls:Gr,volume:Ac,muted:Gr,playbackRate:Ac,width:Bu([_r,Ac]),height:Bu([_r,Ac]),style:wr,progressInterval:Ac,playsinline:Gr,pip:Gr,stopOnUnmount:Gr,light:Bu([Gr,_r,wr]),playIcon:tP,previewTabIndex:Ac,fallback:tP,oEmbedUrl:_r,wrapper:Bu([_r,Yn,us({render:Yn.isRequired})]),config:us({soundcloud:us({options:wr}),youtube:us({playerVars:wr,embedOptions:wr,onUnstarted:Yn}),facebook:us({appId:_r,version:_r,playerId:_r,attributes:wr}),dailymotion:us({params:wr}),vimeo:us({playerOptions:wr,title:_r}),file:us({attributes:wr,tracks:n_,forceVideo:Gr,forceAudio:Gr,forceHLS:Gr,forceDASH:Gr,forceFLV:Gr,hlsOptions:wr,hlsVersion:_r,dashVersion:_r,flvVersion:_r}),wistia:us({options:wr,playerId:_r,customControls:n_}),mixcloud:us({options:wr}),twitch:us({options:wr,playerId:_r}),vidyard:us({options:wr})}),onReady:Yn,onStart:Yn,onPlay:Yn,onPause:Yn,onBuffer:Yn,onBufferEnd:Yn,onEnded:Yn,onError:Yn,onDuration:Yn,onSeek:Yn,onPlaybackRateChange:Yn,onProgress:Yn,onClickPreview:Yn,onEnablePIP:Yn,onDisablePIP:Yn};Hl.propTypes=YJ;var ir=function(){},HJ={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,oEmbedUrl:"https://noembed.com/embed?url={url}",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:ir},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},title:null},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"1.1.4",dashVersion:"3.1.3",flvVersion:"1.5.0"},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:ir,onStart:ir,onPlay:ir,onPause:ir,onBuffer:ir,onBufferEnd:ir,onEnded:ir,onError:ir,onDuration:ir,onSeek:ir,onPlaybackRateChange:ir,onProgress:ir,onClickPreview:ir,onEnablePIP:ir,onDisablePIP:ir};Hl.defaultProps=HJ;var QL={};(function(t){function e(N){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(v){return typeof v}:e=function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},e(N)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=c(C),r=a(PE),s=Hl,o=jt;function a(N){return N&&N.__esModule?N:{default:N}}function l(){if(typeof WeakMap!="function")return null;var N=new WeakMap;return l=function(){return N},N}function c(N){if(N&&N.__esModule)return N;if(N===null||e(N)!=="object"&&typeof N!="function")return{default:N};var y=l();if(y&&y.has(N))return y.get(N);var v={},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var P in N)if(Object.prototype.hasOwnProperty.call(N,P)){var F=b?Object.getOwnPropertyDescriptor(N,P):null;F&&(F.get||F.set)?Object.defineProperty(v,P,F):v[P]=N[P]}return v.default=N,y&&y.set(N,v),v}function d(){return d=Object.assign||function(N){for(var y=1;y<arguments.length;y++){var v=arguments[y];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(N[b]=v[b])}return N},d.apply(this,arguments)}function u(N,y){if(!(N instanceof y))throw new TypeError("Cannot call a class as a function")}function f(N,y){for(var v=0;v<y.length;v++){var b=y[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(N,b.key,b)}}function g(N,y,v){return y&&f(N.prototype,y),v&&f(N,v),N}function E(N,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(y&&y.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),y&&S(N,y)}function S(N,y){return S=Object.setPrototypeOf||function(b,P){return b.__proto__=P,b},S(N,y)}function w(N){var y=m();return function(){var b=A(N),P;if(y){var F=A(this).constructor;P=Reflect.construct(b,arguments,F)}else P=b.apply(this,arguments);return _(this,P)}}function _(N,y){return y&&(e(y)==="object"||typeof y=="function")?y:h(N)}function h(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}function m(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function A(N){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},A(N)}function k(N,y,v){return y in N?Object.defineProperty(N,y,{value:v,enumerable:!0,configurable:!0,writable:!0}):N[y]=v,N}var R=5e3,O=function(N){E(v,N);var y=w(v);function v(){var b;u(this,v);for(var P=arguments.length,F=new Array(P),I=0;I<P;I++)F[I]=arguments[I];return b=y.call.apply(y,[this].concat(F)),k(h(b),"mounted",!1),k(h(b),"isReady",!1),k(h(b),"isPlaying",!1),k(h(b),"isLoading",!0),k(h(b),"loadOnReady",null),k(h(b),"startOnPlay",!0),k(h(b),"seekOnPlay",null),k(h(b),"onDurationCalled",!1),k(h(b),"handlePlayerMount",function(T){if(b.player){b.progress();return}b.player=T,b.player.load(b.props.url),b.progress()}),k(h(b),"getInternalPlayer",function(T){return b.player?b.player[T]:null}),k(h(b),"progress",function(){if(b.props.url&&b.player&&b.isReady){var T=b.getCurrentTime()||0,q=b.getSecondsLoaded(),W=b.getDuration();if(W){var G={playedSeconds:T,played:T/W};q!==null&&(G.loadedSeconds=q,G.loaded=q/W),(G.playedSeconds!==b.prevPlayed||G.loadedSeconds!==b.prevLoaded)&&b.props.onProgress(G),b.prevPlayed=G.playedSeconds,b.prevLoaded=G.loadedSeconds}}b.progressTimeout=setTimeout(b.progress,b.props.progressFrequency||b.props.progressInterval)}),k(h(b),"handleReady",function(){if(b.mounted){b.isReady=!0,b.isLoading=!1;var T=b.props,q=T.onReady,W=T.playing,G=T.volume,H=T.muted;q(),!H&&G!==null&&b.player.setVolume(G),b.loadOnReady?(b.player.load(b.loadOnReady,!0),b.loadOnReady=null):W&&b.player.play(),b.handleDurationCheck()}}),k(h(b),"handlePlay",function(){b.isPlaying=!0,b.isLoading=!1;var T=b.props,q=T.onStart,W=T.onPlay,G=T.playbackRate;b.startOnPlay&&(b.player.setPlaybackRate&&G!==1&&b.player.setPlaybackRate(G),q(),b.startOnPlay=!1),W(),b.seekOnPlay&&(b.seekTo(b.seekOnPlay),b.seekOnPlay=null),b.handleDurationCheck()}),k(h(b),"handlePause",function(T){b.isPlaying=!1,b.isLoading||b.props.onPause(T)}),k(h(b),"handleEnded",function(){var T=b.props,q=T.activePlayer,W=T.loop,G=T.onEnded;q.loopOnEnded&&W&&b.seekTo(0),W||(b.isPlaying=!1,G())}),k(h(b),"handleError",function(){var T;b.isLoading=!1,(T=b.props).onError.apply(T,arguments)}),k(h(b),"handleDurationCheck",function(){clearTimeout(b.durationCheckTimeout);var T=b.getDuration();T?b.onDurationCalled||(b.props.onDuration(T),b.onDurationCalled=!0):b.durationCheckTimeout=setTimeout(b.handleDurationCheck,100)}),k(h(b),"handleLoaded",function(){b.isLoading=!1}),b}return g(v,[{key:"componentDidMount",value:function(){this.mounted=!0}},{key:"componentWillUnmount",value:function(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.props.stopOnUnmount&&(this.player.stop(),this.player.disablePIP&&this.player.disablePIP()),this.mounted=!1}},{key:"componentDidUpdate",value:function(P){var F=this;if(this.player){var I=this.props,T=I.url,q=I.playing,W=I.volume,G=I.muted,H=I.playbackRate,j=I.pip,U=I.loop,L=I.activePlayer,K=I.disableDeferredLoading;if(!(0,r.default)(P.url,T)){if(this.isLoading&&!L.forceLoad&&!K&&!(0,o.isMediaStream)(T)){console.warn("ReactPlayer: the attempt to load ".concat(T," is being deferred until the player has loaded")),this.loadOnReady=T;return}this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(T,this.isReady)}!P.playing&&q&&!this.isPlaying&&this.player.play(),P.playing&&!q&&this.isPlaying&&this.player.pause(),!P.pip&&j&&this.player.enablePIP&&this.player.enablePIP(),P.pip&&!j&&this.player.disablePIP&&this.player.disablePIP(),P.volume!==W&&W!==null&&this.player.setVolume(W),P.muted!==G&&(G?this.player.mute():(this.player.unmute(),W!==null&&setTimeout(function(){return F.player.setVolume(W)}))),P.playbackRate!==H&&this.player.setPlaybackRate&&this.player.setPlaybackRate(H),P.loop!==U&&this.player.setLoop&&this.player.setLoop(U)}}},{key:"getDuration",value:function(){return this.isReady?this.player.getDuration():null}},{key:"getCurrentTime",value:function(){return this.isReady?this.player.getCurrentTime():null}},{key:"getSecondsLoaded",value:function(){return this.isReady?this.player.getSecondsLoaded():null}},{key:"seekTo",value:function(P,F){var I=this;if(!this.isReady){P!==0&&(this.seekOnPlay=P,setTimeout(function(){I.seekOnPlay=null},R));return}var T=F?F==="fraction":P>0&&P<1;if(T){var q=this.player.getDuration();if(!q){console.warn("ReactPlayer: could not seek using fraction – duration not yet available");return}this.player.seekTo(q*P);return}this.player.seekTo(P)}},{key:"render",value:function(){var P=this.props.activePlayer;return P?n.default.createElement(P,d({},this.props,{onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError})):null}}]),v}(n.Component);t.default=O,k(O,"displayName","Player"),k(O,"propTypes",s.propTypes),k(O,"defaultProps",s.defaultProps)})(QL);var r_={},nP;function GJ(){return nP||(nP=1,function(t){function e(R){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(N){return typeof N}:e=function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},e(R)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(C);function r(){if(typeof WeakMap!="function")return null;var R=new WeakMap;return r=function(){return R},R}function s(R){if(R&&R.__esModule)return R;if(R===null||e(R)!=="object"&&typeof R!="function")return{default:R};var O=r();if(O&&O.has(R))return O.get(R);var N={},y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in R)if(Object.prototype.hasOwnProperty.call(R,v)){var b=y?Object.getOwnPropertyDescriptor(R,v):null;b&&(b.get||b.set)?Object.defineProperty(N,v,b):N[v]=R[v]}return N.default=R,O&&O.set(R,N),N}function o(R,O){var N=Object.keys(R);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(R);O&&(y=y.filter(function(v){return Object.getOwnPropertyDescriptor(R,v).enumerable})),N.push.apply(N,y)}return N}function a(R){for(var O=1;O<arguments.length;O++){var N=arguments[O]!=null?arguments[O]:{};O%2?o(Object(N),!0).forEach(function(y){h(R,y,N[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(N)):o(Object(N)).forEach(function(y){Object.defineProperty(R,y,Object.getOwnPropertyDescriptor(N,y))})}return R}function l(R,O){if(!(R instanceof O))throw new TypeError("Cannot call a class as a function")}function c(R,O){for(var N=0;N<O.length;N++){var y=O[N];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(R,y.key,y)}}function d(R,O,N){return O&&c(R.prototype,O),N&&c(R,N),R}function u(R,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(O&&O.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),O&&f(R,O)}function f(R,O){return f=Object.setPrototypeOf||function(y,v){return y.__proto__=v,y},f(R,O)}function g(R){var O=w();return function(){var y=_(R),v;if(O){var b=_(this).constructor;v=Reflect.construct(y,arguments,b)}else v=y.apply(this,arguments);return E(this,v)}}function E(R,O){return O&&(e(O)==="object"||typeof O=="function")?O:S(R)}function S(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function _(R){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(N){return N.__proto__||Object.getPrototypeOf(N)},_(R)}function h(R,O,N){return O in R?Object.defineProperty(R,O,{value:N,enumerable:!0,configurable:!0,writable:!0}):R[O]=N,R}var m="64px",A={},k=function(R){u(N,R);var O=g(N);function N(){var y;l(this,N);for(var v=arguments.length,b=new Array(v),P=0;P<v;P++)b[P]=arguments[P];return y=O.call.apply(O,[this].concat(b)),h(S(y),"mounted",!1),h(S(y),"state",{image:null}),h(S(y),"handleKeyPress",function(F){(F.key==="Enter"||F.key===" ")&&y.props.onClick()}),y}return d(N,[{key:"componentDidMount",value:function(){this.mounted=!0,this.fetchImage(this.props)}},{key:"componentDidUpdate",value:function(v){var b=this.props,P=b.url,F=b.light;(v.url!==P||v.light!==F)&&this.fetchImage(this.props)}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"fetchImage",value:function(v){var b=this,P=v.url,F=v.light,I=v.oEmbedUrl;if(!n.default.isValidElement(F)){if(typeof F=="string"){this.setState({image:F});return}if(A[P]){this.setState({image:A[P]});return}return this.setState({image:null}),window.fetch(I.replace("{url}",P)).then(function(T){return T.json()}).then(function(T){if(T.thumbnail_url&&b.mounted){var q=T.thumbnail_url.replace("height=100","height=480");b.setState({image:q}),A[P]=q}})}}},{key:"render",value:function(){var v=this.props,b=v.light,P=v.onClick,F=v.playIcon,I=v.previewTabIndex,T=this.state.image,q=n.default.isValidElement(b),W={display:"flex",alignItems:"center",justifyContent:"center"},G={preview:a({width:"100%",height:"100%",backgroundImage:T&&!q?"url(".concat(T,")"):void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer"},W),shadow:a({background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:m,width:m,height:m,position:q?"absolute":void 0},W),playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},H=n.default.createElement("div",{style:G.shadow,className:"react-player__shadow"},n.default.createElement("div",{style:G.playIcon,className:"react-player__play-icon"}));return n.default.createElement("div",{style:G.preview,className:"react-player__preview",onClick:P,tabIndex:I,onKeyPress:this.handleKeyPress},q?b:null,F||H)}}]),N}(n.Component);t.default=k}(r_)),r_}Object.defineProperty(jb,"__esModule",{value:!0});jb.createReactPlayer=void 0;var yl=t3(C),WJ=$b(ML),s_=$b(BJ),rP=$b(PE),pf=Hl,VJ=jt,KJ=$b(QL);function $b(t){return t&&t.__esModule?t:{default:t}}function If(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?If=function(n){return typeof n}:If=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},If(t)}function sP(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function oP(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sP(Object(n),!0).forEach(function(r){xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sP(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function yy(){return yy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},yy.apply(this,arguments)}function o_(t){return QJ(t)||XJ(t)||JJ(t)||ZJ()}function ZJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JJ(t,e){if(t){if(typeof t=="string")return Ew(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ew(t,e)}}function XJ(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function QJ(t){if(Array.isArray(t))return Ew(t)}function Ew(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function eX(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iP(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function tX(t,e,n){return e&&iP(t.prototype,e),n&&iP(t,n),t}function nX(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Sw(t,e)}function Sw(t,e){return Sw=Object.setPrototypeOf||function(r,s){return r.__proto__=s,r},Sw(t,e)}function rX(t){var e=oX();return function(){var r=by(t),s;if(e){var o=by(this).constructor;s=Reflect.construct(r,arguments,o)}else s=r.apply(this,arguments);return sX(this,s)}}function sX(t,e){return e&&(If(e)==="object"||typeof e=="function")?e:ar(t)}function ar(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function oX(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function by(t){return by=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},by(t)}function xn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function e3(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return e3=function(){return t},t}function t3(t){if(t&&t.__esModule)return t;if(t===null||If(t)!=="object"&&typeof t!="function")return{default:t};var e=e3();if(e&&e.has(t))return e.get(t);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){var o=r?Object.getOwnPropertyDescriptor(t,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=t[s]}return n.default=t,e&&e.set(t,n),n}var iX=(0,yl.lazy)(function(){return Promise.resolve().then(function(){return t3(GJ())})}),aX=typeof window<"u"&&window.document,lX=typeof vf<"u"&&vf.window&&vf.window.document,cX=Object.keys(pf.propTypes),dX=aX||lX?yl.Suspense:function(){return null},Uu=[],uX=function(e,n){var r,s;return s=r=function(o){nX(l,o);var a=rX(l);function l(){var c;eX(this,l);for(var d=arguments.length,u=new Array(d),f=0;f<d;f++)u[f]=arguments[f];return c=a.call.apply(a,[this].concat(u)),xn(ar(c),"state",{showPreview:!!c.props.light}),xn(ar(c),"references",{wrapper:function(E){c.wrapper=E},player:function(E){c.player=E}}),xn(ar(c),"handleClickPreview",function(g){c.setState({showPreview:!1}),c.props.onClickPreview(g)}),xn(ar(c),"showPreview",function(){c.setState({showPreview:!0})}),xn(ar(c),"getDuration",function(){return c.player?c.player.getDuration():null}),xn(ar(c),"getCurrentTime",function(){return c.player?c.player.getCurrentTime():null}),xn(ar(c),"getSecondsLoaded",function(){return c.player?c.player.getSecondsLoaded():null}),xn(ar(c),"getInternalPlayer",function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"player";return c.player?c.player.getInternalPlayer(g):null}),xn(ar(c),"seekTo",function(g,E){if(!c.player)return null;c.player.seekTo(g,E)}),xn(ar(c),"handleReady",function(){c.props.onReady(ar(c))}),xn(ar(c),"getActivePlayer",(0,s_.default)(function(g){for(var E=0,S=[].concat(Uu,o_(e));E<S.length;E++){var w=S[E];if(w.canPlay(g))return w}return n||null})),xn(ar(c),"getConfig",(0,s_.default)(function(g,E){var S=c.props.config;return WJ.default.all([pf.defaultProps.config,pf.defaultProps.config[E]||{},S,S[E]||{}])})),xn(ar(c),"getAttributes",(0,s_.default)(function(g){return(0,VJ.omit)(c.props,cX)})),xn(ar(c),"renderActivePlayer",function(g){if(!g)return null;var E=c.getActivePlayer(g);if(!E)return null;var S=c.getConfig(g,E.key);return yl.default.createElement(KJ.default,yy({},c.props,{key:E.key,ref:c.references.player,config:S,activePlayer:E.lazyPlayer||E,onReady:c.handleReady}))}),c}return tX(l,[{key:"shouldComponentUpdate",value:function(d,u){return!(0,rP.default)(this.props,d)||!(0,rP.default)(this.state,u)}},{key:"componentDidUpdate",value:function(d){var u=this.props.light;!d.light&&u&&this.setState({showPreview:!0}),d.light&&!u&&this.setState({showPreview:!1})}},{key:"renderPreview",value:function(d){if(!d)return null;var u=this.props,f=u.light,g=u.playIcon,E=u.previewTabIndex,S=u.oEmbedUrl;return yl.default.createElement(iX,{url:d,light:f,playIcon:g,previewTabIndex:E,oEmbedUrl:S,onClick:this.handleClickPreview})}},{key:"render",value:function(){var d=this.props,u=d.url,f=d.style,g=d.width,E=d.height,S=d.fallback,w=d.wrapper,_=this.state.showPreview,h=this.getAttributes(u),m=typeof w=="string"?this.references.wrapper:void 0;return yl.default.createElement(w,yy({ref:m,style:oP(oP({},f),{},{width:g,height:E})},h),yl.default.createElement(dX,{fallback:S},_?this.renderPreview(u):this.renderActivePlayer(u)))}}]),l}(yl.Component),xn(r,"displayName","ReactPlayer"),xn(r,"propTypes",pf.propTypes),xn(r,"defaultProps",pf.defaultProps),xn(r,"addCustomPlayer",function(o){Uu.push(o)}),xn(r,"removeCustomPlayers",function(){Uu.length=0}),xn(r,"canPlay",function(o){for(var a=0,l=[].concat(Uu,o_(e));a<l.length;a++){var c=l[a];if(c.canPlay(o))return!0}return!1}),xn(r,"canEnablePIP",function(o){for(var a=0,l=[].concat(Uu,o_(e));a<l.length;a++){var c=l[a];if(c.canEnablePIP&&c.canEnablePIP(o))return!0}return!1}),s};jb.createReactPlayer=uX;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=r(TL),n=jb;function r(a){return a&&a.__esModule?a:{default:a}}var s=e.default[e.default.length-1],o=(0,n.createReactPlayer)(e.default,s);t.default=o})(kL);const kE=to(kL);function pd(t){return Pt({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},child:[]},{tag:"path",attr:{d:"M12 7a5 5 0 1 1 -4.995 5.217l-.005 -.217l.005 -.217a5 5 0 0 1 4.995 -4.783z",strokeWidth:"0",fill:"currentColor"},child:[]}]})(t)}function fX(t){return Pt({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},child:[]},{tag:"path",attr:{d:"M12 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"},child:[]},{tag:"path",attr:{d:"M3 9h3v6h-3z"},child:[]},{tag:"path",attr:{d:"M18 9h3v6h-3z"},child:[]},{tag:"path",attr:{d:"M3 5m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z"},child:[]},{tag:"path",attr:{d:"M12 5l0 14"},child:[]}]})(t)}function Ya(t){return Pt({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M152,72V208H40a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8Z",opacity:"0.2"},child:[]},{tag:"path",attr:{d:"M216,64H147.31l34.35-34.34a8,8,0,1,0-11.32-11.32L128,60.69,85.66,18.34A8,8,0,0,0,74.34,29.66L108.69,64H40A16,16,0,0,0,24,80V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V80A16,16,0,0,0,216,64ZM40,80H144V200H40ZM216,200H160V80h56V200Zm-16-84a12,12,0,1,1-12-12A12,12,0,0,1,200,116Zm0,48a12,12,0,1,1-12-12A12,12,0,0,1,200,164Z"},child:[]}]})(t)}const hX=()=>{var w,_;const t=Ss(),{url:e,data:n}=t.state||{},[r,s]=C.useState(!0),[o,a]=C.useState(""),[l,c]=C.useState(n),[d,u]=C.useState(!1),f=C.useRef(null),g=Rt();C.useEffect(()=>{const h=R=>{const O=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|shorts\/|watch\?v=|watch\?.+&v=|live\/|live_chat\?is_popout=1&v=))([^?&]{11})/,N=R.match(O);return N&&N.length>=2?N[1]:""},A=(R=>{const O=h(R);return O?`https://youtube.com/watch?v=${O}`:""})(e);a(A),s(!1);const k=new IntersectionObserver(R=>{R[0].isIntersecting&&u(!0)},{threshold:.25});return f.current&&k.observe(f.current),()=>{f.current&&k.unobserve(f.current)}},[e]),C.useEffect(()=>{se().format("YYYY-MM-DD");const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},m=>{const k=(Array.isArray(m.new)?m.new:[m.new]).find(R=>R.id===l.id);k&&c(R=>({...R,...k}))}).subscribe();return()=>{h.unsubscribe()}},[l.id]);const E=l.estado==="Pendiente"?"#dfe3e5":l.estado==="Finalizado"?"#001c31":l.estado==="Suspendido"||l.estado==="Jugandose"?"#dc3545":l.estado==="Postergado"?"#ffc107":l.estado==="Parcial"?"#6c757d":"dfe3e5",S=l.estado==="Pendiente"?"black":l.estado==="Finalizado"||l.estado==="Suspendido"||l.estado==="Jugandose"?"white":l.estado==="Postergado"?"black":l.estado==="Parcial"?"white":"black";return p(ae,{className:"tituliContenedor videos",style:{marginBottom:"200px"},children:[i(V,{children:i($,{md:12,className:"text-center",children:p("h1",{className:"text-white",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i(Ns,{})," Partidos en vivo / ",i(Tt,{style:{color:"white"}})," Resumen de goles"]})})}),i(V,{children:i($,{md:12,className:"text-center mb-4",children:i("a",{href:"#",onClick:h=>{h.preventDefault(),g(-1)},className:"btn fw-bolder text-white",style:{fontSize:13,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",cursor:"pointer"},children:"Volver Atras"})})}),i(V,{children:i($,{md:12,className:"text-center",children:i(et,{})})}),i(ae,{fluid:!0,className:"d-flex justify-content-center align-items-center",children:i(V,{style:{backgroundColor:"#001c31"},children:i($,{className:"text-center",ref:f,children:r?i("div",{className:"spinner-border text-white",role:"status",children:i("span",{className:"visually-hidden",children:"Cargando..."})}):d&&o&&i("div",{className:"embed-responsive embed-responsive-16by9 mt-5",style:{margin:0,padding:0},children:i(kE,{url:o,controls:!0,className:"embed-responsive-item",style:{maxWidth:"90vw",maxHeight:"50vh",margin:25,marginBottom:25}})})})})}),i(ae,{children:i(V,{style:{backgroundColor:"#003855",marginTop:5},children:i($,{className:"text-center",children:l&&l.equipolocal&&i(ee,{children:p("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[i("img",{src:l.escudoLocal,alt:l.equipolocal,style:{width:"60px",height:"60px"}}),i("div",{className:"bg-white w-25",children:i("p",{className:"fw-bolder",style:{fontSize:50,fontFamily:"Roboto Condensed, sans-serif",color:"black"},children:l.goleslocal})}),p("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[i("span",{className:"text-white fw-bolder",style:{height:"auto"},children:se(l.hora,"HH:mm:ss").format("HH:mm")}),i("span",{className:"text-white fw-bolder",style:{height:"auto"},children:se(l.fecha).format("dddd D [de] MMMM YYYY")}),l.estadio&&i(ee,{children:p("span",{className:"text-white fw-bolder mt-2",style:{height:"auto"},children:[i(fX,{style:{fontSize:"25px"}}),l.estadio]})})," ",l.transmision&&i(ee,{children:p("span",{className:"text-white fw-bolder mt-2",style:{height:"auto"},children:[i("img",{src:l.imgCanalTv,alt:l.transmision,style:{width:"25px",height:"25px"}})," ",l.transmision]})})]}),i("div",{className:"bg-white w-25",children:i("p",{className:"fw-bolder",style:{fontSize:50,fontFamily:"Roboto Condensed, sans-serif",color:"black"},children:l.golesvisitante})}),i("img",{src:l.escudoVisitante,alt:l.equipovisitante,style:{width:"60px",height:"60px"}})]})})})})}),i(V,{style:{backgroundColor:"#003855",marginTop:5},children:i($,{className:"text-center",children:l&&l.equipolocal&&i("div",{children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"10%"}}),i("th",{style:{width:"20%"}}),i("th",{style:{width:"10%"}}),i("th",{style:{width:"10%"}}),i("th",{style:{width:"20%"}})]})}),p("tbody",{children:[p("tr",{children:[i("td",{className:"text-center fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:E,color:S},children:l.estado==="Pendiente"?l.hora:l.estado==="Finalizado"?"Final":l.estado==="Suspendido"?"Susp":l.estado==="Jugandose"?l.tiempodelpartido:l.estado==="Postergado"?"Post":l.estado==="Parcial"?"Parc":null}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[i("img",{src:l.escudoLocal,alt:l.equipolocal,style:{width:"15px",height:"15px"}})," ",i("span",{style:{height:"auto"},children:l.equipolocal})]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",alignItems:"center"},children:[l.estado!=="Pendiente"?l.goleslocal:""," ",l.tiempodelpartido==="Pen"?`(${l.penaleslocal})`:null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",alignItems:"center"},children:[l.estado!=="Pendiente"?l.golesvisitante:""," ",l.tiempodelpartido==="Pen"?`(${l.penalesvisitante})`:null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[i("img",{src:l.escudoVisitante,alt:l.equipovisitante,style:{width:"15px",height:"15px"}})," ",i("span",{style:{height:"auto"},children:l.equipovisitante})]})]}),(l.goleadoresLocal||l.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(w=l.goleadoresLocal)==null?void 0:w.split(",").map((h,m)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[m>0&&"-",h.trim().slice(0,-1)]},m))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"2",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(_=l.goleadoresVisitante)==null?void 0:_.split(",").map((h,m)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[m>0&&"-",h.trim().slice(0,-1)]},m))})})]})]})]})})})})]})},pX=({dataEquipos:t,dataFixture:e})=>{const s=(o=>{const a=o.reduce((l,c)=>{const d=c.llavePlayOff;return l[d]||(l[d]=[]),l[d].push(c),l},{});return Object.entries(a).map(([l,c])=>({llave:l,partidos:c}))})(e||[]);return i(ee,{children:i(ae,{className:"bracket-container ",children:i(ae,{className:"bracket",children:i(V,{children:p($,{children:[p("div",{className:"round octavosfinals",children:[p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="1"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"A conf"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"A conf"]})})}),l.fecha&&l.hora?i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()}):i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:"FECHA Y HORA A CONFIRMAR"})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="2"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"A conf"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"A conf"]})})}),l.fecha&&l.hora?i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()}):i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:"FECHA Y HORA A CONFIRMAR"})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]}),p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="3"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"A conf"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"A conf"]})})}),l.fecha&&l.hora?i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()}):i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:"FECHA Y HORA A CONFIRMAR"})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="4"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"A conf"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"A conf"]})})}),l.fecha&&l.hora?i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()}):i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:"FECHA Y HORA A CONFIRMAR"})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]}),p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="5"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"A conf"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"A conf"]})})}),l.fecha&&l.hora?i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()}):i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:"FECHA Y HORA A CONFIRMAR"})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="6"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"A conf"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"A conf"]})})}),l.fecha&&l.hora?i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()}):i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:"FECHA Y HORA A CONFIRMAR"})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]}),p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="7"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° D"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"Mejor 3° B/E/F"]})})}),l.fecha&&l.hora?i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()}):i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:"FECHA Y HORA A CONFIRMAR"})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="8"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"2° A"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° C"]})})}),l.fecha&&l.hora?i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()}):i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:"FECHA Y HORA A CONFIRMAR"})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})]}),p("div",{className:"round cuartosfinal",children:[p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="9"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})}),l.fecha&&l.hora?i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()}):i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:"FECHA Y HORA A CONFIRMAR"})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="10"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})}),l.fecha&&l.hora?i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()}):i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:"FECHA Y HORA A CONFIRMAR"})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]}),p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="11"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})}),l.fecha&&l.hora?i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()}):i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:"FECHA Y HORA A CONFIRMAR"})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="12"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})}),l.fecha&&l.hora?i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()}):i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:"FECHA Y HORA A CONFIRMAR"})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})]}),i("div",{className:"round semifinales",children:p("div",{className:"winners ",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="13"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})}),l.fecha&&l.hora?i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()}):i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:"FECHA Y HORA A CONFIRMAR"})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="14"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})}),l.fecha&&l.hora?i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()}):i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:"FECHA Y HORA A CONFIRMAR"})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})}),i("div",{className:"round finales",children:i("div",{className:"winners",children:i("div",{className:"matchups",children:i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="15"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})}),l.fecha&&l.hora?i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()}):i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:"FECHA Y HORA A CONFIRMAR"})]},c)})},a))})})})})]})})})})})},mX="/assets/Zlot300x50-49efe092.gif",hr=()=>i(ae,{className:"banner mt-3 mb-4",children:i("a",{href:"https://api.whatsapp.com/send?phone=5491526395648&text=Hola%2C%20hice%20click%20en%20la%20web%20de%20SegundoPalo%20y%20quiero%20recibir%20información%20para%20la%20ropa%20deportiva.",target:"_blank",children:i("img",{src:mX,alt:"Anuncio 300x50",width:"300",height:"50"})})}),TE=({asitencia:t,dataEquipos:e})=>{const n=t||[],r=e||[];return i(ee,{children:i(ae,{className:"mt-3 mb-5",children:i(V,{children:p($,{children:[i("h6",{className:"text-white text-center",style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:"20"},children:"Asistencias"}),p(Ie,{bordered:!0,size:"sm",children:[i("thead",{children:p("tr",{className:"text-white text-center",style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:12,backgroundColor:"#001c31"},children:[i("th",{children:"Jugador"}),i("th",{children:"Asist."})]})}),i("tbody",{children:n.sort((s,o)=>o.asistencia-s.asistencia).slice(0,12).map((s,o)=>{const a=r.find(l=>l.nombre===s.equipo);return p("tr",{children:[p("td",{className:"text-dark text-center fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12,display:"flex",justifyContent:"start"},children:[a&&i("img",{src:a.escudos,alt:a.nombre,style:{marginRight:"10px",width:"15px",height:"15px"}}),s.nombre," (",s.equipo,")"]}),i("td",{className:"text-dark text-center fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:s.asistencia})]},o)})})]})]})})})})},gX=({dataEquipos:t,dataFixture:e,canalesTvPlayoff:n})=>{var k;const[r,s]=C.useState(!0),[o,a]=C.useState([]),[l,c]=C.useState([]),[d,u]=C.useState([]),[f,g]=C.useState([]),E=e||[];C.useEffect(()=>{c(t),u(n),a(S(e)),s(!1)},[t,e]);const S=R=>{const O={};R.forEach(y=>{const v=y.faseCopas,b=y.llavePlayOff;O[v]||(O[v]={}),O[v][b]||(O[v][b]=[]),O[v][b].push(y)});const N={};return Object.keys(O).sort().forEach(y=>{N[y]={};const v=["Ida","Vuelta","Tercer partido"];Object.keys(O[y]).sort().forEach(b=>{O[y][b].sort((P,F)=>v.indexOf(P.partidoPlayOff)-v.indexOf(F.partidoPlayOff)),N[y][b]=O[y][b]})}),N},w=S(E),_=Object.fromEntries(Object.entries(w).map(([R,O])=>{const N=Object.fromEntries(Object.entries(O).map(([y,v])=>{const b=v.filter(P=>P.equipolocal!=="A conf"||P.equipovisitante!=="A conf");return[y,b]}).filter(([y,v])=>v.length>0));return[R,N]}).filter(([R,O])=>Object.keys(O).length>0)),h=(R,O)=>{m("/videos",{state:{url:R,data:O}})},m=Rt(),A=["Final","3 puesto","Final Four","Semi final","Cuartos de final","Octavos de final","16avos","32avos","5 puesto","7 puesto","5 a 8 puesto","9 puesto","11 puesto","2° Fase","1° Fase"];return(k=E[0])==null||k.torneo,p(ae,{className:"anchoPlayoff",children:[Object.entries(_).sort((R,O)=>{const N=R[0],y=O[0],v=A.indexOf(N),b=A.indexOf(y);return v-b}).map(([R,O])=>i(ee,{children:p(ae,{className:" mt-1",children:[p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"18px"},children:[" ",R.toUpperCase()]}),i($,{children:Object.entries(O).map(([N,y])=>i(ee,{children:i($,{md:12,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{children:Array.isArray(y)&&y.map(v=>{var L,K,Y,te,J;const b=v.equipolocal,P=v.equipovisitante,F=v.transmision,I=Array.isArray(l)?(L=l.find(Q=>Q.nombre===b))==null?void 0:L.escudos:void 0,T=Array.isArray(l)?(K=l.find(Q=>Q.nombre===P))==null?void 0:K.escudos:void 0,q=(Y=d.find(Q=>Q.idTv===F))==null?void 0:Y.logo,W=v.hora?se(v.hora,"HH:mm:ss").format("HH:mm"):"A conf",G=f===v.id&&v.estado==="Jugandose"?"#dc3545":"white",H=f===v.id&&v.estado==="Jugandose"?"white":"black",j=se(v.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("DD/MM"),U=se(v.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("dddd").toUpperCase();return p(Fe.Fragment,{children:[v.fecha!==null?i("tr",{children:p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[U," ",j]})}):i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"FECHA Y HORA A CONFIRMAR"}),i("tr",{children:i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:v.partidoPlayOff})}),p("tr",{children:[v.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder",style:{fontSize:9,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):v.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",v.motivossuspension,")"]})]}):v.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:v.estado}):v.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Parc ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}})]}):v.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:[v.tiempodelpartido," ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}})]}):v.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[v.hora===""?i(ee,{children:"A conf"}):W," ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}}),i("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"}})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[I&&i("img",{src:I,alt:b,style:{width:"15px",height:"15px"}})," ",i("span",{style:{height:"auto"},children:b!==""?b:"A conf"})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:G,color:H,width:"auto"},children:[v.estado!=="Pendiente"?v.goleslocal:null,v.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+v.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:G,color:H},children:[v.estado!=="Pendiente"?v.golesvisitante:null,v.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+v.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[I&&i("img",{src:T,alt:P,style:{width:"15px",height:"15px"}})," ",p("span",{style:{height:"auto"},children:[" ",P!==""?P:"A conf"]})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[v.linkgoles===null||v.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(v.linkgoles,{id:v.id,estado:v.estado,equipolocal:v.equipolocal,equipovisitante:v.equipovisitante,goleslocal:v.goleslocal,penaleslocal:v.penaleslocal,penalesvisitante:v.penalesvisitante,golesvisitante:v.golesvisitante,escudoLocal:I,escudoVisitante:T,tiempodelpartido:v.tiempodelpartido,hora:W,goleadoresLocal:v.goleadoresLocal,goleadoresVisitante:v.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})}),v.linkvivo===null||v.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(v.linkvivo,{id:v.id,estado:v.estado,equipolocal:v.equipolocal,equipovisitante:v.equipovisitante,goleslocal:v.goleslocal,penaleslocal:v.penaleslocal,penalesvisitante:v.penalesvisitante,golesvisitante:v.golesvisitante,escudoLocal:I,escudoVisitante:T,tiempodelpartido:v.tiempodelpartido,hora:W,goleadoresLocal:v.goleadoresLocal,goleadoresVisitante:v.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Ya,{style:{fontSize:"19px",color:"red"}})})]})})]},v.id),(v.goleadoresLocal||v.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(te=v.goleadoresLocal)==null?void 0:te.split(",").map((Q,oe)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[oe>0&&"-",Q.trim().slice(0,-1)]},oe))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(J=v.goleadoresVisitante)==null?void 0:J.split(",").map((Q,oe)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[oe>0&&"-",Q.trim().slice(0,-1)]},oe))})})]})]},v.id)})})]})})}))},R)]})})),i(V,{})]})},yX=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_(),h();const m=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{_()}).subscribe();return()=>{m.unsubscribe()}},[]);const g=async()=>{try{const{data:m,error:A}=await z.from("Goleadores").select("*").eq("torneo","COPAARGENTINA").eq("añoGoleadores",2024);A?console.error("Error",A):e(m)}catch(m){console.error("Error",m.message)}},E=async()=>{try{const{data:m,error:A}=await z.from("Equipos").select("*");A?console.error("Error",A):r(m)}catch(m){console.error("Error",m.message)}},S=async()=>{try{const{data:m,error:A}=await z.from("Asistencias").select("*").eq("torneo","COPAARGENTINA").eq("añoAsistencia",2024);A?console.error("Error",A):o(m)}catch(m){console.error("Error",m.message)}},w=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").eq("torneo","COPAARGENTINA").eq("añoTorneo",2023);A?console.error("Error",A):l(m)}catch(m){console.error("Error",m.message)}},_=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").eq("torneo","COPAARGENTINA").eq("añoTorneo",2024).order("fecha",{ascending:!1});A?console.error("Error",A):d(m)}catch(m){console.error("Error",m.message)}},h=async()=>{try{const{data:m,error:A}=await z.from("CanalesTv").select("*");A?console.error("Error",A):f(m)}catch(m){console.error("Error",m.message)}};return p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL -COPA ARGENTINA - FIXTURES - PARTIDOS"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de LA COPA ARGENTINA DE Futsal AFA , fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo mb-5",children:[i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:3}}),"COPA ARGENTINA",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:3}})]})}),i(V,{children:i($,{md:12,children:i(et,{})})}),i(V,{children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"FASE FINAL"})})}),i(V,{children:i($,{className:"text-center d-flex justify-content-center mb-2 mt-2",style:{overflowY:"auto"},children:i(pX,{dataFixture:c,dataEquipos:n})})}),i(V,{}),i(V,{children:i($,{md:12,children:i(gX,{dataFixture:c,dataEquipos:n,canalesTvPlayoff:u})})}),i(V,{children:i($,{md:6,className:"mb-5",children:i(Vt,{goleadores:t,dataEquipos:n})})})]})]})};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const n3={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Ce=function(t,e){if(!t)throw cu(e)},cu=function(t){return new Error("Firebase Database ("+n3.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const r3=function(t){const e=[];let n=0;for(let r=0;r<t.length;r++){let s=t.charCodeAt(r);s<128?e[n++]=s:s<2048?(e[n++]=s>>6|192,e[n++]=s&63|128):(s&64512)===55296&&r+1<t.length&&(t.charCodeAt(r+1)&64512)===56320?(s=65536+((s&1023)<<10)+(t.charCodeAt(++r)&1023),e[n++]=s>>18|240,e[n++]=s>>12&63|128,e[n++]=s>>6&63|128,e[n++]=s&63|128):(e[n++]=s>>12|224,e[n++]=s>>6&63|128,e[n++]=s&63|128)}return e},bX=function(t){const e=[];let n=0,r=0;for(;n<t.length;){const s=t[n++];if(s<128)e[r++]=String.fromCharCode(s);else if(s>191&&s<224){const o=t[n++];e[r++]=String.fromCharCode((s&31)<<6|o&63)}else if(s>239&&s<365){const o=t[n++],a=t[n++],l=t[n++],c=((s&7)<<18|(o&63)<<12|(a&63)<<6|l&63)-65536;e[r++]=String.fromCharCode(55296+(c>>10)),e[r++]=String.fromCharCode(56320+(c&1023))}else{const o=t[n++],a=t[n++];e[r++]=String.fromCharCode((s&15)<<12|(o&63)<<6|a&63)}}return e.join("")},IE={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let s=0;s<t.length;s+=3){const o=t[s],a=s+1<t.length,l=a?t[s+1]:0,c=s+2<t.length,d=c?t[s+2]:0,u=o>>2,f=(o&3)<<4|l>>4;let g=(l&15)<<2|d>>6,E=d&63;c||(E=64,a||(g=64)),r.push(n[u],n[f],n[g],n[E])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(r3(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):bX(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let s=0;s<t.length;){const o=n[t.charAt(s++)],l=s<t.length?n[t.charAt(s)]:0;++s;const d=s<t.length?n[t.charAt(s)]:64;++s;const f=s<t.length?n[t.charAt(s)]:64;if(++s,o==null||l==null||d==null||f==null)throw new vX;const g=o<<2|l>>4;if(r.push(g),d!==64){const E=l<<4&240|d>>2;if(r.push(E),f!==64){const S=d<<6&192|f;r.push(S)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class vX extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const s3=function(t){const e=r3(t);return IE.encodeByteArray(e,!0)},vy=function(t){return s3(t).replace(/\./g,"")},Aw=function(t){try{return IE.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function _X(t){return o3(void 0,t)}function o3(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:const n=e;return new Date(n.getTime());case Object:t===void 0&&(t={});break;case Array:t=[];break;default:return e}for(const n in e)!e.hasOwnProperty(n)||!wX(n)||(t[n]=o3(t[n],e[n]));return t}function wX(t){return t!=="__proto__"}/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function xX(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const CX=()=>xX().__FIREBASE_DEFAULTS__,EX=()=>{if(typeof process>"u"||typeof process.env>"u")return;const t={}.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},SX=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&Aw(t[1]);return e&&JSON.parse(e)},i3=()=>{try{return CX()||EX()||SX()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},AX=t=>{var e,n;return(n=(e=i3())===null||e===void 0?void 0:e.emulatorHosts)===null||n===void 0?void 0:n[t]},NX=t=>{const e=AX(t);if(!e)return;const n=e.lastIndexOf(":");if(n<=0||n+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const r=parseInt(e.substring(n+1),10);return e[0]==="["?[e.substring(1,n-1),r]:[e.substring(0,n),r]},a3=()=>{var t;return(t=i3())===null||t===void 0?void 0:t.config};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class ME{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,r))}}}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function RX(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},r=e||"demo-project",s=t.iat||0,o=t.sub||t.user_id;if(!o)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const a=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:s,exp:s+3600,auth_time:s,sub:o,user_id:o,firebase:{sign_in_provider:"custom",identities:{}}},t),l="";return[vy(JSON.stringify(n)),vy(JSON.stringify(a)),l].join(".")}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function PX(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function l3(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(PX())}function OX(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function c3(){return n3.NODE_ADMIN===!0}function FX(){try{return typeof indexedDB=="object"}catch{return!1}}function DX(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",s=self.indexedDB.open(r);s.onsuccess=()=>{s.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},s.onupgradeneeded=()=>{n=!1},s.onerror=()=>{var o;e(((o=s.error)===null||o===void 0?void 0:o.message)||"")}}catch(n){e(n)}})}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const kX="FirebaseError";class hp extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=kX,Object.setPrototypeOf(this,hp.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,d3.prototype.create)}}class d3{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},s=`${this.service}/${e}`,o=this.errors[e],a=o?TX(o,r):"Error",l=`${this.serviceName}: ${a} (${s}).`;return new hp(s,l,r)}}function TX(t,e){return t.replace(IX,(n,r)=>{const s=e[r];return s!=null?String(s):`<${r}?>`})}const IX=/\{\$([^}]+)}/g;/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Eh(t){return JSON.parse(t)}function Ln(t){return JSON.stringify(t)}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const u3=function(t){let e={},n={},r={},s="";try{const o=t.split(".");e=Eh(Aw(o[0])||""),n=Eh(Aw(o[1])||""),s=o[2],r=n.d||{},delete n.d}catch{}return{header:e,claims:n,data:r,signature:s}},MX=function(t){const e=u3(t),n=e.claims;return!!n&&typeof n=="object"&&n.hasOwnProperty("iat")},LX=function(t){const e=u3(t).claims;return typeof e=="object"&&e.admin===!0};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Ao(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function $d(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]}function aP(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function _y(t,e,n){const r={};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=e.call(n,t[s],s,t));return r}function Nw(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const s of n){if(!r.includes(s))return!1;const o=t[s],a=e[s];if(lP(o)&&lP(a)){if(!Nw(o,a))return!1}else if(o!==a)return!1}for(const s of r)if(!n.includes(s))return!1;return!0}function lP(t){return t!==null&&typeof t=="object"}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function zX(t){const e=[];for(const[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(s=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(s))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class qX{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=512/8,this.pad_[0]=128;for(let e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}reset(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0}compress_(e,n){n||(n=0);const r=this.W_;if(typeof e=="string")for(let f=0;f<16;f++)r[f]=e.charCodeAt(n)<<24|e.charCodeAt(n+1)<<16|e.charCodeAt(n+2)<<8|e.charCodeAt(n+3),n+=4;else for(let f=0;f<16;f++)r[f]=e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3],n+=4;for(let f=16;f<80;f++){const g=r[f-3]^r[f-8]^r[f-14]^r[f-16];r[f]=(g<<1|g>>>31)&4294967295}let s=this.chain_[0],o=this.chain_[1],a=this.chain_[2],l=this.chain_[3],c=this.chain_[4],d,u;for(let f=0;f<80;f++){f<40?f<20?(d=l^o&(a^l),u=1518500249):(d=o^a^l,u=1859775393):f<60?(d=o&a|l&(o|a),u=2400959708):(d=o^a^l,u=3395469782);const g=(s<<5|s>>>27)+d+c+u+r[f]&4294967295;c=l,l=a,a=(o<<30|o>>>2)&4294967295,o=s,s=g}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+o&4294967295,this.chain_[2]=this.chain_[2]+a&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+c&4294967295}update(e,n){if(e==null)return;n===void 0&&(n=e.length);const r=n-this.blockSize;let s=0;const o=this.buf_;let a=this.inbuf_;for(;s<n;){if(a===0)for(;s<=r;)this.compress_(e,s),s+=this.blockSize;if(typeof e=="string"){for(;s<n;)if(o[a]=e.charCodeAt(s),++a,++s,a===this.blockSize){this.compress_(o),a=0;break}}else for(;s<n;)if(o[a]=e[s],++a,++s,a===this.blockSize){this.compress_(o),a=0;break}}this.inbuf_=a,this.total_+=n}digest(){const e=[];let n=this.total_*8;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(let s=this.blockSize-1;s>=56;s--)this.buf_[s]=n&255,n/=256;this.compress_(this.buf_);let r=0;for(let s=0;s<5;s++)for(let o=24;o>=0;o-=8)e[r]=this.chain_[s]>>o&255,++r;return e}}function Bb(t,e){return`${t} failed: ${e} argument `}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const jX=function(t){const e=[];let n=0;for(let r=0;r<t.length;r++){let s=t.charCodeAt(r);if(s>=55296&&s<=56319){const o=s-55296;r++,Ce(r<t.length,"Surrogate pair missing trail surrogate.");const a=t.charCodeAt(r)-56320;s=65536+(o<<10)+a}s<128?e[n++]=s:s<2048?(e[n++]=s>>6|192,e[n++]=s&63|128):s<65536?(e[n++]=s>>12|224,e[n++]=s>>6&63|128,e[n++]=s&63|128):(e[n++]=s>>18|240,e[n++]=s>>12&63|128,e[n++]=s>>6&63|128,e[n++]=s&63|128)}return e},Ub=function(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);r<128?e++:r<2048?e+=2:r>=55296&&r<=56319?(e+=4,n++):e+=3}return e};/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function du(t){return t&&t._delegate?t._delegate:t}class Sh{constructor(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const fl="[DEFAULT]";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class $X{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const r=new ME;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const s=this.getOrInitializeService({instanceIdentifier:n});s&&r.resolve(s)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const r=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),s=(n=e==null?void 0:e.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(o){if(s)return null;throw o}else{if(s)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(UX(e))try{this.getOrInitializeService({instanceIdentifier:fl})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const s=this.normalizeInstanceIdentifier(n);try{const o=this.getOrInitializeService({instanceIdentifier:s});r.resolve(o)}catch{}}}}clearInstance(e=fl){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=fl){return this.instances.has(e)}getOptions(e=fl){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const s=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[o,a]of this.instancesDeferred.entries()){const l=this.normalizeInstanceIdentifier(o);r===l&&a.resolve(s)}return s}onInit(e,n){var r;const s=this.normalizeInstanceIdentifier(n),o=(r=this.onInitCallbacks.get(s))!==null&&r!==void 0?r:new Set;o.add(e),this.onInitCallbacks.set(s,o);const a=this.instances.get(s);return a&&e(a,s),()=>{o.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(r)for(const s of r)try{s(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:BX(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=fl){return this.component?this.component.multipleInstances?e:fl:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function BX(t){return t===fl?void 0:t}function UX(t){return t.instantiationMode==="EAGER"}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class YX{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new $X(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */var Yt;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(Yt||(Yt={}));const HX={debug:Yt.DEBUG,verbose:Yt.VERBOSE,info:Yt.INFO,warn:Yt.WARN,error:Yt.ERROR,silent:Yt.SILENT},GX=Yt.INFO,WX={[Yt.DEBUG]:"log",[Yt.VERBOSE]:"log",[Yt.INFO]:"info",[Yt.WARN]:"warn",[Yt.ERROR]:"error"},VX=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),s=WX[e];if(s)console[s](`[${r}] ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class f3{constructor(e){this.name=e,this._logLevel=GX,this._logHandler=VX,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Yt))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?HX[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,Yt.DEBUG,...e),this._logHandler(this,Yt.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Yt.VERBOSE,...e),this._logHandler(this,Yt.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Yt.INFO,...e),this._logHandler(this,Yt.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Yt.WARN,...e),this._logHandler(this,Yt.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Yt.ERROR,...e),this._logHandler(this,Yt.ERROR,...e)}}const KX=(t,e)=>e.some(n=>t instanceof n);let cP,dP;function ZX(){return cP||(cP=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function JX(){return dP||(dP=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const h3=new WeakMap,Rw=new WeakMap,p3=new WeakMap,i_=new WeakMap,LE=new WeakMap;function XX(t){const e=new Promise((n,r)=>{const s=()=>{t.removeEventListener("success",o),t.removeEventListener("error",a)},o=()=>{n(_a(t.result)),s()},a=()=>{r(t.error),s()};t.addEventListener("success",o),t.addEventListener("error",a)});return e.then(n=>{n instanceof IDBCursor&&h3.set(n,t)}).catch(()=>{}),LE.set(e,t),e}function QX(t){if(Rw.has(t))return;const e=new Promise((n,r)=>{const s=()=>{t.removeEventListener("complete",o),t.removeEventListener("error",a),t.removeEventListener("abort",a)},o=()=>{n(),s()},a=()=>{r(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",o),t.addEventListener("error",a),t.addEventListener("abort",a)});Rw.set(t,e)}let Pw={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return Rw.get(t);if(e==="objectStoreNames")return t.objectStoreNames||p3.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return _a(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function eQ(t){Pw=t(Pw)}function tQ(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(a_(this),e,...n);return p3.set(r,e.sort?e.sort():[e]),_a(r)}:JX().includes(t)?function(...e){return t.apply(a_(this),e),_a(h3.get(this))}:function(...e){return _a(t.apply(a_(this),e))}}function nQ(t){return typeof t=="function"?tQ(t):(t instanceof IDBTransaction&&QX(t),KX(t,ZX())?new Proxy(t,Pw):t)}function _a(t){if(t instanceof IDBRequest)return XX(t);if(i_.has(t))return i_.get(t);const e=nQ(t);return e!==t&&(i_.set(t,e),LE.set(e,t)),e}const a_=t=>LE.get(t);function rQ(t,e,{blocked:n,upgrade:r,blocking:s,terminated:o}={}){const a=indexedDB.open(t,e),l=_a(a);return r&&a.addEventListener("upgradeneeded",c=>{r(_a(a.result),c.oldVersion,c.newVersion,_a(a.transaction),c)}),n&&a.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),l.then(c=>{o&&c.addEventListener("close",()=>o()),s&&c.addEventListener("versionchange",d=>s(d.oldVersion,d.newVersion,d))}).catch(()=>{}),l}const sQ=["get","getKey","getAll","getAllKeys","count"],oQ=["put","add","delete","clear"],l_=new Map;function uP(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(l_.get(e))return l_.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,s=oQ.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(s||sQ.includes(n)))return;const o=async function(a,...l){const c=this.transaction(a,s?"readwrite":"readonly");let d=c.store;return r&&(d=d.index(l.shift())),(await Promise.all([d[n](...l),s&&c.done]))[0]};return l_.set(e,o),o}eQ(t=>({...t,get:(e,n,r)=>uP(e,n)||t.get(e,n,r),has:(e,n)=>!!uP(e,n)||t.has(e,n)}));/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class iQ{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(aQ(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function aQ(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const Ow="@firebase/app",fP="0.9.13";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Gl=new f3("@firebase/app"),lQ="@firebase/app-compat",cQ="@firebase/analytics-compat",dQ="@firebase/analytics",uQ="@firebase/app-check-compat",fQ="@firebase/app-check",hQ="@firebase/auth",pQ="@firebase/auth-compat",mQ="@firebase/database",gQ="@firebase/database-compat",yQ="@firebase/functions",bQ="@firebase/functions-compat",vQ="@firebase/installations",_Q="@firebase/installations-compat",wQ="@firebase/messaging",xQ="@firebase/messaging-compat",CQ="@firebase/performance",EQ="@firebase/performance-compat",SQ="@firebase/remote-config",AQ="@firebase/remote-config-compat",NQ="@firebase/storage",RQ="@firebase/storage-compat",PQ="@firebase/firestore",OQ="@firebase/firestore-compat",FQ="firebase",DQ="9.23.0";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Fw="[DEFAULT]",kQ={[Ow]:"fire-core",[lQ]:"fire-core-compat",[dQ]:"fire-analytics",[cQ]:"fire-analytics-compat",[fQ]:"fire-app-check",[uQ]:"fire-app-check-compat",[hQ]:"fire-auth",[pQ]:"fire-auth-compat",[mQ]:"fire-rtdb",[gQ]:"fire-rtdb-compat",[yQ]:"fire-fn",[bQ]:"fire-fn-compat",[vQ]:"fire-iid",[_Q]:"fire-iid-compat",[wQ]:"fire-fcm",[xQ]:"fire-fcm-compat",[CQ]:"fire-perf",[EQ]:"fire-perf-compat",[SQ]:"fire-rc",[AQ]:"fire-rc-compat",[NQ]:"fire-gcs",[RQ]:"fire-gcs-compat",[PQ]:"fire-fst",[OQ]:"fire-fst-compat","fire-js":"fire-js",[FQ]:"fire-js-all"};/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const wy=new Map,Dw=new Map;function TQ(t,e){try{t.container.addComponent(e)}catch(n){Gl.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function xy(t){const e=t.name;if(Dw.has(e))return Gl.debug(`There were multiple attempts to register component ${e}.`),!1;Dw.set(e,t);for(const n of wy.values())TQ(n,t);return!0}function IQ(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const MQ={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."},wa=new d3("app","Firebase",MQ);/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class LQ{constructor(e,n,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Sh("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw wa.create("app-deleted",{appName:this._name})}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const zQ=DQ;function m3(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r=Object.assign({name:Fw,automaticDataCollectionEnabled:!1},e),s=r.name;if(typeof s!="string"||!s)throw wa.create("bad-app-name",{appName:String(s)});if(n||(n=a3()),!n)throw wa.create("no-options");const o=wy.get(s);if(o){if(Nw(n,o.options)&&Nw(r,o.config))return o;throw wa.create("duplicate-app",{appName:s})}const a=new YX(s);for(const c of Dw.values())a.addComponent(c);const l=new LQ(n,r,a);return wy.set(s,l),l}function qQ(t=Fw){const e=wy.get(t);if(!e&&t===Fw&&a3())return m3();if(!e)throw wa.create("no-app",{appName:t});return e}function md(t,e,n){var r;let s=(r=kQ[t])!==null&&r!==void 0?r:t;n&&(s+=`-${n}`);const o=s.match(/\s|\//),a=e.match(/\s|\//);if(o||a){const l=[`Unable to register library "${s}" with version "${e}":`];o&&l.push(`library name "${s}" contains illegal characters (whitespace or "/")`),o&&a&&l.push("and"),a&&l.push(`version name "${e}" contains illegal characters (whitespace or "/")`),Gl.warn(l.join(" "));return}xy(new Sh(`${s}-version`,()=>({library:s,version:e}),"VERSION"))}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const jQ="firebase-heartbeat-database",$Q=1,Ah="firebase-heartbeat-store";let c_=null;function g3(){return c_||(c_=rQ(jQ,$Q,{upgrade:(t,e)=>{switch(e){case 0:t.createObjectStore(Ah)}}}).catch(t=>{throw wa.create("idb-open",{originalErrorMessage:t.message})})),c_}async function BQ(t){try{return await(await g3()).transaction(Ah).objectStore(Ah).get(y3(t))}catch(e){if(e instanceof hp)Gl.warn(e.message);else{const n=wa.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});Gl.warn(n.message)}}}async function hP(t,e){try{const r=(await g3()).transaction(Ah,"readwrite");await r.objectStore(Ah).put(e,y3(t)),await r.done}catch(n){if(n instanceof hp)Gl.warn(n.message);else{const r=wa.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});Gl.warn(r.message)}}}function y3(t){return`${t.name}!${t.options.appId}`}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const UQ=1024,YQ=30*24*60*60*1e3;class HQ{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new WQ(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=pP();if(this._heartbeatsCache===null&&(this._heartbeatsCache=await this._heartbeatsCachePromise),!(this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(s=>s.date===r)))return this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(s=>{const o=new Date(s.date).valueOf();return Date.now()-o<=YQ}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache===null||this._heartbeatsCache.heartbeats.length===0)return"";const e=pP(),{heartbeatsToSend:n,unsentEntries:r}=GQ(this._heartbeatsCache.heartbeats),s=vy(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}}function pP(){return new Date().toISOString().substring(0,10)}function GQ(t,e=UQ){const n=[];let r=t.slice();for(const s of t){const o=n.find(a=>a.agent===s.agent);if(o){if(o.dates.push(s.date),mP(n)>e){o.dates.pop();break}}else if(n.push({agent:s.agent,dates:[s.date]}),mP(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class WQ{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return FX()?DX().then(()=>!0).catch(()=>!1):!1}async read(){return await this._canUseIndexedDBPromise?await BQ(this.app)||{heartbeats:[]}:{heartbeats:[]}}async overwrite(e){var n;if(await this._canUseIndexedDBPromise){const s=await this.read();return hP(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:s.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var n;if(await this._canUseIndexedDBPromise){const s=await this.read();return hP(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:s.lastSentHeartbeatDate,heartbeats:[...s.heartbeats,...e.heartbeats]})}else return}}function mP(t){return vy(JSON.stringify({version:2,heartbeats:t})).length}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function VQ(t){xy(new Sh("platform-logger",e=>new iQ(e),"PRIVATE")),xy(new Sh("heartbeat",e=>new HQ(e),"PRIVATE")),md(Ow,fP,t),md(Ow,fP,"esm2017"),md("fire-js","")}VQ("");const gP="@firebase/database",yP="0.14.4";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */let b3="";function KQ(t){b3=t}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class ZQ{constructor(e){this.domStorage_=e,this.prefix_="firebase:"}set(e,n){n==null?this.domStorage_.removeItem(this.prefixedName_(e)):this.domStorage_.setItem(this.prefixedName_(e),Ln(n))}get(e){const n=this.domStorage_.getItem(this.prefixedName_(e));return n==null?null:Eh(n)}remove(e){this.domStorage_.removeItem(this.prefixedName_(e))}prefixedName_(e){return this.prefix_+e}toString(){return this.domStorage_.toString()}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class JQ{constructor(){this.cache_={},this.isInMemoryStorage=!0}set(e,n){n==null?delete this.cache_[e]:this.cache_[e]=n}get(e){return Ao(this.cache_,e)?this.cache_[e]:null}remove(e){delete this.cache_[e]}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const v3=function(t){try{if(typeof window<"u"&&typeof window[t]<"u"){const e=window[t];return e.setItem("firebase:sentinel","cache"),e.removeItem("firebase:sentinel"),new ZQ(e)}}catch{}return new JQ},xl=v3("localStorage"),kw=v3("sessionStorage");/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const gd=new f3("@firebase/database"),XQ=function(){let t=1;return function(){return t++}}(),_3=function(t){const e=jX(t),n=new qX;n.update(e);const r=n.digest();return IE.encodeByteArray(r)},pp=function(...t){let e="";for(let n=0;n<t.length;n++){const r=t[n];Array.isArray(r)||r&&typeof r=="object"&&typeof r.length=="number"?e+=pp.apply(null,r):typeof r=="object"?e+=Ln(r):e+=r,e+=" "}return e};let Fl=null,bP=!0;const QQ=function(t,e){Ce(!e||t===!0||t===!1,"Can't turn on custom loggers persistently."),t===!0?(gd.logLevel=Yt.VERBOSE,Fl=gd.log.bind(gd),e&&kw.set("logging_enabled",!0)):typeof t=="function"?Fl=t:(Fl=null,kw.remove("logging_enabled"))},ur=function(...t){if(bP===!0&&(bP=!1,Fl===null&&kw.get("logging_enabled")===!0&&QQ(!0)),Fl){const e=pp.apply(null,t);Fl(e)}},mp=function(t){return function(...e){ur(t,...e)}},Tw=function(...t){const e="FIREBASE INTERNAL ERROR: "+pp(...t);gd.error(e)},Pi=function(...t){const e=`FIREBASE FATAL ERROR: ${pp(...t)}`;throw gd.error(e),new Error(e)},ts=function(...t){const e="FIREBASE WARNING: "+pp(...t);gd.warn(e)},eee=function(){typeof window<"u"&&window.location&&window.location.protocol&&window.location.protocol.indexOf("https:")!==-1&&ts("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().")},zE=function(t){return typeof t=="number"&&(t!==t||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY)},tee=function(t){if(document.readyState==="complete")t();else{let e=!1;const n=function(){if(!document.body){setTimeout(n,Math.floor(10));return}e||(e=!0,t())};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",()=>{document.readyState==="complete"&&n()}),window.attachEvent("onload",n))}},Wl="[MIN_NAME]",Ra="[MAX_NAME]",uu=function(t,e){if(t===e)return 0;if(t===Wl||e===Ra)return-1;if(e===Wl||t===Ra)return 1;{const n=vP(t),r=vP(e);return n!==null?r!==null?n-r===0?t.length-e.length:n-r:-1:r!==null?1:t<e?-1:1}},nee=function(t,e){return t===e?0:t<e?-1:1},Yu=function(t,e){if(e&&t in e)return e[t];throw new Error("Missing required key ("+t+") in object: "+Ln(e))},qE=function(t){if(typeof t!="object"||t===null)return Ln(t);const e=[];for(const r in t)e.push(r);e.sort();let n="{";for(let r=0;r<e.length;r++)r!==0&&(n+=","),n+=Ln(e[r]),n+=":",n+=qE(t[e[r]]);return n+="}",n},w3=function(t,e){const n=t.length;if(n<=e)return[t];const r=[];for(let s=0;s<n;s+=e)s+e>n?r.push(t.substring(s,n)):r.push(t.substring(s,s+e));return r};function Yr(t,e){for(const n in t)t.hasOwnProperty(n)&&e(n,t[n])}const x3=function(t){Ce(!zE(t),"Invalid JSON number");const e=11,n=52,r=(1<<e-1)-1;let s,o,a,l,c;t===0?(o=0,a=0,s=1/t===-1/0?1:0):(s=t<0,t=Math.abs(t),t>=Math.pow(2,1-r)?(l=Math.min(Math.floor(Math.log(t)/Math.LN2),r),o=l+r,a=Math.round(t*Math.pow(2,n-l)-Math.pow(2,n))):(o=0,a=Math.round(t/Math.pow(2,1-r-n))));const d=[];for(c=n;c;c-=1)d.push(a%2?1:0),a=Math.floor(a/2);for(c=e;c;c-=1)d.push(o%2?1:0),o=Math.floor(o/2);d.push(s?1:0),d.reverse();const u=d.join("");let f="";for(c=0;c<64;c+=8){let g=parseInt(u.substr(c,8),2).toString(16);g.length===1&&(g="0"+g),f=f+g}return f.toLowerCase()},ree=function(){return!!(typeof window=="object"&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))},see=function(){return typeof Windows=="object"&&typeof Windows.UI=="object"};function oee(t,e){let n="Unknown Error";t==="too_big"?n="The data requested exceeds the maximum size that can be accessed with a single request.":t==="permission_denied"?n="Client doesn't have permission to access the desired data.":t==="unavailable"&&(n="The service is unavailable");const r=new Error(t+" at "+e._path.toString()+": "+n);return r.code=t.toUpperCase(),r}const iee=new RegExp("^-?(0*)\\d{1,10}$"),aee=-2147483648,lee=2147483647,vP=function(t){if(iee.test(t)){const e=Number(t);if(e>=aee&&e<=lee)return e}return null},gp=function(t){try{t()}catch(e){setTimeout(()=>{const n=e.stack||"";throw ts("Exception was thrown by user callback.",n),e},Math.floor(0))}},cee=function(){return(typeof window=="object"&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},Mf=function(t,e){const n=setTimeout(t,e);return typeof n=="number"&&typeof Deno<"u"&&Deno.unrefTimer?Deno.unrefTimer(n):typeof n=="object"&&n.unref&&n.unref(),n};/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class dee{constructor(e,n){this.appName_=e,this.appCheckProvider=n,this.appCheck=n==null?void 0:n.getImmediate({optional:!0}),this.appCheck||n==null||n.get().then(r=>this.appCheck=r)}getToken(e){return this.appCheck?this.appCheck.getToken(e):new Promise((n,r)=>{setTimeout(()=>{this.appCheck?this.getToken(e).then(n,r):n(null)},0)})}addTokenChangeListener(e){var n;(n=this.appCheckProvider)===null||n===void 0||n.get().then(r=>r.addTokenListener(e))}notifyForInvalidToken(){ts(`Provided AppCheck credentials for the app named "${this.appName_}" are invalid. This usually indicates your app was not initialized correctly.`)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class uee{constructor(e,n,r){this.appName_=e,this.firebaseOptions_=n,this.authProvider_=r,this.auth_=null,this.auth_=r.getImmediate({optional:!0}),this.auth_||r.onInit(s=>this.auth_=s)}getToken(e){return this.auth_?this.auth_.getToken(e).catch(n=>n&&n.code==="auth/token-not-initialized"?(ur("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(n)):new Promise((n,r)=>{setTimeout(()=>{this.auth_?this.getToken(e).then(n,r):n(null)},0)})}addTokenChangeListener(e){this.auth_?this.auth_.addAuthTokenListener(e):this.authProvider_.get().then(n=>n.addAuthTokenListener(e))}removeTokenChangeListener(e){this.authProvider_.get().then(n=>n.removeAuthTokenListener(e))}notifyForInvalidToken(){let e='Provided authentication credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.firebaseOptions_?e+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.firebaseOptions_?e+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':e+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',ts(e)}}class yd{constructor(e){this.accessToken=e}getToken(e){return Promise.resolve({accessToken:this.accessToken})}addTokenChangeListener(e){e(this.accessToken)}removeTokenChangeListener(e){}notifyForInvalidToken(){}}yd.OWNER="owner";/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const jE="5",C3="v",E3="s",S3="r",A3="f",N3=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,R3="ls",P3="p",Iw="ac",O3="websocket",F3="long_polling";/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class D3{constructor(e,n,r,s,o=!1,a="",l=!1,c=!1){this.secure=n,this.namespace=r,this.webSocketOnly=s,this.nodeAdmin=o,this.persistenceKey=a,this.includeNamespaceInQueryParams=l,this.isUsingEmulator=c,this._host=e.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=xl.get("host:"+e)||this._host}isCacheableHost(){return this.internalHost.substr(0,2)==="s-"}isCustomHost(){return this._domain!=="firebaseio.com"&&this._domain!=="firebaseio-demo.com"}get host(){return this._host}set host(e){e!==this.internalHost&&(this.internalHost=e,this.isCacheableHost()&&xl.set("host:"+this._host,this.internalHost))}toString(){let e=this.toURLString();return this.persistenceKey&&(e+="<"+this.persistenceKey+">"),e}toURLString(){const e=this.secure?"https://":"http://",n=this.includeNamespaceInQueryParams?`?ns=${this.namespace}`:"";return`${e}${this.host}/${n}`}}function fee(t){return t.host!==t.internalHost||t.isCustomHost()||t.includeNamespaceInQueryParams}function k3(t,e,n){Ce(typeof e=="string","typeof type must == string"),Ce(typeof n=="object","typeof params must == object");let r;if(e===O3)r=(t.secure?"wss://":"ws://")+t.internalHost+"/.ws?";else if(e===F3)r=(t.secure?"https://":"http://")+t.internalHost+"/.lp?";else throw new Error("Unknown connection type: "+e);fee(t)&&(n.ns=t.namespace);const s=[];return Yr(n,(o,a)=>{s.push(o+"="+a)}),r+s.join("&")}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class hee{constructor(){this.counters_={}}incrementCounter(e,n=1){Ao(this.counters_,e)||(this.counters_[e]=0),this.counters_[e]+=n}get(){return _X(this.counters_)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const d_={},u_={};function $E(t){const e=t.toString();return d_[e]||(d_[e]=new hee),d_[e]}function pee(t,e){const n=t.toString();return u_[n]||(u_[n]=e()),u_[n]}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class mee{constructor(e){this.onMessage_=e,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}closeAfter(e,n){this.closeAfterResponse=e,this.onClose=n,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)}handleResponse(e,n){for(this.pendingResponses[e]=n;this.pendingResponses[this.currentResponseNum];){const r=this.pendingResponses[this.currentResponseNum];delete this.pendingResponses[this.currentResponseNum];for(let s=0;s<r.length;++s)r[s]&&gp(()=>{this.onMessage_(r[s])});if(this.currentResponseNum===this.closeAfterResponse){this.onClose&&(this.onClose(),this.onClose=null);break}this.currentResponseNum++}}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const _P="start",gee="close",yee="pLPCommand",bee="pRTLPCB",T3="id",I3="pw",M3="ser",vee="cb",_ee="seg",wee="ts",xee="d",Cee="dframe",L3=1870,z3=30,Eee=L3-z3,See=25e3,Aee=3e4;class ed{constructor(e,n,r,s,o,a,l){this.connId=e,this.repoInfo=n,this.applicationId=r,this.appCheckToken=s,this.authToken=o,this.transportSessionId=a,this.lastSessionId=l,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=mp(e),this.stats_=$E(n),this.urlFn=c=>(this.appCheckToken&&(c[Iw]=this.appCheckToken),k3(n,F3,c))}open(e,n){this.curSegmentNum=0,this.onDisconnect_=n,this.myPacketOrderer=new mee(e),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(()=>{this.log_("Timed out trying to connect."),this.onClosed_(),this.connectTimeoutTimer_=null},Math.floor(Aee)),tee(()=>{if(this.isClosed_)return;this.scriptTagHolder=new BE((...o)=>{const[a,l,c,d,u]=o;if(this.incrementIncomingBytes_(o),!!this.scriptTagHolder)if(this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null),this.everConnected_=!0,a===_P)this.id=l,this.password=c;else if(a===gee)l?(this.scriptTagHolder.sendNewPolls=!1,this.myPacketOrderer.closeAfter(l,()=>{this.onClosed_()})):this.onClosed_();else throw new Error("Unrecognized command received: "+a)},(...o)=>{const[a,l]=o;this.incrementIncomingBytes_(o),this.myPacketOrderer.handleResponse(a,l)},()=>{this.onClosed_()},this.urlFn);const r={};r[_P]="t",r[M3]=Math.floor(Math.random()*1e8),this.scriptTagHolder.uniqueCallbackIdentifier&&(r[vee]=this.scriptTagHolder.uniqueCallbackIdentifier),r[C3]=jE,this.transportSessionId&&(r[E3]=this.transportSessionId),this.lastSessionId&&(r[R3]=this.lastSessionId),this.applicationId&&(r[P3]=this.applicationId),this.appCheckToken&&(r[Iw]=this.appCheckToken),typeof location<"u"&&location.hostname&&N3.test(location.hostname)&&(r[S3]=A3);const s=this.urlFn(r);this.log_("Connecting via long-poll to "+s),this.scriptTagHolder.addTag(s,()=>{})})}start(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)}static forceAllow(){ed.forceAllow_=!0}static forceDisallow(){ed.forceDisallow_=!0}static isAvailable(){return ed.forceAllow_?!0:!ed.forceDisallow_&&typeof document<"u"&&document.createElement!=null&&!ree()&&!see()}markConnectionHealthy(){}shutdown_(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)}onClosed_(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))}close(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())}send(e){const n=Ln(e);this.bytesSent+=n.length,this.stats_.incrementCounter("bytes_sent",n.length);const r=s3(n),s=w3(r,Eee);for(let o=0;o<s.length;o++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,s.length,s[o]),this.curSegmentNum++}addDisconnectPingFrame(e,n){this.myDisconnFrame=document.createElement("iframe");const r={};r[Cee]="t",r[T3]=e,r[I3]=n,this.myDisconnFrame.src=this.urlFn(r),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}incrementIncomingBytes_(e){const n=Ln(e).length;this.bytesReceived+=n,this.stats_.incrementCounter("bytes_received",n)}}class BE{constructor(e,n,r,s){this.onDisconnect=r,this.urlFn=s,this.outstandingRequests=new Set,this.pendingSegs=[],this.currentSerial=Math.floor(Math.random()*1e8),this.sendNewPolls=!0;{this.uniqueCallbackIdentifier=XQ(),window[yee+this.uniqueCallbackIdentifier]=e,window[bee+this.uniqueCallbackIdentifier]=n,this.myIFrame=BE.createIFrame_();let o="";this.myIFrame.src&&this.myIFrame.src.substr(0,11)==="javascript:"&&(o='<script>document.domain="'+document.domain+'";<\/script>');const a="<html><body>"+o+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(a),this.myIFrame.doc.close()}catch(l){ur("frame writing exception"),l.stack&&ur(l.stack),ur(l)}}}static createIFrame_(){const e=document.createElement("iframe");if(e.style.display="none",document.body){document.body.appendChild(e);try{e.contentWindow.document||ur("No IE domain setting required")}catch{const r=document.domain;e.src="javascript:void((function(){document.open();document.domain='"+r+"';document.close();})())"}}else throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";return e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document),e}close(){this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.textContent="",setTimeout(()=>{this.myIFrame!==null&&(document.body.removeChild(this.myIFrame),this.myIFrame=null)},Math.floor(0)));const e=this.onDisconnect;e&&(this.onDisconnect=null,e())}startLongPoll(e,n){for(this.myID=e,this.myPW=n,this.alive=!0;this.newRequest_(););}newRequest_(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;const e={};e[T3]=this.myID,e[I3]=this.myPW,e[M3]=this.currentSerial;let n=this.urlFn(e),r="",s=0;for(;this.pendingSegs.length>0&&this.pendingSegs[0].d.length+z3+r.length<=L3;){const a=this.pendingSegs.shift();r=r+"&"+_ee+s+"="+a.seg+"&"+wee+s+"="+a.ts+"&"+xee+s+"="+a.d,s++}return n=n+r,this.addLongPollTag_(n,this.currentSerial),!0}else return!1}enqueueSegment(e,n,r){this.pendingSegs.push({seg:e,ts:n,d:r}),this.alive&&this.newRequest_()}addLongPollTag_(e,n){this.outstandingRequests.add(n);const r=()=>{this.outstandingRequests.delete(n),this.newRequest_()},s=setTimeout(r,Math.floor(See)),o=()=>{clearTimeout(s),r()};this.addTag(e,o)}addTag(e,n){setTimeout(()=>{try{if(!this.sendNewPolls)return;const r=this.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=e,r.onload=r.onreadystatechange=function(){const s=r.readyState;(!s||s==="loaded"||s==="complete")&&(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),n())},r.onerror=()=>{ur("Long-poll script failed to load: "+e),this.sendNewPolls=!1,this.close()},this.myIFrame.doc.body.appendChild(r)}catch{}},Math.floor(1))}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Nee=16384,Ree=45e3;let Cy=null;typeof MozWebSocket<"u"?Cy=MozWebSocket:typeof WebSocket<"u"&&(Cy=WebSocket);class $s{constructor(e,n,r,s,o,a,l){this.connId=e,this.applicationId=r,this.appCheckToken=s,this.authToken=o,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=mp(this.connId),this.stats_=$E(n),this.connURL=$s.connectionURL_(n,a,l,s,r),this.nodeAdmin=n.nodeAdmin}static connectionURL_(e,n,r,s,o){const a={};return a[C3]=jE,typeof location<"u"&&location.hostname&&N3.test(location.hostname)&&(a[S3]=A3),n&&(a[E3]=n),r&&(a[R3]=r),s&&(a[Iw]=s),o&&(a[P3]=o),k3(e,O3,a)}open(e,n){this.onDisconnect=n,this.onMessage=e,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,xl.set("previous_websocket_failure",!0);try{let r;c3(),this.mySock=new Cy(this.connURL,[],r)}catch(r){this.log_("Error instantiating WebSocket.");const s=r.message||r.data;s&&this.log_(s),this.onClosed_();return}this.mySock.onopen=()=>{this.log_("Websocket connected."),this.everConnected_=!0},this.mySock.onclose=()=>{this.log_("Websocket connection was disconnected."),this.mySock=null,this.onClosed_()},this.mySock.onmessage=r=>{this.handleIncomingFrame(r)},this.mySock.onerror=r=>{this.log_("WebSocket error. Closing connection.");const s=r.message||r.data;s&&this.log_(s),this.onClosed_()}}start(){}static forceDisallow(){$s.forceDisallow_=!0}static isAvailable(){let e=!1;if(typeof navigator<"u"&&navigator.userAgent){const n=/Android ([0-9]{0,}\.[0-9]{0,})/,r=navigator.userAgent.match(n);r&&r.length>1&&parseFloat(r[1])<4.4&&(e=!0)}return!e&&Cy!==null&&!$s.forceDisallow_}static previouslyFailed(){return xl.isInMemoryStorage||xl.get("previous_websocket_failure")===!0}markConnectionHealthy(){xl.remove("previous_websocket_failure")}appendFrame_(e){if(this.frames.push(e),this.frames.length===this.totalFrames){const n=this.frames.join("");this.frames=null;const r=Eh(n);this.onMessage(r)}}handleNewFrameCount_(e){this.totalFrames=e,this.frames=[]}extractFrameCount_(e){if(Ce(this.frames===null,"We already have a frame buffer"),e.length<=6){const n=Number(e);if(!isNaN(n))return this.handleNewFrameCount_(n),null}return this.handleNewFrameCount_(1),e}handleIncomingFrame(e){if(this.mySock===null)return;const n=e.data;if(this.bytesReceived+=n.length,this.stats_.incrementCounter("bytes_received",n.length),this.resetKeepAlive(),this.frames!==null)this.appendFrame_(n);else{const r=this.extractFrameCount_(n);r!==null&&this.appendFrame_(r)}}send(e){this.resetKeepAlive();const n=Ln(e);this.bytesSent+=n.length,this.stats_.incrementCounter("bytes_sent",n.length);const r=w3(n,Nee);r.length>1&&this.sendString_(String(r.length));for(let s=0;s<r.length;s++)this.sendString_(r[s])}shutdown_(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)}onClosed_(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))}close(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())}resetKeepAlive(){clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval(()=>{this.mySock&&this.sendString_("0"),this.resetKeepAlive()},Math.floor(Ree))}sendString_(e){try{this.mySock.send(e)}catch(n){this.log_("Exception thrown from WebSocket.send():",n.message||n.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}}}$s.responsesRequiredToBeHealthy=2;$s.healthyTimeout=3e4;/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Nh{constructor(e){this.initTransports_(e)}static get ALL_TRANSPORTS(){return[ed,$s]}static get IS_TRANSPORT_INITIALIZED(){return this.globalTransportInitialized_}initTransports_(e){const n=$s&&$s.isAvailable();let r=n&&!$s.previouslyFailed();if(e.webSocketOnly&&(n||ts("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),r=!0),r)this.transports_=[$s];else{const s=this.transports_=[];for(const o of Nh.ALL_TRANSPORTS)o&&o.isAvailable()&&s.push(o);Nh.globalTransportInitialized_=!0}}initialTransport(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")}upgradeTransport(){return this.transports_.length>1?this.transports_[1]:null}}Nh.globalTransportInitialized_=!1;/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Pee=6e4,Oee=5e3,Fee=10*1024,Dee=100*1024,f_="t",wP="d",kee="s",xP="r",Tee="e",CP="o",EP="a",SP="n",AP="p",Iee="h";class Mee{constructor(e,n,r,s,o,a,l,c,d,u){this.id=e,this.repoInfo_=n,this.applicationId_=r,this.appCheckToken_=s,this.authToken_=o,this.onMessage_=a,this.onReady_=l,this.onDisconnect_=c,this.onKill_=d,this.lastSessionId=u,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=mp("c:"+this.id+":"),this.transportManager_=new Nh(n),this.log_("Connection created"),this.start_()}start_(){const e=this.transportManager_.initialTransport();this.conn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,null,this.lastSessionId),this.primaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;const n=this.connReceiver_(this.conn_),r=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(()=>{this.conn_&&this.conn_.open(n,r)},Math.floor(0));const s=e.healthyTimeout||0;s>0&&(this.healthyTimeout_=Mf(()=>{this.healthyTimeout_=null,this.isHealthy_||(this.conn_&&this.conn_.bytesReceived>Dee?(this.log_("Connection exceeded healthy timeout but has received "+this.conn_.bytesReceived+" bytes. Marking connection healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()):this.conn_&&this.conn_.bytesSent>Fee?this.log_("Connection exceeded healthy timeout but has sent "+this.conn_.bytesSent+" bytes. Leaving connection alive."):(this.log_("Closing unhealthy connection after timeout."),this.close()))},Math.floor(s)))}nextTransportId_(){return"c:"+this.id+":"+this.connectionCount++}disconnReceiver_(e){return n=>{e===this.conn_?this.onConnectionLost_(n):e===this.secondaryConn_?(this.log_("Secondary connection lost."),this.onSecondaryConnectionLost_()):this.log_("closing an old connection")}}connReceiver_(e){return n=>{this.state_!==2&&(e===this.rx_?this.onPrimaryMessageReceived_(n):e===this.secondaryConn_?this.onSecondaryMessageReceived_(n):this.log_("message on old connection"))}}sendRequest(e){const n={t:"d",d:e};this.sendData_(n)}tryCleanupConnection(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)}onSecondaryControl_(e){if(f_ in e){const n=e[f_];n===EP?this.upgradeIfSecondaryHealthy_():n===xP?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),(this.tx_===this.secondaryConn_||this.rx_===this.secondaryConn_)&&this.close()):n===CP&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}}onSecondaryMessageReceived_(e){const n=Yu("t",e),r=Yu("d",e);if(n==="c")this.onSecondaryControl_(r);else if(n==="d")this.pendingDataMessages.push(r);else throw new Error("Unknown protocol layer: "+n)}upgradeIfSecondaryHealthy_(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:AP,d:{}}}))}proceedWithUpgrade_(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:EP,d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:SP,d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()}onPrimaryMessageReceived_(e){const n=Yu("t",e),r=Yu("d",e);n==="c"?this.onControl_(r):n==="d"&&this.onDataMessage_(r)}onDataMessage_(e){this.onPrimaryResponse_(),this.onMessage_(e)}onPrimaryResponse_(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))}onControl_(e){const n=Yu(f_,e);if(wP in e){const r=e[wP];if(n===Iee){const s=Object.assign({},r);this.repoInfo_.isUsingEmulator&&(s.h=this.repoInfo_.host),this.onHandshake_(s)}else if(n===SP){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(let s=0;s<this.pendingDataMessages.length;++s)this.onDataMessage_(this.pendingDataMessages[s]);this.pendingDataMessages=[],this.tryCleanupConnection()}else n===kee?this.onConnectionShutdown_(r):n===xP?this.onReset_(r):n===Tee?Tw("Server Error: "+r):n===CP?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):Tw("Unknown control packet command: "+n)}}onHandshake_(e){const n=e.ts,r=e.v,s=e.h;this.sessionId=e.s,this.repoInfo_.host=s,this.state_===0&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,n),jE!==r&&ts("Protocol version mismatch detected"),this.tryStartUpgrade_())}tryStartUpgrade_(){const e=this.transportManager_.upgradeTransport();e&&this.startUpgrade_(e)}startUpgrade_(e){this.secondaryConn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,this.sessionId),this.secondaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;const n=this.connReceiver_(this.secondaryConn_),r=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,r),Mf(()=>{this.secondaryConn_&&(this.log_("Timed out trying to upgrade."),this.secondaryConn_.close())},Math.floor(Pee))}onReset_(e){this.log_("Reset packet received. New host: "+e),this.repoInfo_.host=e,this.state_===1?this.close():(this.closeConnections_(),this.start_())}onConnectionEstablished_(e,n){this.log_("Realtime connection established."),this.conn_=e,this.state_=1,this.onReady_&&(this.onReady_(n,this.sessionId),this.onReady_=null),this.primaryResponsesRequired_===0?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):Mf(()=>{this.sendPingOnPrimaryIfNecessary_()},Math.floor(Oee))}sendPingOnPrimaryIfNecessary_(){!this.isHealthy_&&this.state_===1&&(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:AP,d:{}}}))}onSecondaryConnectionLost_(){const e=this.secondaryConn_;this.secondaryConn_=null,(this.tx_===e||this.rx_===e)&&this.close()}onConnectionLost_(e){this.conn_=null,!e&&this.state_===0?(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(xl.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)):this.state_===1&&this.log_("Realtime connection lost."),this.close()}onConnectionShutdown_(e){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(e),this.onKill_=null),this.onDisconnect_=null,this.close()}sendData_(e){if(this.state_!==1)throw"Connection is not connected";this.tx_.send(e)}close(){this.state_!==2&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))}closeConnections_(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class q3{put(e,n,r,s){}merge(e,n,r,s){}refreshAuthToken(e){}refreshAppCheckToken(e){}onDisconnectPut(e,n,r){}onDisconnectMerge(e,n,r){}onDisconnectCancel(e,n){}reportStats(e){}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class j3{constructor(e){this.allowedEvents_=e,this.listeners_={},Ce(Array.isArray(e)&&e.length>0,"Requires a non-empty array")}trigger(e,...n){if(Array.isArray(this.listeners_[e])){const r=[...this.listeners_[e]];for(let s=0;s<r.length;s++)r[s].callback.apply(r[s].context,n)}}on(e,n,r){this.validateEventType_(e),this.listeners_[e]=this.listeners_[e]||[],this.listeners_[e].push({callback:n,context:r});const s=this.getInitialEvent(e);s&&n.apply(r,s)}off(e,n,r){this.validateEventType_(e);const s=this.listeners_[e]||[];for(let o=0;o<s.length;o++)if(s[o].callback===n&&(!r||r===s[o].context)){s.splice(o,1);return}}validateEventType_(e){Ce(this.allowedEvents_.find(n=>n===e),"Unknown event: "+e)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Ey extends j3{constructor(){super(["online"]),this.online_=!0,typeof window<"u"&&typeof window.addEventListener<"u"&&!l3()&&(window.addEventListener("online",()=>{this.online_||(this.online_=!0,this.trigger("online",!0))},!1),window.addEventListener("offline",()=>{this.online_&&(this.online_=!1,this.trigger("online",!1))},!1))}static getInstance(){return new Ey}getInitialEvent(e){return Ce(e==="online","Unknown event type: "+e),[this.online_]}currentlyOnline(){return this.online_}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const NP=32,RP=768;class qt{constructor(e,n){if(n===void 0){this.pieces_=e.split("/");let r=0;for(let s=0;s<this.pieces_.length;s++)this.pieces_[s].length>0&&(this.pieces_[r]=this.pieces_[s],r++);this.pieces_.length=r,this.pieceNum_=0}else this.pieces_=e,this.pieceNum_=n}toString(){let e="";for(let n=this.pieceNum_;n<this.pieces_.length;n++)this.pieces_[n]!==""&&(e+="/"+this.pieces_[n]);return e||"/"}}function At(){return new qt("")}function mt(t){return t.pieceNum_>=t.pieces_.length?null:t.pieces_[t.pieceNum_]}function Pa(t){return t.pieces_.length-t.pieceNum_}function Ht(t){let e=t.pieceNum_;return e<t.pieces_.length&&e++,new qt(t.pieces_,e)}function $3(t){return t.pieceNum_<t.pieces_.length?t.pieces_[t.pieces_.length-1]:null}function Lee(t){let e="";for(let n=t.pieceNum_;n<t.pieces_.length;n++)t.pieces_[n]!==""&&(e+="/"+encodeURIComponent(String(t.pieces_[n])));return e||"/"}function B3(t,e=0){return t.pieces_.slice(t.pieceNum_+e)}function U3(t){if(t.pieceNum_>=t.pieces_.length)return null;const e=[];for(let n=t.pieceNum_;n<t.pieces_.length-1;n++)e.push(t.pieces_[n]);return new qt(e,0)}function zn(t,e){const n=[];for(let r=t.pieceNum_;r<t.pieces_.length;r++)n.push(t.pieces_[r]);if(e instanceof qt)for(let r=e.pieceNum_;r<e.pieces_.length;r++)n.push(e.pieces_[r]);else{const r=e.split("/");for(let s=0;s<r.length;s++)r[s].length>0&&n.push(r[s])}return new qt(n,0)}function ut(t){return t.pieceNum_>=t.pieces_.length}function Er(t,e){const n=mt(t),r=mt(e);if(n===null)return e;if(n===r)return Er(Ht(t),Ht(e));throw new Error("INTERNAL ERROR: innerPath ("+e+") is not within outerPath ("+t+")")}function UE(t,e){if(Pa(t)!==Pa(e))return!1;for(let n=t.pieceNum_,r=e.pieceNum_;n<=t.pieces_.length;n++,r++)if(t.pieces_[n]!==e.pieces_[r])return!1;return!0}function Us(t,e){let n=t.pieceNum_,r=e.pieceNum_;if(Pa(t)>Pa(e))return!1;for(;n<t.pieces_.length;){if(t.pieces_[n]!==e.pieces_[r])return!1;++n,++r}return!0}class zee{constructor(e,n){this.errorPrefix_=n,this.parts_=B3(e,0),this.byteLength_=Math.max(1,this.parts_.length);for(let r=0;r<this.parts_.length;r++)this.byteLength_+=Ub(this.parts_[r]);Y3(this)}}function qee(t,e){t.parts_.length>0&&(t.byteLength_+=1),t.parts_.push(e),t.byteLength_+=Ub(e),Y3(t)}function jee(t){const e=t.parts_.pop();t.byteLength_-=Ub(e),t.parts_.length>0&&(t.byteLength_-=1)}function Y3(t){if(t.byteLength_>RP)throw new Error(t.errorPrefix_+"has a key path longer than "+RP+" bytes ("+t.byteLength_+").");if(t.parts_.length>NP)throw new Error(t.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+NP+") or object contains a cycle "+hl(t))}function hl(t){return t.parts_.length===0?"":"in property '"+t.parts_.join(".")+"'"}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class YE extends j3{constructor(){super(["visible"]);let e,n;typeof document<"u"&&typeof document.addEventListener<"u"&&(typeof document.hidden<"u"?(n="visibilitychange",e="hidden"):typeof document.mozHidden<"u"?(n="mozvisibilitychange",e="mozHidden"):typeof document.msHidden<"u"?(n="msvisibilitychange",e="msHidden"):typeof document.webkitHidden<"u"&&(n="webkitvisibilitychange",e="webkitHidden")),this.visible_=!0,n&&document.addEventListener(n,()=>{const r=!document[e];r!==this.visible_&&(this.visible_=r,this.trigger("visible",r))},!1)}static getInstance(){return new YE}getInitialEvent(e){return Ce(e==="visible","Unknown event type: "+e),[this.visible_]}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Hu=1e3,$ee=60*5*1e3,PP=30*1e3,Bee=1.3,Uee=3e4,Yee="server_kill",OP=3;class gi extends q3{constructor(e,n,r,s,o,a,l,c){if(super(),this.repoInfo_=e,this.applicationId_=n,this.onDataUpdate_=r,this.onConnectStatus_=s,this.onServerInfoUpdate_=o,this.authTokenProvider_=a,this.appCheckTokenProvider_=l,this.authOverride_=c,this.id=gi.nextPersistentConnectionId_++,this.log_=mp("p:"+this.id+":"),this.interruptReasons_={},this.listens=new Map,this.outstandingPuts_=[],this.outstandingGets_=[],this.outstandingPutCount_=0,this.outstandingGetCount_=0,this.onDisconnectRequestQueue_=[],this.connected_=!1,this.reconnectDelay_=Hu,this.maxReconnectDelay_=$ee,this.securityDebugCallback_=null,this.lastSessionId=null,this.establishConnectionTimer_=null,this.visible_=!1,this.requestCBHash_={},this.requestNumber_=0,this.realtime_=null,this.authToken_=null,this.appCheckToken_=null,this.forceTokenRefresh_=!1,this.invalidAuthTokenCount_=0,this.invalidAppCheckTokenCount_=0,this.firstConnection_=!0,this.lastConnectionAttemptTime_=null,this.lastConnectionEstablishedTime_=null,c&&!c3())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");YE.getInstance().on("visible",this.onVisible_,this),e.host.indexOf("fblocal")===-1&&Ey.getInstance().on("online",this.onOnline_,this)}sendRequest(e,n,r){const s=++this.requestNumber_,o={r:s,a:e,b:n};this.log_(Ln(o)),Ce(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(o),r&&(this.requestCBHash_[s]=r)}get(e){this.initConnection_();const n=new ME,s={action:"g",request:{p:e._path.toString(),q:e._queryObject},onComplete:a=>{const l=a.d;a.s==="ok"?n.resolve(l):n.reject(l)}};this.outstandingGets_.push(s),this.outstandingGetCount_++;const o=this.outstandingGets_.length-1;return this.connected_&&this.sendGet_(o),n.promise}listen(e,n,r,s){this.initConnection_();const o=e._queryIdentifier,a=e._path.toString();this.log_("Listen called for "+a+" "+o),this.listens.has(a)||this.listens.set(a,new Map),Ce(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"listen() called for non-default but complete query"),Ce(!this.listens.get(a).has(o),"listen() called twice for same path/queryId.");const l={onComplete:s,hashFn:n,query:e,tag:r};this.listens.get(a).set(o,l),this.connected_&&this.sendListen_(l)}sendGet_(e){const n=this.outstandingGets_[e];this.sendRequest("g",n.request,r=>{delete this.outstandingGets_[e],this.outstandingGetCount_--,this.outstandingGetCount_===0&&(this.outstandingGets_=[]),n.onComplete&&n.onComplete(r)})}sendListen_(e){const n=e.query,r=n._path.toString(),s=n._queryIdentifier;this.log_("Listen on "+r+" for "+s);const o={p:r},a="q";e.tag&&(o.q=n._queryObject,o.t=e.tag),o.h=e.hashFn(),this.sendRequest(a,o,l=>{const c=l.d,d=l.s;gi.warnOnListenWarnings_(c,n),(this.listens.get(r)&&this.listens.get(r).get(s))===e&&(this.log_("listen response",l),d!=="ok"&&this.removeListen_(r,s),e.onComplete&&e.onComplete(d,c))})}static warnOnListenWarnings_(e,n){if(e&&typeof e=="object"&&Ao(e,"w")){const r=$d(e,"w");if(Array.isArray(r)&&~r.indexOf("no_index")){const s='".indexOn": "'+n._queryParams.getIndex().toString()+'"',o=n._path.toString();ts(`Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ${s} at ${o} to your security rules for better performance.`)}}}refreshAuthToken(e){this.authToken_=e,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},()=>{}),this.reduceReconnectDelayIfAdminCredential_(e)}reduceReconnectDelayIfAdminCredential_(e){(e&&e.length===40||LX(e))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=PP)}refreshAppCheckToken(e){this.appCheckToken_=e,this.log_("App check token refreshed"),this.appCheckToken_?this.tryAppCheck():this.connected_&&this.sendRequest("unappeck",{},()=>{})}tryAuth(){if(this.connected_&&this.authToken_){const e=this.authToken_,n=MX(e)?"auth":"gauth",r={cred:e};this.authOverride_===null?r.noauth=!0:typeof this.authOverride_=="object"&&(r.authvar=this.authOverride_),this.sendRequest(n,r,s=>{const o=s.s,a=s.d||"error";this.authToken_===e&&(o==="ok"?this.invalidAuthTokenCount_=0:this.onAuthRevoked_(o,a))})}}tryAppCheck(){this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},e=>{const n=e.s,r=e.d||"error";n==="ok"?this.invalidAppCheckTokenCount_=0:this.onAppCheckRevoked_(n,r)})}unlisten(e,n){const r=e._path.toString(),s=e._queryIdentifier;this.log_("Unlisten called for "+r+" "+s),Ce(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(r,s)&&this.connected_&&this.sendUnlisten_(r,s,e._queryObject,n)}sendUnlisten_(e,n,r,s){this.log_("Unlisten on "+e+" for "+n);const o={p:e},a="n";s&&(o.q=r,o.t=s),this.sendRequest(a,o)}onDisconnectPut(e,n,r){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",e,n,r):this.onDisconnectRequestQueue_.push({pathString:e,action:"o",data:n,onComplete:r})}onDisconnectMerge(e,n,r){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",e,n,r):this.onDisconnectRequestQueue_.push({pathString:e,action:"om",data:n,onComplete:r})}onDisconnectCancel(e,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",e,null,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"oc",data:null,onComplete:n})}sendOnDisconnect_(e,n,r,s){const o={p:n,d:r};this.log_("onDisconnect "+e,o),this.sendRequest(e,o,a=>{s&&setTimeout(()=>{s(a.s,a.d)},Math.floor(0))})}put(e,n,r,s){this.putInternal("p",e,n,r,s)}merge(e,n,r,s){this.putInternal("m",e,n,r,s)}putInternal(e,n,r,s,o){this.initConnection_();const a={p:n,d:r};o!==void 0&&(a.h=o),this.outstandingPuts_.push({action:e,request:a,onComplete:s}),this.outstandingPutCount_++;const l=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(l):this.log_("Buffering put: "+n)}sendPut_(e){const n=this.outstandingPuts_[e].action,r=this.outstandingPuts_[e].request,s=this.outstandingPuts_[e].onComplete;this.outstandingPuts_[e].queued=this.connected_,this.sendRequest(n,r,o=>{this.log_(n+" response",o),delete this.outstandingPuts_[e],this.outstandingPutCount_--,this.outstandingPutCount_===0&&(this.outstandingPuts_=[]),s&&s(o.s,o.d)})}reportStats(e){if(this.connected_){const n={c:e};this.log_("reportStats",n),this.sendRequest("s",n,r=>{if(r.s!=="ok"){const o=r.d;this.log_("reportStats","Error sending stats: "+o)}})}}onDataMessage_(e){if("r"in e){this.log_("from server: "+Ln(e));const n=e.r,r=this.requestCBHash_[n];r&&(delete this.requestCBHash_[n],r(e.b))}else{if("error"in e)throw"A server-side error has occurred: "+e.error;"a"in e&&this.onDataPush_(e.a,e.b)}}onDataPush_(e,n){this.log_("handleServerMessage",e,n),e==="d"?this.onDataUpdate_(n.p,n.d,!1,n.t):e==="m"?this.onDataUpdate_(n.p,n.d,!0,n.t):e==="c"?this.onListenRevoked_(n.p,n.q):e==="ac"?this.onAuthRevoked_(n.s,n.d):e==="apc"?this.onAppCheckRevoked_(n.s,n.d):e==="sd"?this.onSecurityDebugPacket_(n):Tw("Unrecognized action received from server: "+Ln(e)+` Are you using the latest client?`)}onReady_(e,n){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=new Date().getTime(),this.handleTimestamp_(e),this.lastSessionId=n,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)}scheduleConnect_(e){Ce(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(()=>{this.establishConnectionTimer_=null,this.establishConnection_()},Math.floor(e))}initConnection_(){!this.realtime_&&this.firstConnection_&&this.scheduleConnect_(0)}onVisible_(e){e&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=Hu,this.realtime_||this.scheduleConnect_(0)),this.visible_=e}onOnline_(e){e?(this.log_("Browser went online."),this.reconnectDelay_=Hu,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())}onRealtimeDisconnect_(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){this.visible_?this.lastConnectionEstablishedTime_&&(new Date().getTime()-this.lastConnectionEstablishedTime_>Uee&&(this.reconnectDelay_=Hu),this.lastConnectionEstablishedTime_=null):(this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=new Date().getTime());const e=new Date().getTime()-this.lastConnectionAttemptTime_;let n=Math.max(0,this.reconnectDelay_-e);n=Math.random()*n,this.log_("Trying to reconnect in "+n+"ms"),this.scheduleConnect_(n),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,this.reconnectDelay_*Bee)}this.onConnectStatus_(!1)}async establishConnection_(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=new Date().getTime(),this.lastConnectionEstablishedTime_=null;const e=this.onDataMessage_.bind(this),n=this.onReady_.bind(this),r=this.onRealtimeDisconnect_.bind(this),s=this.id+":"+gi.nextConnectionId_++,o=this.lastSessionId;let a=!1,l=null;const c=function(){l?l.close():(a=!0,r())},d=function(f){Ce(l,"sendRequest call when we're not connected not allowed."),l.sendRequest(f)};this.realtime_={close:c,sendRequest:d};const u=this.forceTokenRefresh_;this.forceTokenRefresh_=!1;try{const[f,g]=await Promise.all([this.authTokenProvider_.getToken(u),this.appCheckTokenProvider_.getToken(u)]);a?ur("getToken() completed but was canceled"):(ur("getToken() completed. Creating connection."),this.authToken_=f&&f.accessToken,this.appCheckToken_=g&&g.token,l=new Mee(s,this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,e,n,r,E=>{ts(E+" ("+this.repoInfo_.toString()+")"),this.interrupt(Yee)},o))}catch(f){this.log_("Failed to get token: "+f),a||(this.repoInfo_.nodeAdmin&&ts(f),c())}}}interrupt(e){ur("Interrupting connection for reason: "+e),this.interruptReasons_[e]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())}resume(e){ur("Resuming connection for reason: "+e),delete this.interruptReasons_[e],aP(this.interruptReasons_)&&(this.reconnectDelay_=Hu,this.realtime_||this.scheduleConnect_(0))}handleTimestamp_(e){const n=e-new Date().getTime();this.onServerInfoUpdate_({serverTimeOffset:n})}cancelSentTransactions_(){for(let e=0;e<this.outstandingPuts_.length;e++){const n=this.outstandingPuts_[e];n&&"h"in n.request&&n.queued&&(n.onComplete&&n.onComplete("disconnect"),delete this.outstandingPuts_[e],this.outstandingPutCount_--)}this.outstandingPutCount_===0&&(this.outstandingPuts_=[])}onListenRevoked_(e,n){let r;n?r=n.map(o=>qE(o)).join("$"):r="default";const s=this.removeListen_(e,r);s&&s.onComplete&&s.onComplete("permission_denied")}removeListen_(e,n){const r=new qt(e).toString();let s;if(this.listens.has(r)){const o=this.listens.get(r);s=o.get(n),o.delete(n),o.size===0&&this.listens.delete(r)}else s=void 0;return s}onAuthRevoked_(e,n){ur("Auth token revoked: "+e+"/"+n),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),(e==="invalid_token"||e==="permission_denied")&&(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=OP&&(this.reconnectDelay_=PP,this.authTokenProvider_.notifyForInvalidToken()))}onAppCheckRevoked_(e,n){ur("App check token revoked: "+e+"/"+n),this.appCheckToken_=null,this.forceTokenRefresh_=!0,(e==="invalid_token"||e==="permission_denied")&&(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=OP&&this.appCheckTokenProvider_.notifyForInvalidToken())}onSecurityDebugPacket_(e){this.securityDebugCallback_?this.securityDebugCallback_(e):"msg"in e&&console.log("FIREBASE: "+e.msg.replace(` `,` FIREBASE: `))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const e of this.listens.values())for(const n of e.values())this.sendListen_(n);for(let e=0;e<this.outstandingPuts_.length;e++)this.outstandingPuts_[e]&&this.sendPut_(e);for(;this.onDisconnectRequestQueue_.length;){const e=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(e.action,e.pathString,e.data,e.onComplete)}for(let e=0;e<this.outstandingGets_.length;e++)this.outstandingGets_[e]&&this.sendGet_(e)}sendConnectStats_(){const e={};let n="js";e["sdk."+n+"."+b3.replace(/\./g,"-")]=1,l3()?e["framework.cordova"]=1:OX()&&(e["framework.reactnative"]=1),this.reportStats(e)}shouldReconnect_(){const e=Ey.getInstance().currentlyOnline();return aP(this.interruptReasons_)&&e}}gi.nextPersistentConnectionId_=0;gi.nextConnectionId_=0;/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class ft{constructor(e,n){this.name=e,this.node=n}static Wrap(e,n){return new ft(e,n)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Yb{getCompare(){return this.compare.bind(this)}indexedValueChanged(e,n){const r=new ft(Wl,e),s=new ft(Wl,n);return this.compare(r,s)!==0}minPost(){return ft.MIN}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */let Nm;class H3 extends Yb{static get __EMPTY_NODE(){return Nm}static set __EMPTY_NODE(e){Nm=e}compare(e,n){return uu(e.name,n.name)}isDefinedOn(e){throw cu("KeyIndex.isDefinedOn not expected to be called.")}indexedValueChanged(e,n){return!1}minPost(){return ft.MIN}maxPost(){return new ft(Ra,Nm)}makePost(e,n){return Ce(typeof e=="string","KeyIndex indexValue must always be a string."),new ft(e,Nm)}toString(){return".key"}}const Dl=new H3;/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Rm{constructor(e,n,r,s,o=null){this.isReverse_=s,this.resultGenerator_=o,this.nodeStack_=[];let a=1;for(;!e.isEmpty();)if(e=e,a=n?r(e.key,n):1,s&&(a*=-1),a<0)this.isReverse_?e=e.left:e=e.right;else if(a===0){this.nodeStack_.push(e);break}else this.nodeStack_.push(e),this.isReverse_?e=e.right:e=e.left}getNext(){if(this.nodeStack_.length===0)return null;let e=this.nodeStack_.pop(),n;if(this.resultGenerator_?n=this.resultGenerator_(e.key,e.value):n={key:e.key,value:e.value},this.isReverse_)for(e=e.left;!e.isEmpty();)this.nodeStack_.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack_.push(e),e=e.left;return n}hasNext(){return this.nodeStack_.length>0}peek(){if(this.nodeStack_.length===0)return null;const e=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value}}}class Vn{constructor(e,n,r,s,o){this.key=e,this.value=n,this.color=r??Vn.RED,this.left=s??zr.EMPTY_NODE,this.right=o??zr.EMPTY_NODE}copy(e,n,r,s,o){return new Vn(e??this.key,n??this.value,r??this.color,s??this.left,o??this.right)}count(){return this.left.count()+1+this.right.count()}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||!!e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min_(){return this.left.isEmpty()?this:this.left.min_()}minKey(){return this.min_().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,n,r){let s=this;const o=r(e,s.key);return o<0?s=s.copy(null,null,null,s.left.insert(e,n,r),null):o===0?s=s.copy(null,n,null,null,null):s=s.copy(null,null,null,null,s.right.insert(e,n,r)),s.fixUp_()}removeMin_(){if(this.left.isEmpty())return zr.EMPTY_NODE;let e=this;return!e.left.isRed_()&&!e.left.left.isRed_()&&(e=e.moveRedLeft_()),e=e.copy(null,null,null,e.left.removeMin_(),null),e.fixUp_()}remove(e,n){let r,s;if(r=this,n(e,r.key)<0)!r.left.isEmpty()&&!r.left.isRed_()&&!r.left.left.isRed_()&&(r=r.moveRedLeft_()),r=r.copy(null,null,null,r.left.remove(e,n),null);else{if(r.left.isRed_()&&(r=r.rotateRight_()),!r.right.isEmpty()&&!r.right.isRed_()&&!r.right.left.isRed_()&&(r=r.moveRedRight_()),n(e,r.key)===0){if(r.right.isEmpty())return zr.EMPTY_NODE;s=r.right.min_(),r=r.copy(s.key,s.value,null,null,r.right.removeMin_())}r=r.copy(null,null,null,null,r.right.remove(e,n))}return r.fixUp_()}isRed_(){return this.color}fixUp_(){let e=this;return e.right.isRed_()&&!e.left.isRed_()&&(e=e.rotateLeft_()),e.left.isRed_()&&e.left.left.isRed_()&&(e=e.rotateRight_()),e.left.isRed_()&&e.right.isRed_()&&(e=e.colorFlip_()),e}moveRedLeft_(){let e=this.colorFlip_();return e.right.left.isRed_()&&(e=e.copy(null,null,null,null,e.right.rotateRight_()),e=e.rotateLeft_(),e=e.colorFlip_()),e}moveRedRight_(){let e=this.colorFlip_();return e.left.left.isRed_()&&(e=e.rotateRight_(),e=e.colorFlip_()),e}rotateLeft_(){const e=this.copy(null,null,Vn.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight_(){const e=this.copy(null,null,Vn.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip_(){const e=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,n)}checkMaxDepth_(){const e=this.check_();return Math.pow(2,e)<=this.count()+1}check_(){if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");const e=this.left.check_();if(e!==this.right.check_())throw new Error("Black depths differ");return e+(this.isRed_()?0:1)}}Vn.RED=!0;Vn.BLACK=!1;class Hee{copy(e,n,r,s,o){return this}insert(e,n,r){return new Vn(e,n,null)}remove(e,n){return this}count(){return 0}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}check_(){return 0}isRed_(){return!1}}class zr{constructor(e,n=zr.EMPTY_NODE){this.comparator_=e,this.root_=n}insert(e,n){return new zr(this.comparator_,this.root_.insert(e,n,this.comparator_).copy(null,null,Vn.BLACK,null,null))}remove(e){return new zr(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,Vn.BLACK,null,null))}get(e){let n,r=this.root_;for(;!r.isEmpty();){if(n=this.comparator_(e,r.key),n===0)return r.value;n<0?r=r.left:n>0&&(r=r.right)}return null}getPredecessorKey(e){let n,r=this.root_,s=null;for(;!r.isEmpty();)if(n=this.comparator_(e,r.key),n===0){if(r.left.isEmpty())return s?s.key:null;for(r=r.left;!r.right.isEmpty();)r=r.right;return r.key}else n<0?r=r.left:n>0&&(s=r,r=r.right);throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")}isEmpty(){return this.root_.isEmpty()}count(){return this.root_.count()}minKey(){return this.root_.minKey()}maxKey(){return this.root_.maxKey()}inorderTraversal(e){return this.root_.inorderTraversal(e)}reverseTraversal(e){return this.root_.reverseTraversal(e)}getIterator(e){return new Rm(this.root_,null,this.comparator_,!1,e)}getIteratorFrom(e,n){return new Rm(this.root_,e,this.comparator_,!1,n)}getReverseIteratorFrom(e,n){return new Rm(this.root_,e,this.comparator_,!0,n)}getReverseIterator(e){return new Rm(this.root_,null,this.comparator_,!0,e)}}zr.EMPTY_NODE=new Hee;/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Gee(t,e){return uu(t.name,e.name)}function HE(t,e){return uu(t,e)}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */let Mw;function Wee(t){Mw=t}const G3=function(t){return typeof t=="number"?"number:"+x3(t):"string:"+t},W3=function(t){if(t.isLeafNode()){const e=t.val();Ce(typeof e=="string"||typeof e=="number"||typeof e=="object"&&Ao(e,".sv"),"Priority must be a string or number.")}else Ce(t===Mw||t.isEmpty(),"priority of unexpected type.");Ce(t===Mw||t.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */let FP;class Hn{constructor(e,n=Hn.__childrenNodeConstructor.EMPTY_NODE){this.value_=e,this.priorityNode_=n,this.lazyHash_=null,Ce(this.value_!==void 0&&this.value_!==null,"LeafNode shouldn't be created with null/undefined value."),W3(this.priorityNode_)}static set __childrenNodeConstructor(e){FP=e}static get __childrenNodeConstructor(){return FP}isLeafNode(){return!0}getPriority(){return this.priorityNode_}updatePriority(e){return new Hn(this.value_,e)}getImmediateChild(e){return e===".priority"?this.priorityNode_:Hn.__childrenNodeConstructor.EMPTY_NODE}getChild(e){return ut(e)?this:mt(e)===".priority"?this.priorityNode_:Hn.__childrenNodeConstructor.EMPTY_NODE}hasChild(){return!1}getPredecessorChildName(e,n){return null}updateImmediateChild(e,n){return e===".priority"?this.updatePriority(n):n.isEmpty()&&e!==".priority"?this:Hn.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,n).updatePriority(this.priorityNode_)}updateChild(e,n){const r=mt(e);return r===null?n:n.isEmpty()&&r!==".priority"?this:(Ce(r!==".priority"||Pa(e)===1,".priority must be the last token in a path"),this.updateImmediateChild(r,Hn.__childrenNodeConstructor.EMPTY_NODE.updateChild(Ht(e),n)))}isEmpty(){return!1}numChildren(){return 0}forEachChild(e,n){return!1}val(e){return e&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()}hash(){if(this.lazyHash_===null){let e="";this.priorityNode_.isEmpty()||(e+="priority:"+G3(this.priorityNode_.val())+":");const n=typeof this.value_;e+=n+":",n==="number"?e+=x3(this.value_):e+=this.value_,this.lazyHash_=_3(e)}return this.lazyHash_}getValue(){return this.value_}compareTo(e){return e===Hn.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof Hn.__childrenNodeConstructor?-1:(Ce(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))}compareToLeafNode_(e){const n=typeof e.value_,r=typeof this.value_,s=Hn.VALUE_TYPE_ORDER.indexOf(n),o=Hn.VALUE_TYPE_ORDER.indexOf(r);return Ce(s>=0,"Unknown leaf type: "+n),Ce(o>=0,"Unknown leaf type: "+r),s===o?r==="object"?0:this.value_<e.value_?-1:this.value_===e.value_?0:1:o-s}withIndex(){return this}isIndexed(){return!0}equals(e){if(e===this)return!0;if(e.isLeafNode()){const n=e;return this.value_===n.value_&&this.priorityNode_.equals(n.priorityNode_)}else return!1}}Hn.VALUE_TYPE_ORDER=["object","boolean","number","string"];/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */let V3,K3;function Vee(t){V3=t}function Kee(t){K3=t}class Zee extends Yb{compare(e,n){const r=e.node.getPriority(),s=n.node.getPriority(),o=r.compareTo(s);return o===0?uu(e.name,n.name):o}isDefinedOn(e){return!e.getPriority().isEmpty()}indexedValueChanged(e,n){return!e.getPriority().equals(n.getPriority())}minPost(){return ft.MIN}maxPost(){return new ft(Ra,new Hn("[PRIORITY-POST]",K3))}makePost(e,n){const r=V3(e);return new ft(n,new Hn("[PRIORITY-POST]",r))}toString(){return".priority"}}const mn=new Zee;/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Jee=Math.log(2);class Xee{constructor(e){const n=o=>parseInt(Math.log(o)/Jee,10),r=o=>parseInt(Array(o+1).join("1"),2);this.count=n(e+1),this.current_=this.count-1;const s=r(this.count);this.bits_=e+1&s}nextBitIsOne(){const e=!(this.bits_&1<<this.current_);return this.current_--,e}}const Sy=function(t,e,n,r){t.sort(e);const s=function(c,d){const u=d-c;let f,g;if(u===0)return null;if(u===1)return f=t[c],g=n?n(f):f,new Vn(g,f.node,Vn.BLACK,null,null);{const E=parseInt(u/2,10)+c,S=s(c,E),w=s(E+1,d);return f=t[E],g=n?n(f):f,new Vn(g,f.node,Vn.BLACK,S,w)}},o=function(c){let d=null,u=null,f=t.length;const g=function(S,w){const _=f-S,h=f;f-=S;const m=s(_+1,h),A=t[_],k=n?n(A):A;E(new Vn(k,A.node,w,null,m))},E=function(S){d?(d.left=S,d=S):(u=S,d=S)};for(let S=0;S<c.count;++S){const w=c.nextBitIsOne(),_=Math.pow(2,c.count-(S+1));w?g(_,Vn.BLACK):(g(_,Vn.BLACK),g(_,Vn.RED))}return u},a=new Xee(t.length),l=o(a);return new zr(r||e,l)};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */let h_;const Nc={};class ri{constructor(e,n){this.indexes_=e,this.indexSet_=n}static get Default(){return Ce(Nc&&mn,"ChildrenNode.ts has not been loaded"),h_=h_||new ri({".priority":Nc},{".priority":mn}),h_}get(e){const n=$d(this.indexes_,e);if(!n)throw new Error("No index defined for "+e);return n instanceof zr?n:null}hasIndex(e){return Ao(this.indexSet_,e.toString())}addIndex(e,n){Ce(e!==Dl,"KeyIndex always exists and isn't meant to be added to the IndexMap.");const r=[];let s=!1;const o=n.getIterator(ft.Wrap);let a=o.getNext();for(;a;)s=s||e.isDefinedOn(a.node),r.push(a),a=o.getNext();let l;s?l=Sy(r,e.getCompare()):l=Nc;const c=e.toString(),d=Object.assign({},this.indexSet_);d[c]=e;const u=Object.assign({},this.indexes_);return u[c]=l,new ri(u,d)}addToIndexes(e,n){const r=_y(this.indexes_,(s,o)=>{const a=$d(this.indexSet_,o);if(Ce(a,"Missing index implementation for "+o),s===Nc)if(a.isDefinedOn(e.node)){const l=[],c=n.getIterator(ft.Wrap);let d=c.getNext();for(;d;)d.name!==e.name&&l.push(d),d=c.getNext();return l.push(e),Sy(l,a.getCompare())}else return Nc;else{const l=n.get(e.name);let c=s;return l&&(c=c.remove(new ft(e.name,l))),c.insert(e,e.node)}});return new ri(r,this.indexSet_)}removeFromIndexes(e,n){const r=_y(this.indexes_,s=>{if(s===Nc)return s;{const o=n.get(e.name);return o?s.remove(new ft(e.name,o)):s}});return new ri(r,this.indexSet_)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */let Gu;class Ze{constructor(e,n,r){this.children_=e,this.priorityNode_=n,this.indexMap_=r,this.lazyHash_=null,this.priorityNode_&&W3(this.priorityNode_),this.children_.isEmpty()&&Ce(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}static get EMPTY_NODE(){return Gu||(Gu=new Ze(new zr(HE),null,ri.Default))}isLeafNode(){return!1}getPriority(){return this.priorityNode_||Gu}updatePriority(e){return this.children_.isEmpty()?this:new Ze(this.children_,e,this.indexMap_)}getImmediateChild(e){if(e===".priority")return this.getPriority();{const n=this.children_.get(e);return n===null?Gu:n}}getChild(e){const n=mt(e);return n===null?this:this.getImmediateChild(n).getChild(Ht(e))}hasChild(e){return this.children_.get(e)!==null}updateImmediateChild(e,n){if(Ce(n,"We should always be passing snapshot nodes"),e===".priority")return this.updatePriority(n);{const r=new ft(e,n);let s,o;n.isEmpty()?(s=this.children_.remove(e),o=this.indexMap_.removeFromIndexes(r,this.children_)):(s=this.children_.insert(e,n),o=this.indexMap_.addToIndexes(r,this.children_));const a=s.isEmpty()?Gu:this.priorityNode_;return new Ze(s,a,o)}}updateChild(e,n){const r=mt(e);if(r===null)return n;{Ce(mt(e)!==".priority"||Pa(e)===1,".priority must be the last token in a path");const s=this.getImmediateChild(r).updateChild(Ht(e),n);return this.updateImmediateChild(r,s)}}isEmpty(){return this.children_.isEmpty()}numChildren(){return this.children_.count()}val(e){if(this.isEmpty())return null;const n={};let r=0,s=0,o=!0;if(this.forEachChild(mn,(a,l)=>{n[a]=l.val(e),r++,o&&Ze.INTEGER_REGEXP_.test(a)?s=Math.max(s,Number(a)):o=!1}),!e&&o&&s<2*r){const a=[];for(const l in n)a[l]=n[l];return a}else return e&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n}hash(){if(this.lazyHash_===null){let e="";this.getPriority().isEmpty()||(e+="priority:"+G3(this.getPriority().val())+":"),this.forEachChild(mn,(n,r)=>{const s=r.hash();s!==""&&(e+=":"+n+":"+s)}),this.lazyHash_=e===""?"":_3(e)}return this.lazyHash_}getPredecessorChildName(e,n,r){const s=this.resolveIndex_(r);if(s){const o=s.getPredecessorKey(new ft(e,n));return o?o.name:null}else return this.children_.getPredecessorKey(e)}getFirstChildName(e){const n=this.resolveIndex_(e);if(n){const r=n.minKey();return r&&r.name}else return this.children_.minKey()}getFirstChild(e){const n=this.getFirstChildName(e);return n?new ft(n,this.children_.get(n)):null}getLastChildName(e){const n=this.resolveIndex_(e);if(n){const r=n.maxKey();return r&&r.name}else return this.children_.maxKey()}getLastChild(e){const n=this.getLastChildName(e);return n?new ft(n,this.children_.get(n)):null}forEachChild(e,n){const r=this.resolveIndex_(e);return r?r.inorderTraversal(s=>n(s.name,s.node)):this.children_.inorderTraversal(n)}getIterator(e){return this.getIteratorFrom(e.minPost(),e)}getIteratorFrom(e,n){const r=this.resolveIndex_(n);if(r)return r.getIteratorFrom(e,s=>s);{const s=this.children_.getIteratorFrom(e.name,ft.Wrap);let o=s.peek();for(;o!=null&&n.compare(o,e)<0;)s.getNext(),o=s.peek();return s}}getReverseIterator(e){return this.getReverseIteratorFrom(e.maxPost(),e)}getReverseIteratorFrom(e,n){const r=this.resolveIndex_(n);if(r)return r.getReverseIteratorFrom(e,s=>s);{const s=this.children_.getReverseIteratorFrom(e.name,ft.Wrap);let o=s.peek();for(;o!=null&&n.compare(o,e)>0;)s.getNext(),o=s.peek();return s}}compareTo(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===yp?-1:0}withIndex(e){if(e===Dl||this.indexMap_.hasIndex(e))return this;{const n=this.indexMap_.addIndex(e,this.children_);return new Ze(this.children_,this.priorityNode_,n)}}isIndexed(e){return e===Dl||this.indexMap_.hasIndex(e)}equals(e){if(e===this)return!0;if(e.isLeafNode())return!1;{const n=e;if(this.getPriority().equals(n.getPriority()))if(this.children_.count()===n.children_.count()){const r=this.getIterator(mn),s=n.getIterator(mn);let o=r.getNext(),a=s.getNext();for(;o&&a;){if(o.name!==a.name||!o.node.equals(a.node))return!1;o=r.getNext(),a=s.getNext()}return o===null&&a===null}else return!1;else return!1}}resolveIndex_(e){return e===Dl?null:this.indexMap_.get(e.toString())}}Ze.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/;class Qee extends Ze{constructor(){super(new zr(HE),Ze.EMPTY_NODE,ri.Default)}compareTo(e){return e===this?0:1}equals(e){return e===this}getPriority(){return this}getImmediateChild(e){return Ze.EMPTY_NODE}isEmpty(){return!1}}const yp=new Qee;Object.defineProperties(ft,{MIN:{value:new ft(Wl,Ze.EMPTY_NODE)},MAX:{value:new ft(Ra,yp)}});H3.__EMPTY_NODE=Ze.EMPTY_NODE;Hn.__childrenNodeConstructor=Ze;Wee(yp);Kee(yp);/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const ete=!0;function Xn(t,e=null){if(t===null)return Ze.EMPTY_NODE;if(typeof t=="object"&&".priority"in t&&(e=t[".priority"]),Ce(e===null||typeof e=="string"||typeof e=="number"||typeof e=="object"&&".sv"in e,"Invalid priority type found: "+typeof e),typeof t=="object"&&".value"in t&&t[".value"]!==null&&(t=t[".value"]),typeof t!="object"||".sv"in t){const n=t;return new Hn(n,Xn(e))}if(!(t instanceof Array)&&ete){const n=[];let r=!1;if(Yr(t,(a,l)=>{if(a.substring(0,1)!=="."){const c=Xn(l);c.isEmpty()||(r=r||!c.getPriority().isEmpty(),n.push(new ft(a,c)))}}),n.length===0)return Ze.EMPTY_NODE;const o=Sy(n,Gee,a=>a.name,HE);if(r){const a=Sy(n,mn.getCompare());return new Ze(o,Xn(e),new ri({".priority":a},{".priority":mn}))}else return new Ze(o,Xn(e),ri.Default)}else{let n=Ze.EMPTY_NODE;return Yr(t,(r,s)=>{if(Ao(t,r)&&r.substring(0,1)!=="."){const o=Xn(s);(o.isLeafNode()||!o.isEmpty())&&(n=n.updateImmediateChild(r,o))}}),n.updatePriority(Xn(e))}}Vee(Xn);/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class GE extends Yb{constructor(e){super(),this.indexPath_=e,Ce(!ut(e)&&mt(e)!==".priority","Can't create PathIndex with empty path or .priority key")}extractChild(e){return e.getChild(this.indexPath_)}isDefinedOn(e){return!e.getChild(this.indexPath_).isEmpty()}compare(e,n){const r=this.extractChild(e.node),s=this.extractChild(n.node),o=r.compareTo(s);return o===0?uu(e.name,n.name):o}makePost(e,n){const r=Xn(e),s=Ze.EMPTY_NODE.updateChild(this.indexPath_,r);return new ft(n,s)}maxPost(){const e=Ze.EMPTY_NODE.updateChild(this.indexPath_,yp);return new ft(Ra,e)}toString(){return B3(this.indexPath_,0).join("/")}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class tte extends Yb{compare(e,n){const r=e.node.compareTo(n.node);return r===0?uu(e.name,n.name):r}isDefinedOn(e){return!0}indexedValueChanged(e,n){return!e.equals(n)}minPost(){return ft.MIN}maxPost(){return ft.MAX}makePost(e,n){const r=Xn(e);return new ft(n,r)}toString(){return".value"}}const Z3=new tte;/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function J3(t){return{type:"value",snapshotNode:t}}function Bd(t,e){return{type:"child_added",snapshotNode:e,childName:t}}function Rh(t,e){return{type:"child_removed",snapshotNode:e,childName:t}}function Ph(t,e,n){return{type:"child_changed",snapshotNode:e,childName:t,oldSnap:n}}function nte(t,e){return{type:"child_moved",snapshotNode:e,childName:t}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class WE{constructor(e){this.index_=e}updateChild(e,n,r,s,o,a){Ce(e.isIndexed(this.index_),"A node must be indexed if only a child is updated");const l=e.getImmediateChild(n);return l.getChild(s).equals(r.getChild(s))&&l.isEmpty()===r.isEmpty()||(a!=null&&(r.isEmpty()?e.hasChild(n)?a.trackChildChange(Rh(n,l)):Ce(e.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):l.isEmpty()?a.trackChildChange(Bd(n,r)):a.trackChildChange(Ph(n,r,l))),e.isLeafNode()&&r.isEmpty())?e:e.updateImmediateChild(n,r).withIndex(this.index_)}updateFullNode(e,n,r){return r!=null&&(e.isLeafNode()||e.forEachChild(mn,(s,o)=>{n.hasChild(s)||r.trackChildChange(Rh(s,o))}),n.isLeafNode()||n.forEachChild(mn,(s,o)=>{if(e.hasChild(s)){const a=e.getImmediateChild(s);a.equals(o)||r.trackChildChange(Ph(s,o,a))}else r.trackChildChange(Bd(s,o))})),n.withIndex(this.index_)}updatePriority(e,n){return e.isEmpty()?Ze.EMPTY_NODE:e.updatePriority(n)}filtersNodes(){return!1}getIndexedFilter(){return this}getIndex(){return this.index_}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Oh{constructor(e){this.indexedFilter_=new WE(e.getIndex()),this.index_=e.getIndex(),this.startPost_=Oh.getStartPost_(e),this.endPost_=Oh.getEndPost_(e),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}getStartPost(){return this.startPost_}getEndPost(){return this.endPost_}matches(e){const n=this.startIsInclusive_?this.index_.compare(this.getStartPost(),e)<=0:this.index_.compare(this.getStartPost(),e)<0,r=this.endIsInclusive_?this.index_.compare(e,this.getEndPost())<=0:this.index_.compare(e,this.getEndPost())<0;return n&&r}updateChild(e,n,r,s,o,a){return this.matches(new ft(n,r))||(r=Ze.EMPTY_NODE),this.indexedFilter_.updateChild(e,n,r,s,o,a)}updateFullNode(e,n,r){n.isLeafNode()&&(n=Ze.EMPTY_NODE);let s=n.withIndex(this.index_);s=s.updatePriority(Ze.EMPTY_NODE);const o=this;return n.forEachChild(mn,(a,l)=>{o.matches(new ft(a,l))||(s=s.updateImmediateChild(a,Ze.EMPTY_NODE))}),this.indexedFilter_.updateFullNode(e,s,r)}updatePriority(e,n){return e}filtersNodes(){return!0}getIndexedFilter(){return this.indexedFilter_}getIndex(){return this.index_}static getStartPost_(e){if(e.hasStart()){const n=e.getIndexStartName();return e.getIndex().makePost(e.getIndexStartValue(),n)}else return e.getIndex().minPost()}static getEndPost_(e){if(e.hasEnd()){const n=e.getIndexEndName();return e.getIndex().makePost(e.getIndexEndValue(),n)}else return e.getIndex().maxPost()}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class rte{constructor(e){this.withinDirectionalStart=n=>this.reverse_?this.withinEndPost(n):this.withinStartPost(n),this.withinDirectionalEnd=n=>this.reverse_?this.withinStartPost(n):this.withinEndPost(n),this.withinStartPost=n=>{const r=this.index_.compare(this.rangedFilter_.getStartPost(),n);return this.startIsInclusive_?r<=0:r<0},this.withinEndPost=n=>{const r=this.index_.compare(n,this.rangedFilter_.getEndPost());return this.endIsInclusive_?r<=0:r<0},this.rangedFilter_=new Oh(e),this.index_=e.getIndex(),this.limit_=e.getLimit(),this.reverse_=!e.isViewFromLeft(),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}updateChild(e,n,r,s,o,a){return this.rangedFilter_.matches(new ft(n,r))||(r=Ze.EMPTY_NODE),e.getImmediateChild(n).equals(r)?e:e.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(e,n,r,s,o,a):this.fullLimitUpdateChild_(e,n,r,o,a)}updateFullNode(e,n,r){let s;if(n.isLeafNode()||n.isEmpty())s=Ze.EMPTY_NODE.withIndex(this.index_);else if(this.limit_*2<n.numChildren()&&n.isIndexed(this.index_)){s=Ze.EMPTY_NODE.withIndex(this.index_);let o;this.reverse_?o=n.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):o=n.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);let a=0;for(;o.hasNext()&&a<this.limit_;){const l=o.getNext();if(this.withinDirectionalStart(l))if(this.withinDirectionalEnd(l))s=s.updateImmediateChild(l.name,l.node),a++;else break;else continue}}else{s=n.withIndex(this.index_),s=s.updatePriority(Ze.EMPTY_NODE);let o;this.reverse_?o=s.getReverseIterator(this.index_):o=s.getIterator(this.index_);let a=0;for(;o.hasNext();){const l=o.getNext();a<this.limit_&&this.withinDirectionalStart(l)&&this.withinDirectionalEnd(l)?a++:s=s.updateImmediateChild(l.name,Ze.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(e,s,r)}updatePriority(e,n){return e}filtersNodes(){return!0}getIndexedFilter(){return this.rangedFilter_.getIndexedFilter()}getIndex(){return this.index_}fullLimitUpdateChild_(e,n,r,s,o){let a;if(this.reverse_){const f=this.index_.getCompare();a=(g,E)=>f(E,g)}else a=this.index_.getCompare();const l=e;Ce(l.numChildren()===this.limit_,"");const c=new ft(n,r),d=this.reverse_?l.getFirstChild(this.index_):l.getLastChild(this.index_),u=this.rangedFilter_.matches(c);if(l.hasChild(n)){const f=l.getImmediateChild(n);let g=s.getChildAfterChild(this.index_,d,this.reverse_);for(;g!=null&&(g.name===n||l.hasChild(g.name));)g=s.getChildAfterChild(this.index_,g,this.reverse_);const E=g==null?1:a(g,c);if(u&&!r.isEmpty()&&E>=0)return o!=null&&o.trackChildChange(Ph(n,r,f)),l.updateImmediateChild(n,r);{o!=null&&o.trackChildChange(Rh(n,f));const w=l.updateImmediateChild(n,Ze.EMPTY_NODE);return g!=null&&this.rangedFilter_.matches(g)?(o!=null&&o.trackChildChange(Bd(g.name,g.node)),w.updateImmediateChild(g.name,g.node)):w}}else return r.isEmpty()?e:u&&a(d,c)>=0?(o!=null&&(o.trackChildChange(Rh(d.name,d.node)),o.trackChildChange(Bd(n,r))),l.updateImmediateChild(n,r).updateImmediateChild(d.name,Ze.EMPTY_NODE)):e}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class VE{constructor(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.startAfterSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.endBeforeSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=mn}hasStart(){return this.startSet_}isViewFromLeft(){return this.viewFrom_===""?this.startSet_:this.viewFrom_==="l"}getIndexStartValue(){return Ce(this.startSet_,"Only valid if start has been set"),this.indexStartValue_}getIndexStartName(){return Ce(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:Wl}hasEnd(){return this.endSet_}getIndexEndValue(){return Ce(this.endSet_,"Only valid if end has been set"),this.indexEndValue_}getIndexEndName(){return Ce(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:Ra}hasLimit(){return this.limitSet_}hasAnchoredLimit(){return this.limitSet_&&this.viewFrom_!==""}getLimit(){return Ce(this.limitSet_,"Only valid if limit has been set"),this.limit_}getIndex(){return this.index_}loadsAllData(){return!(this.startSet_||this.endSet_||this.limitSet_)}isDefault(){return this.loadsAllData()&&this.index_===mn}copy(){const e=new VE;return e.limitSet_=this.limitSet_,e.limit_=this.limit_,e.startSet_=this.startSet_,e.startAfterSet_=this.startAfterSet_,e.indexStartValue_=this.indexStartValue_,e.startNameSet_=this.startNameSet_,e.indexStartName_=this.indexStartName_,e.endSet_=this.endSet_,e.endBeforeSet_=this.endBeforeSet_,e.indexEndValue_=this.indexEndValue_,e.endNameSet_=this.endNameSet_,e.indexEndName_=this.indexEndName_,e.index_=this.index_,e.viewFrom_=this.viewFrom_,e}}function ste(t){return t.loadsAllData()?new WE(t.getIndex()):t.hasLimit()?new rte(t):new Oh(t)}function ote(t,e,n){const r=t.copy();return r.startSet_=!0,e===void 0&&(e=null),r.indexStartValue_=e,n!=null?(r.startNameSet_=!0,r.indexStartName_=n):(r.startNameSet_=!1,r.indexStartName_=""),r}function ite(t,e,n){const r=t.copy();return r.endSet_=!0,e===void 0&&(e=null),r.indexEndValue_=e,n!==void 0?(r.endNameSet_=!0,r.indexEndName_=n):(r.endNameSet_=!1,r.indexEndName_=""),r}function ate(t,e){const n=t.copy();return n.index_=e,n}function DP(t){const e={};if(t.isDefault())return e;let n;if(t.index_===mn?n="$priority":t.index_===Z3?n="$value":t.index_===Dl?n="$key":(Ce(t.index_ instanceof GE,"Unrecognized index type!"),n=t.index_.toString()),e.orderBy=Ln(n),t.startSet_){const r=t.startAfterSet_?"startAfter":"startAt";e[r]=Ln(t.indexStartValue_),t.startNameSet_&&(e[r]+=","+Ln(t.indexStartName_))}if(t.endSet_){const r=t.endBeforeSet_?"endBefore":"endAt";e[r]=Ln(t.indexEndValue_),t.endNameSet_&&(e[r]+=","+Ln(t.indexEndName_))}return t.limitSet_&&(t.isViewFromLeft()?e.limitToFirst=t.limit_:e.limitToLast=t.limit_),e}function kP(t){const e={};if(t.startSet_&&(e.sp=t.indexStartValue_,t.startNameSet_&&(e.sn=t.indexStartName_),e.sin=!t.startAfterSet_),t.endSet_&&(e.ep=t.indexEndValue_,t.endNameSet_&&(e.en=t.indexEndName_),e.ein=!t.endBeforeSet_),t.limitSet_){e.l=t.limit_;let n=t.viewFrom_;n===""&&(t.isViewFromLeft()?n="l":n="r"),e.vf=n}return t.index_!==mn&&(e.i=t.index_.toString()),e}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Ay extends q3{constructor(e,n,r,s){super(),this.repoInfo_=e,this.onDataUpdate_=n,this.authTokenProvider_=r,this.appCheckTokenProvider_=s,this.log_=mp("p:rest:"),this.listens_={}}reportStats(e){throw new Error("Method not implemented.")}static getListenId_(e,n){return n!==void 0?"tag$"+n:(Ce(e._queryParams.isDefault(),"should have a tag if it's not a default query."),e._path.toString())}listen(e,n,r,s){const o=e._path.toString();this.log_("Listen called for "+o+" "+e._queryIdentifier);const a=Ay.getListenId_(e,r),l={};this.listens_[a]=l;const c=DP(e._queryParams);this.restRequest_(o+".json",c,(d,u)=>{let f=u;if(d===404&&(f=null,d=null),d===null&&this.onDataUpdate_(o,f,!1,r),$d(this.listens_,a)===l){let g;d?d===401?g="permission_denied":g="rest_error:"+d:g="ok",s(g,null)}})}unlisten(e,n){const r=Ay.getListenId_(e,n);delete this.listens_[r]}get(e){const n=DP(e._queryParams),r=e._path.toString(),s=new ME;return this.restRequest_(r+".json",n,(o,a)=>{let l=a;o===404&&(l=null,o=null),o===null?(this.onDataUpdate_(r,l,!1,null),s.resolve(l)):s.reject(new Error(l))}),s.promise}refreshAuthToken(e){}restRequest_(e,n={},r){return n.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then(([s,o])=>{s&&s.accessToken&&(n.auth=s.accessToken),o&&o.token&&(n.ac=o.token);const a=(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host+e+"?ns="+this.repoInfo_.namespace+zX(n);this.log_("Sending REST request for "+a);const l=new XMLHttpRequest;l.onreadystatechange=()=>{if(r&&l.readyState===4){this.log_("REST Response for "+a+" received. status:",l.status,"response:",l.responseText);let c=null;if(l.status>=200&&l.status<300){try{c=Eh(l.responseText)}catch{ts("Failed to parse JSON response for "+a+": "+l.responseText)}r(null,c)}else l.status!==401&&l.status!==404&&ts("Got unsuccessful REST response for "+a+" Status: "+l.status),r(l.status);r=null}},l.open("GET",a,!0),l.send()})}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class lte{constructor(){this.rootNode_=Ze.EMPTY_NODE}getNode(e){return this.rootNode_.getChild(e)}updateSnapshot(e,n){this.rootNode_=this.rootNode_.updateChild(e,n)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Ny(){return{value:null,children:new Map}}function X3(t,e,n){if(ut(e))t.value=n,t.children.clear();else if(t.value!==null)t.value=t.value.updateChild(e,n);else{const r=mt(e);t.children.has(r)||t.children.set(r,Ny());const s=t.children.get(r);e=Ht(e),X3(s,e,n)}}function Lw(t,e,n){t.value!==null?n(e,t.value):cte(t,(r,s)=>{const o=new qt(e.toString()+"/"+r);Lw(s,o,n)})}function cte(t,e){t.children.forEach((n,r)=>{e(r,n)})}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class dte{constructor(e){this.collection_=e,this.last_=null}get(){const e=this.collection_.get(),n=Object.assign({},e);return this.last_&&Yr(this.last_,(r,s)=>{n[r]=n[r]-s}),this.last_=e,n}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const TP=10*1e3,ute=30*1e3,fte=5*60*1e3;class hte{constructor(e,n){this.server_=n,this.statsToReport_={},this.statsListener_=new dte(e);const r=TP+(ute-TP)*Math.random();Mf(this.reportStats_.bind(this),Math.floor(r))}reportStats_(){const e=this.statsListener_.get(),n={};let r=!1;Yr(e,(s,o)=>{o>0&&Ao(this.statsToReport_,s)&&(n[s]=o,r=!0)}),r&&this.server_.reportStats(n),Mf(this.reportStats_.bind(this),Math.floor(Math.random()*2*fte))}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */var Ys;(function(t){t[t.OVERWRITE=0]="OVERWRITE",t[t.MERGE=1]="MERGE",t[t.ACK_USER_WRITE=2]="ACK_USER_WRITE",t[t.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"})(Ys||(Ys={}));function Q3(){return{fromUser:!0,fromServer:!1,queryId:null,tagged:!1}}function KE(){return{fromUser:!1,fromServer:!0,queryId:null,tagged:!1}}function ZE(t){return{fromUser:!1,fromServer:!0,queryId:t,tagged:!0}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Ry{constructor(e,n,r){this.path=e,this.affectedTree=n,this.revert=r,this.type=Ys.ACK_USER_WRITE,this.source=Q3()}operationForChild(e){if(ut(this.path)){if(this.affectedTree.value!=null)return Ce(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;{const n=this.affectedTree.subtree(new qt(e));return new Ry(At(),n,this.revert)}}else return Ce(mt(this.path)===e,"operationForChild called for unrelated child."),new Ry(Ht(this.path),this.affectedTree,this.revert)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Fh{constructor(e,n){this.source=e,this.path=n,this.type=Ys.LISTEN_COMPLETE}operationForChild(e){return ut(this.path)?new Fh(this.source,At()):new Fh(this.source,Ht(this.path))}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Vl{constructor(e,n,r){this.source=e,this.path=n,this.snap=r,this.type=Ys.OVERWRITE}operationForChild(e){return ut(this.path)?new Vl(this.source,At(),this.snap.getImmediateChild(e)):new Vl(this.source,Ht(this.path),this.snap)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Dh{constructor(e,n,r){this.source=e,this.path=n,this.children=r,this.type=Ys.MERGE}operationForChild(e){if(ut(this.path)){const n=this.children.subtree(new qt(e));return n.isEmpty()?null:n.value?new Vl(this.source,At(),n.value):new Dh(this.source,At(),n)}else return Ce(mt(this.path)===e,"Can't get a merge for a child not on the path of the operation"),new Dh(this.source,Ht(this.path),this.children)}toString(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Oa{constructor(e,n,r){this.node_=e,this.fullyInitialized_=n,this.filtered_=r}isFullyInitialized(){return this.fullyInitialized_}isFiltered(){return this.filtered_}isCompleteForPath(e){if(ut(e))return this.isFullyInitialized()&&!this.filtered_;const n=mt(e);return this.isCompleteForChild(n)}isCompleteForChild(e){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(e)}getNode(){return this.node_}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class pte{constructor(e){this.query_=e,this.index_=this.query_._queryParams.getIndex()}}function mte(t,e,n,r){const s=[],o=[];return e.forEach(a=>{a.type==="child_changed"&&t.index_.indexedValueChanged(a.oldSnap,a.snapshotNode)&&o.push(nte(a.childName,a.snapshotNode))}),Wu(t,s,"child_removed",e,r,n),Wu(t,s,"child_added",e,r,n),Wu(t,s,"child_moved",o,r,n),Wu(t,s,"child_changed",e,r,n),Wu(t,s,"value",e,r,n),s}function Wu(t,e,n,r,s,o){const a=r.filter(l=>l.type===n);a.sort((l,c)=>yte(t,l,c)),a.forEach(l=>{const c=gte(t,l,o);s.forEach(d=>{d.respondsTo(l.type)&&e.push(d.createEvent(c,t.query_))})})}function gte(t,e,n){return e.type==="value"||e.type==="child_removed"||(e.prevName=n.getPredecessorChildName(e.childName,e.snapshotNode,t.index_)),e}function yte(t,e,n){if(e.childName==null||n.childName==null)throw cu("Should only compare child_ events.");const r=new ft(e.childName,e.snapshotNode),s=new ft(n.childName,n.snapshotNode);return t.index_.compare(r,s)}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Hb(t,e){return{eventCache:t,serverCache:e}}function Lf(t,e,n,r){return Hb(new Oa(e,n,r),t.serverCache)}function e5(t,e,n,r){return Hb(t.eventCache,new Oa(e,n,r))}function Py(t){return t.eventCache.isFullyInitialized()?t.eventCache.getNode():null}function Kl(t){return t.serverCache.isFullyInitialized()?t.serverCache.getNode():null}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */let p_;const bte=()=>(p_||(p_=new zr(nee)),p_);class tn{constructor(e,n=bte()){this.value=e,this.children=n}static fromObject(e){let n=new tn(null);return Yr(e,(r,s)=>{n=n.set(new qt(r),s)}),n}isEmpty(){return this.value===null&&this.children.isEmpty()}findRootMostMatchingPathAndValue(e,n){if(this.value!=null&&n(this.value))return{path:At(),value:this.value};if(ut(e))return null;{const r=mt(e),s=this.children.get(r);if(s!==null){const o=s.findRootMostMatchingPathAndValue(Ht(e),n);return o!=null?{path:zn(new qt(r),o.path),value:o.value}:null}else return null}}findRootMostValueAndPath(e){return this.findRootMostMatchingPathAndValue(e,()=>!0)}subtree(e){if(ut(e))return this;{const n=mt(e),r=this.children.get(n);return r!==null?r.subtree(Ht(e)):new tn(null)}}set(e,n){if(ut(e))return new tn(n,this.children);{const r=mt(e),o=(this.children.get(r)||new tn(null)).set(Ht(e),n),a=this.children.insert(r,o);return new tn(this.value,a)}}remove(e){if(ut(e))return this.children.isEmpty()?new tn(null):new tn(null,this.children);{const n=mt(e),r=this.children.get(n);if(r){const s=r.remove(Ht(e));let o;return s.isEmpty()?o=this.children.remove(n):o=this.children.insert(n,s),this.value===null&&o.isEmpty()?new tn(null):new tn(this.value,o)}else return this}}get(e){if(ut(e))return this.value;{const n=mt(e),r=this.children.get(n);return r?r.get(Ht(e)):null}}setTree(e,n){if(ut(e))return n;{const r=mt(e),o=(this.children.get(r)||new tn(null)).setTree(Ht(e),n);let a;return o.isEmpty()?a=this.children.remove(r):a=this.children.insert(r,o),new tn(this.value,a)}}fold(e){return this.fold_(At(),e)}fold_(e,n){const r={};return this.children.inorderTraversal((s,o)=>{r[s]=o.fold_(zn(e,s),n)}),n(e,this.value,r)}findOnPath(e,n){return this.findOnPath_(e,At(),n)}findOnPath_(e,n,r){const s=this.value?r(n,this.value):!1;if(s)return s;if(ut(e))return null;{const o=mt(e),a=this.children.get(o);return a?a.findOnPath_(Ht(e),zn(n,o),r):null}}foreachOnPath(e,n){return this.foreachOnPath_(e,At(),n)}foreachOnPath_(e,n,r){if(ut(e))return this;{this.value&&r(n,this.value);const s=mt(e),o=this.children.get(s);return o?o.foreachOnPath_(Ht(e),zn(n,s),r):new tn(null)}}foreach(e){this.foreach_(At(),e)}foreach_(e,n){this.children.inorderTraversal((r,s)=>{s.foreach_(zn(e,r),n)}),this.value&&n(e,this.value)}foreachChild(e){this.children.inorderTraversal((n,r)=>{r.value&&e(n,r.value)})}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Zs{constructor(e){this.writeTree_=e}static empty(){return new Zs(new tn(null))}}function zf(t,e,n){if(ut(e))return new Zs(new tn(n));{const r=t.writeTree_.findRootMostValueAndPath(e);if(r!=null){const s=r.path;let o=r.value;const a=Er(s,e);return o=o.updateChild(a,n),new Zs(t.writeTree_.set(s,o))}else{const s=new tn(n),o=t.writeTree_.setTree(e,s);return new Zs(o)}}}function IP(t,e,n){let r=t;return Yr(n,(s,o)=>{r=zf(r,zn(e,s),o)}),r}function MP(t,e){if(ut(e))return Zs.empty();{const n=t.writeTree_.setTree(e,new tn(null));return new Zs(n)}}function zw(t,e){return oc(t,e)!=null}function oc(t,e){const n=t.writeTree_.findRootMostValueAndPath(e);return n!=null?t.writeTree_.get(n.path).getChild(Er(n.path,e)):null}function LP(t){const e=[],n=t.writeTree_.value;return n!=null?n.isLeafNode()||n.forEachChild(mn,(r,s)=>{e.push(new ft(r,s))}):t.writeTree_.children.inorderTraversal((r,s)=>{s.value!=null&&e.push(new ft(r,s.value))}),e}function xa(t,e){if(ut(e))return t;{const n=oc(t,e);return n!=null?new Zs(new tn(n)):new Zs(t.writeTree_.subtree(e))}}function qw(t){return t.writeTree_.isEmpty()}function Ud(t,e){return t5(At(),t.writeTree_,e)}function t5(t,e,n){if(e.value!=null)return n.updateChild(t,e.value);{let r=null;return e.children.inorderTraversal((s,o)=>{s===".priority"?(Ce(o.value!==null,"Priority writes must always be leaf nodes"),r=o.value):n=t5(zn(t,s),o,n)}),!n.getChild(t).isEmpty()&&r!==null&&(n=n.updateChild(zn(t,".priority"),r)),n}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Gb(t,e){return o5(e,t)}function vte(t,e,n,r,s){Ce(r>t.lastWriteId,"Stacking an older write on top of newer ones"),s===void 0&&(s=!0),t.allWrites.push({path:e,snap:n,writeId:r,visible:s}),s&&(t.visibleWrites=zf(t.visibleWrites,e,n)),t.lastWriteId=r}function _te(t,e){for(let n=0;n<t.allWrites.length;n++){const r=t.allWrites[n];if(r.writeId===e)return r}return null}function wte(t,e){const n=t.allWrites.findIndex(l=>l.writeId===e);Ce(n>=0,"removeWrite called with nonexistent writeId.");const r=t.allWrites[n];t.allWrites.splice(n,1);let s=r.visible,o=!1,a=t.allWrites.length-1;for(;s&&a>=0;){const l=t.allWrites[a];l.visible&&(a>=n&&xte(l,r.path)?s=!1:Us(r.path,l.path)&&(o=!0)),a--}if(s){if(o)return Cte(t),!0;if(r.snap)t.visibleWrites=MP(t.visibleWrites,r.path);else{const l=r.children;Yr(l,c=>{t.visibleWrites=MP(t.visibleWrites,zn(r.path,c))})}return!0}else return!1}function xte(t,e){if(t.snap)return Us(t.path,e);for(const n in t.children)if(t.children.hasOwnProperty(n)&&Us(zn(t.path,n),e))return!0;return!1}function Cte(t){t.visibleWrites=n5(t.allWrites,Ete,At()),t.allWrites.length>0?t.lastWriteId=t.allWrites[t.allWrites.length-1].writeId:t.lastWriteId=-1}function Ete(t){return t.visible}function n5(t,e,n){let r=Zs.empty();for(let s=0;s<t.length;++s){const o=t[s];if(e(o)){const a=o.path;let l;if(o.snap)Us(n,a)?(l=Er(n,a),r=zf(r,l,o.snap)):Us(a,n)&&(l=Er(a,n),r=zf(r,At(),o.snap.getChild(l)));else if(o.children){if(Us(n,a))l=Er(n,a),r=IP(r,l,o.children);else if(Us(a,n))if(l=Er(a,n),ut(l))r=IP(r,At(),o.children);else{const c=$d(o.children,mt(l));if(c){const d=c.getChild(Ht(l));r=zf(r,At(),d)}}}else throw cu("WriteRecord should have .snap or .children")}}return r}function r5(t,e,n,r,s){if(!r&&!s){const o=oc(t.visibleWrites,e);if(o!=null)return o;{const a=xa(t.visibleWrites,e);if(qw(a))return n;if(n==null&&!zw(a,At()))return null;{const l=n||Ze.EMPTY_NODE;return Ud(a,l)}}}else{const o=xa(t.visibleWrites,e);if(!s&&qw(o))return n;if(!s&&n==null&&!zw(o,At()))return null;{const a=function(d){return(d.visible||s)&&(!r||!~r.indexOf(d.writeId))&&(Us(d.path,e)||Us(e,d.path))},l=n5(t.allWrites,a,e),c=n||Ze.EMPTY_NODE;return Ud(l,c)}}}function Ste(t,e,n){let r=Ze.EMPTY_NODE;const s=oc(t.visibleWrites,e);if(s)return s.isLeafNode()||s.forEachChild(mn,(o,a)=>{r=r.updateImmediateChild(o,a)}),r;if(n){const o=xa(t.visibleWrites,e);return n.forEachChild(mn,(a,l)=>{const c=Ud(xa(o,new qt(a)),l);r=r.updateImmediateChild(a,c)}),LP(o).forEach(a=>{r=r.updateImmediateChild(a.name,a.node)}),r}else{const o=xa(t.visibleWrites,e);return LP(o).forEach(a=>{r=r.updateImmediateChild(a.name,a.node)}),r}}function Ate(t,e,n,r,s){Ce(r||s,"Either existingEventSnap or existingServerSnap must exist");const o=zn(e,n);if(zw(t.visibleWrites,o))return null;{const a=xa(t.visibleWrites,o);return qw(a)?s.getChild(n):Ud(a,s.getChild(n))}}function Nte(t,e,n,r){const s=zn(e,n),o=oc(t.visibleWrites,s);if(o!=null)return o;if(r.isCompleteForChild(n)){const a=xa(t.visibleWrites,s);return Ud(a,r.getNode().getImmediateChild(n))}else return null}function Rte(t,e){return oc(t.visibleWrites,e)}function Pte(t,e,n,r,s,o,a){let l;const c=xa(t.visibleWrites,e),d=oc(c,At());if(d!=null)l=d;else if(n!=null)l=Ud(c,n);else return[];if(l=l.withIndex(a),!l.isEmpty()&&!l.isLeafNode()){const u=[],f=a.getCompare(),g=o?l.getReverseIteratorFrom(r,a):l.getIteratorFrom(r,a);let E=g.getNext();for(;E&&u.length<s;)f(E,r)!==0&&u.push(E),E=g.getNext();return u}else return[]}function Ote(){return{visibleWrites:Zs.empty(),allWrites:[],lastWriteId:-1}}function Oy(t,e,n,r){return r5(t.writeTree,t.treePath,e,n,r)}function JE(t,e){return Ste(t.writeTree,t.treePath,e)}function zP(t,e,n,r){return Ate(t.writeTree,t.treePath,e,n,r)}function Fy(t,e){return Rte(t.writeTree,zn(t.treePath,e))}function Fte(t,e,n,r,s,o){return Pte(t.writeTree,t.treePath,e,n,r,s,o)}function XE(t,e,n){return Nte(t.writeTree,t.treePath,e,n)}function s5(t,e){return o5(zn(t.treePath,e),t.writeTree)}function o5(t,e){return{treePath:t,writeTree:e}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Dte{constructor(){this.changeMap=new Map}trackChildChange(e){const n=e.type,r=e.childName;Ce(n==="child_added"||n==="child_changed"||n==="child_removed","Only child changes supported for tracking"),Ce(r!==".priority","Only non-priority child changes can be tracked.");const s=this.changeMap.get(r);if(s){const o=s.type;if(n==="child_added"&&o==="child_removed")this.changeMap.set(r,Ph(r,e.snapshotNode,s.snapshotNode));else if(n==="child_removed"&&o==="child_added")this.changeMap.delete(r);else if(n==="child_removed"&&o==="child_changed")this.changeMap.set(r,Rh(r,s.oldSnap));else if(n==="child_changed"&&o==="child_added")this.changeMap.set(r,Bd(r,e.snapshotNode));else if(n==="child_changed"&&o==="child_changed")this.changeMap.set(r,Ph(r,e.snapshotNode,s.oldSnap));else throw cu("Illegal combination of changes: "+e+" occurred after "+s)}else this.changeMap.set(r,e)}getChanges(){return Array.from(this.changeMap.values())}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class kte{getCompleteChild(e){return null}getChildAfterChild(e,n,r){return null}}const i5=new kte;class QE{constructor(e,n,r=null){this.writes_=e,this.viewCache_=n,this.optCompleteServerCache_=r}getCompleteChild(e){const n=this.viewCache_.eventCache;if(n.isCompleteForChild(e))return n.getNode().getImmediateChild(e);{const r=this.optCompleteServerCache_!=null?new Oa(this.optCompleteServerCache_,!0,!1):this.viewCache_.serverCache;return XE(this.writes_,e,r)}}getChildAfterChild(e,n,r){const s=this.optCompleteServerCache_!=null?this.optCompleteServerCache_:Kl(this.viewCache_),o=Fte(this.writes_,s,n,1,r,e);return o.length===0?null:o[0]}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Tte(t){return{filter:t}}function Ite(t,e){Ce(e.eventCache.getNode().isIndexed(t.filter.getIndex()),"Event snap not indexed"),Ce(e.serverCache.getNode().isIndexed(t.filter.getIndex()),"Server snap not indexed")}function Mte(t,e,n,r,s){const o=new Dte;let a,l;if(n.type===Ys.OVERWRITE){const d=n;d.source.fromUser?a=jw(t,e,d.path,d.snap,r,s,o):(Ce(d.source.fromServer,"Unknown source."),l=d.source.tagged||e.serverCache.isFiltered()&&!ut(d.path),a=Dy(t,e,d.path,d.snap,r,s,l,o))}else if(n.type===Ys.MERGE){const d=n;d.source.fromUser?a=zte(t,e,d.path,d.children,r,s,o):(Ce(d.source.fromServer,"Unknown source."),l=d.source.tagged||e.serverCache.isFiltered(),a=$w(t,e,d.path,d.children,r,s,l,o))}else if(n.type===Ys.ACK_USER_WRITE){const d=n;d.revert?a=$te(t,e,d.path,r,s,o):a=qte(t,e,d.path,d.affectedTree,r,s,o)}else if(n.type===Ys.LISTEN_COMPLETE)a=jte(t,e,n.path,r,o);else throw cu("Unknown operation type: "+n.type);const c=o.getChanges();return Lte(e,a,c),{viewCache:a,changes:c}}function Lte(t,e,n){const r=e.eventCache;if(r.isFullyInitialized()){const s=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=Py(t);(n.length>0||!t.eventCache.isFullyInitialized()||s&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(J3(Py(e)))}}function a5(t,e,n,r,s,o){const a=e.eventCache;if(Fy(r,n)!=null)return e;{let l,c;if(ut(n))if(Ce(e.serverCache.isFullyInitialized(),"If change path is empty, we must have complete server data"),e.serverCache.isFiltered()){const d=Kl(e),u=d instanceof Ze?d:Ze.EMPTY_NODE,f=JE(r,u);l=t.filter.updateFullNode(e.eventCache.getNode(),f,o)}else{const d=Oy(r,Kl(e));l=t.filter.updateFullNode(e.eventCache.getNode(),d,o)}else{const d=mt(n);if(d===".priority"){Ce(Pa(n)===1,"Can't have a priority with additional path components");const u=a.getNode();c=e.serverCache.getNode();const f=zP(r,n,u,c);f!=null?l=t.filter.updatePriority(u,f):l=a.getNode()}else{const u=Ht(n);let f;if(a.isCompleteForChild(d)){c=e.serverCache.getNode();const g=zP(r,n,a.getNode(),c);g!=null?f=a.getNode().getImmediateChild(d).updateChild(u,g):f=a.getNode().getImmediateChild(d)}else f=XE(r,d,e.serverCache);f!=null?l=t.filter.updateChild(a.getNode(),d,f,u,s,o):l=a.getNode()}}return Lf(e,l,a.isFullyInitialized()||ut(n),t.filter.filtersNodes())}}function Dy(t,e,n,r,s,o,a,l){const c=e.serverCache;let d;const u=a?t.filter:t.filter.getIndexedFilter();if(ut(n))d=u.updateFullNode(c.getNode(),r,null);else if(u.filtersNodes()&&!c.isFiltered()){const E=c.getNode().updateChild(n,r);d=u.updateFullNode(c.getNode(),E,null)}else{const E=mt(n);if(!c.isCompleteForPath(n)&&Pa(n)>1)return e;const S=Ht(n),_=c.getNode().getImmediateChild(E).updateChild(S,r);E===".priority"?d=u.updatePriority(c.getNode(),_):d=u.updateChild(c.getNode(),E,_,S,i5,null)}const f=e5(e,d,c.isFullyInitialized()||ut(n),u.filtersNodes()),g=new QE(s,f,o);return a5(t,f,n,s,g,l)}function jw(t,e,n,r,s,o,a){const l=e.eventCache;let c,d;const u=new QE(s,e,o);if(ut(n))d=t.filter.updateFullNode(e.eventCache.getNode(),r,a),c=Lf(e,d,!0,t.filter.filtersNodes());else{const f=mt(n);if(f===".priority")d=t.filter.updatePriority(e.eventCache.getNode(),r),c=Lf(e,d,l.isFullyInitialized(),l.isFiltered());else{const g=Ht(n),E=l.getNode().getImmediateChild(f);let S;if(ut(g))S=r;else{const w=u.getCompleteChild(f);w!=null?$3(g)===".priority"&&w.getChild(U3(g)).isEmpty()?S=w:S=w.updateChild(g,r):S=Ze.EMPTY_NODE}if(E.equals(S))c=e;else{const w=t.filter.updateChild(l.getNode(),f,S,g,u,a);c=Lf(e,w,l.isFullyInitialized(),t.filter.filtersNodes())}}}return c}function qP(t,e){return t.eventCache.isCompleteForChild(e)}function zte(t,e,n,r,s,o,a){let l=e;return r.foreach((c,d)=>{const u=zn(n,c);qP(e,mt(u))&&(l=jw(t,l,u,d,s,o,a))}),r.foreach((c,d)=>{const u=zn(n,c);qP(e,mt(u))||(l=jw(t,l,u,d,s,o,a))}),l}function jP(t,e,n){return n.foreach((r,s)=>{e=e.updateChild(r,s)}),e}function $w(t,e,n,r,s,o,a,l){if(e.serverCache.getNode().isEmpty()&&!e.serverCache.isFullyInitialized())return e;let c=e,d;ut(n)?d=r:d=new tn(null).setTree(n,r);const u=e.serverCache.getNode();return d.children.inorderTraversal((f,g)=>{if(u.hasChild(f)){const E=e.serverCache.getNode().getImmediateChild(f),S=jP(t,E,g);c=Dy(t,c,new qt(f),S,s,o,a,l)}}),d.children.inorderTraversal((f,g)=>{const E=!e.serverCache.isCompleteForChild(f)&&g.value===null;if(!u.hasChild(f)&&!E){const S=e.serverCache.getNode().getImmediateChild(f),w=jP(t,S,g);c=Dy(t,c,new qt(f),w,s,o,a,l)}}),c}function qte(t,e,n,r,s,o,a){if(Fy(s,n)!=null)return e;const l=e.serverCache.isFiltered(),c=e.serverCache;if(r.value!=null){if(ut(n)&&c.isFullyInitialized()||c.isCompleteForPath(n))return Dy(t,e,n,c.getNode().getChild(n),s,o,l,a);if(ut(n)){let d=new tn(null);return c.getNode().forEachChild(Dl,(u,f)=>{d=d.set(new qt(u),f)}),$w(t,e,n,d,s,o,l,a)}else return e}else{let d=new tn(null);return r.foreach((u,f)=>{const g=zn(n,u);c.isCompleteForPath(g)&&(d=d.set(u,c.getNode().getChild(g)))}),$w(t,e,n,d,s,o,l,a)}}function jte(t,e,n,r,s){const o=e.serverCache,a=e5(e,o.getNode(),o.isFullyInitialized()||ut(n),o.isFiltered());return a5(t,a,n,r,i5,s)}function $te(t,e,n,r,s,o){let a;if(Fy(r,n)!=null)return e;{const l=new QE(r,e,s),c=e.eventCache.getNode();let d;if(ut(n)||mt(n)===".priority"){let u;if(e.serverCache.isFullyInitialized())u=Oy(r,Kl(e));else{const f=e.serverCache.getNode();Ce(f instanceof Ze,"serverChildren would be complete if leaf node"),u=JE(r,f)}u=u,d=t.filter.updateFullNode(c,u,o)}else{const u=mt(n);let f=XE(r,u,e.serverCache);f==null&&e.serverCache.isCompleteForChild(u)&&(f=c.getImmediateChild(u)),f!=null?d=t.filter.updateChild(c,u,f,Ht(n),l,o):e.eventCache.getNode().hasChild(u)?d=t.filter.updateChild(c,u,Ze.EMPTY_NODE,Ht(n),l,o):d=c,d.isEmpty()&&e.serverCache.isFullyInitialized()&&(a=Oy(r,Kl(e)),a.isLeafNode()&&(d=t.filter.updateFullNode(d,a,o)))}return a=e.serverCache.isFullyInitialized()||Fy(r,At())!=null,Lf(e,d,a,t.filter.filtersNodes())}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Bte{constructor(e,n){this.query_=e,this.eventRegistrations_=[];const r=this.query_._queryParams,s=new WE(r.getIndex()),o=ste(r);this.processor_=Tte(o);const a=n.serverCache,l=n.eventCache,c=s.updateFullNode(Ze.EMPTY_NODE,a.getNode(),null),d=o.updateFullNode(Ze.EMPTY_NODE,l.getNode(),null),u=new Oa(c,a.isFullyInitialized(),s.filtersNodes()),f=new Oa(d,l.isFullyInitialized(),o.filtersNodes());this.viewCache_=Hb(f,u),this.eventGenerator_=new pte(this.query_)}get query(){return this.query_}}function Ute(t){return t.viewCache_.serverCache.getNode()}function Yte(t){return Py(t.viewCache_)}function Hte(t,e){const n=Kl(t.viewCache_);return n&&(t.query._queryParams.loadsAllData()||!ut(e)&&!n.getImmediateChild(mt(e)).isEmpty())?n.getChild(e):null}function $P(t){return t.eventRegistrations_.length===0}function Gte(t,e){t.eventRegistrations_.push(e)}function BP(t,e,n){const r=[];if(n){Ce(e==null,"A cancel should cancel all event registrations.");const s=t.query._path;t.eventRegistrations_.forEach(o=>{const a=o.createCancelEvent(n,s);a&&r.push(a)})}if(e){let s=[];for(let o=0;o<t.eventRegistrations_.length;++o){const a=t.eventRegistrations_[o];if(!a.matches(e))s.push(a);else if(e.hasAnyCallback()){s=s.concat(t.eventRegistrations_.slice(o+1));break}}t.eventRegistrations_=s}else t.eventRegistrations_=[];return r}function UP(t,e,n,r){e.type===Ys.MERGE&&e.source.queryId!==null&&(Ce(Kl(t.viewCache_),"We should always have a full cache before handling merges"),Ce(Py(t.viewCache_),"Missing event cache, even though we have a server cache"));const s=t.viewCache_,o=Mte(t.processor_,s,e,n,r);return Ite(t.processor_,o.viewCache),Ce(o.viewCache.serverCache.isFullyInitialized()||!s.serverCache.isFullyInitialized(),"Once a server snap is complete, it should never go back"),t.viewCache_=o.viewCache,l5(t,o.changes,o.viewCache.eventCache.getNode(),null)}function Wte(t,e){const n=t.viewCache_.eventCache,r=[];return n.getNode().isLeafNode()||n.getNode().forEachChild(mn,(o,a)=>{r.push(Bd(o,a))}),n.isFullyInitialized()&&r.push(J3(n.getNode())),l5(t,r,n.getNode(),e)}function l5(t,e,n,r){const s=r?[r]:t.eventRegistrations_;return mte(t.eventGenerator_,e,n,s)}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */let ky;class c5{constructor(){this.views=new Map}}function Vte(t){Ce(!ky,"__referenceConstructor has already been defined"),ky=t}function Kte(){return Ce(ky,"Reference.ts has not been loaded"),ky}function Zte(t){return t.views.size===0}function eS(t,e,n,r){const s=e.source.queryId;if(s!==null){const o=t.views.get(s);return Ce(o!=null,"SyncTree gave us an op for an invalid query."),UP(o,e,n,r)}else{let o=[];for(const a of t.views.values())o=o.concat(UP(a,e,n,r));return o}}function d5(t,e,n,r,s){const o=e._queryIdentifier,a=t.views.get(o);if(!a){let l=Oy(n,s?r:null),c=!1;l?c=!0:r instanceof Ze?(l=JE(n,r),c=!1):(l=Ze.EMPTY_NODE,c=!1);const d=Hb(new Oa(l,c,!1),new Oa(r,s,!1));return new Bte(e,d)}return a}function Jte(t,e,n,r,s,o){const a=d5(t,e,r,s,o);return t.views.has(e._queryIdentifier)||t.views.set(e._queryIdentifier,a),Gte(a,n),Wte(a,n)}function Xte(t,e,n,r){const s=e._queryIdentifier,o=[];let a=[];const l=Fa(t);if(s==="default")for(const[c,d]of t.views.entries())a=a.concat(BP(d,n,r)),$P(d)&&(t.views.delete(c),d.query._queryParams.loadsAllData()||o.push(d.query));else{const c=t.views.get(s);c&&(a=a.concat(BP(c,n,r)),$P(c)&&(t.views.delete(s),c.query._queryParams.loadsAllData()||o.push(c.query)))}return l&&!Fa(t)&&o.push(new(Kte())(e._repo,e._path)),{removed:o,events:a}}function u5(t){const e=[];for(const n of t.views.values())n.query._queryParams.loadsAllData()||e.push(n);return e}function Ca(t,e){let n=null;for(const r of t.views.values())n=n||Hte(r,e);return n}function f5(t,e){if(e._queryParams.loadsAllData())return Wb(t);{const r=e._queryIdentifier;return t.views.get(r)}}function h5(t,e){return f5(t,e)!=null}function Fa(t){return Wb(t)!=null}function Wb(t){for(const e of t.views.values())if(e.query._queryParams.loadsAllData())return e;return null}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */let Ty;function Qte(t){Ce(!Ty,"__referenceConstructor has already been defined"),Ty=t}function ene(){return Ce(Ty,"Reference.ts has not been loaded"),Ty}let tne=1;class YP{constructor(e){this.listenProvider_=e,this.syncPointTree_=new tn(null),this.pendingWriteTree_=Ote(),this.tagToQueryMap=new Map,this.queryToTagMap=new Map}}function nne(t,e,n,r,s){return vte(t.pendingWriteTree_,e,n,r,s),s?vp(t,new Vl(Q3(),e,n)):[]}function td(t,e,n=!1){const r=_te(t.pendingWriteTree_,e);if(wte(t.pendingWriteTree_,e)){let o=new tn(null);return r.snap!=null?o=o.set(At(),!0):Yr(r.children,a=>{o=o.set(new qt(a),!0)}),vp(t,new Ry(r.path,o,n))}else return[]}function bp(t,e,n){return vp(t,new Vl(KE(),e,n))}function rne(t,e,n){const r=tn.fromObject(n);return vp(t,new Dh(KE(),e,r))}function sne(t,e){return vp(t,new Fh(KE(),e))}function one(t,e,n){const r=tS(t,n);if(r){const s=nS(r),o=s.path,a=s.queryId,l=Er(o,e),c=new Fh(ZE(a),l);return rS(t,o,c)}else return[]}function Iy(t,e,n,r,s=!1){const o=e._path,a=t.syncPointTree_.get(o);let l=[];if(a&&(e._queryIdentifier==="default"||h5(a,e))){const c=Xte(a,e,n,r);Zte(a)&&(t.syncPointTree_=t.syncPointTree_.remove(o));const d=c.removed;if(l=c.events,!s){const u=d.findIndex(g=>g._queryParams.loadsAllData())!==-1,f=t.syncPointTree_.findOnPath(o,(g,E)=>Fa(E));if(u&&!f){const g=t.syncPointTree_.subtree(o);if(!g.isEmpty()){const E=lne(g);for(let S=0;S<E.length;++S){const w=E[S],_=w.query,h=b5(t,w);t.listenProvider_.startListening(qf(_),kh(t,_),h.hashFn,h.onComplete)}}}!f&&d.length>0&&!r&&(u?t.listenProvider_.stopListening(qf(e),null):d.forEach(g=>{const E=t.queryToTagMap.get(Vb(g));t.listenProvider_.stopListening(qf(g),E)}))}cne(t,d)}return l}function p5(t,e,n,r){const s=tS(t,r);if(s!=null){const o=nS(s),a=o.path,l=o.queryId,c=Er(a,e),d=new Vl(ZE(l),c,n);return rS(t,a,d)}else return[]}function ine(t,e,n,r){const s=tS(t,r);if(s){const o=nS(s),a=o.path,l=o.queryId,c=Er(a,e),d=tn.fromObject(n),u=new Dh(ZE(l),c,d);return rS(t,a,u)}else return[]}function Bw(t,e,n,r=!1){const s=e._path;let o=null,a=!1;t.syncPointTree_.foreachOnPath(s,(g,E)=>{const S=Er(g,s);o=o||Ca(E,S),a=a||Fa(E)});let l=t.syncPointTree_.get(s);l?(a=a||Fa(l),o=o||Ca(l,At())):(l=new c5,t.syncPointTree_=t.syncPointTree_.set(s,l));let c;o!=null?c=!0:(c=!1,o=Ze.EMPTY_NODE,t.syncPointTree_.subtree(s).foreachChild((E,S)=>{const w=Ca(S,At());w&&(o=o.updateImmediateChild(E,w))}));const d=h5(l,e);if(!d&&!e._queryParams.loadsAllData()){const g=Vb(e);Ce(!t.queryToTagMap.has(g),"View does not exist, but we have a tag");const E=dne();t.queryToTagMap.set(g,E),t.tagToQueryMap.set(E,g)}const u=Gb(t.pendingWriteTree_,s);let f=Jte(l,e,n,u,o,c);if(!d&&!a&&!r){const g=f5(l,e);f=f.concat(une(t,e,g))}return f}function m5(t,e,n){const s=t.pendingWriteTree_,o=t.syncPointTree_.findOnPath(e,(a,l)=>{const c=Er(a,e),d=Ca(l,c);if(d)return d});return r5(s,e,o,n,!0)}function ane(t,e){const n=e._path;let r=null;t.syncPointTree_.foreachOnPath(n,(d,u)=>{const f=Er(d,n);r=r||Ca(u,f)});let s=t.syncPointTree_.get(n);s?r=r||Ca(s,At()):(s=new c5,t.syncPointTree_=t.syncPointTree_.set(n,s));const o=r!=null,a=o?new Oa(r,!0,!1):null,l=Gb(t.pendingWriteTree_,e._path),c=d5(s,e,l,o?a.getNode():Ze.EMPTY_NODE,o);return Yte(c)}function vp(t,e){return g5(e,t.syncPointTree_,null,Gb(t.pendingWriteTree_,At()))}function g5(t,e,n,r){if(ut(t.path))return y5(t,e,n,r);{const s=e.get(At());n==null&&s!=null&&(n=Ca(s,At()));let o=[];const a=mt(t.path),l=t.operationForChild(a),c=e.children.get(a);if(c&&l){const d=n?n.getImmediateChild(a):null,u=s5(r,a);o=o.concat(g5(l,c,d,u))}return s&&(o=o.concat(eS(s,t,r,n))),o}}function y5(t,e,n,r){const s=e.get(At());n==null&&s!=null&&(n=Ca(s,At()));let o=[];return e.children.inorderTraversal((a,l)=>{const c=n?n.getImmediateChild(a):null,d=s5(r,a),u=t.operationForChild(a);u&&(o=o.concat(y5(u,l,c,d)))}),s&&(o=o.concat(eS(s,t,r,n))),o}function b5(t,e){const n=e.query,r=kh(t,n);return{hashFn:()=>(Ute(e)||Ze.EMPTY_NODE).hash(),onComplete:s=>{if(s==="ok")return r?one(t,n._path,r):sne(t,n._path);{const o=oee(s,n);return Iy(t,n,null,o)}}}}function kh(t,e){const n=Vb(e);return t.queryToTagMap.get(n)}function Vb(t){return t._path.toString()+"$"+t._queryIdentifier}function tS(t,e){return t.tagToQueryMap.get(e)}function nS(t){const e=t.indexOf("$");return Ce(e!==-1&&e<t.length-1,"Bad queryKey."),{queryId:t.substr(e+1),path:new qt(t.substr(0,e))}}function rS(t,e,n){const r=t.syncPointTree_.get(e);Ce(r,"Missing sync point for query tag that we're tracking");const s=Gb(t.pendingWriteTree_,e);return eS(r,n,s,null)}function lne(t){return t.fold((e,n,r)=>{if(n&&Fa(n))return[Wb(n)];{let s=[];return n&&(s=u5(n)),Yr(r,(o,a)=>{s=s.concat(a)}),s}})}function qf(t){return t._queryParams.loadsAllData()&&!t._queryParams.isDefault()?new(ene())(t._repo,t._path):t}function cne(t,e){for(let n=0;n<e.length;++n){const r=e[n];if(!r._queryParams.loadsAllData()){const s=Vb(r),o=t.queryToTagMap.get(s);t.queryToTagMap.delete(s),t.tagToQueryMap.delete(o)}}}function dne(){return tne++}function une(t,e,n){const r=e._path,s=kh(t,e),o=b5(t,n),a=t.listenProvider_.startListening(qf(e),s,o.hashFn,o.onComplete),l=t.syncPointTree_.subtree(r);if(s)Ce(!Fa(l.value),"If we're adding a query, it shouldn't be shadowed");else{const c=l.fold((d,u,f)=>{if(!ut(d)&&u&&Fa(u))return[Wb(u).query];{let g=[];return u&&(g=g.concat(u5(u).map(E=>E.query))),Yr(f,(E,S)=>{g=g.concat(S)}),g}});for(let d=0;d<c.length;++d){const u=c[d];t.listenProvider_.stopListening(qf(u),kh(t,u))}}return a}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class sS{constructor(e){this.node_=e}getImmediateChild(e){const n=this.node_.getImmediateChild(e);return new sS(n)}node(){return this.node_}}class oS{constructor(e,n){this.syncTree_=e,this.path_=n}getImmediateChild(e){const n=zn(this.path_,e);return new oS(this.syncTree_,n)}node(){return m5(this.syncTree_,this.path_)}}const fne=function(t){return t=t||{},t.timestamp=t.timestamp||new Date().getTime(),t},HP=function(t,e,n){if(!t||typeof t!="object")return t;if(Ce(".sv"in t,"Unexpected leaf node or priority contents"),typeof t[".sv"]=="string")return hne(t[".sv"],e,n);if(typeof t[".sv"]=="object")return pne(t[".sv"],e);Ce(!1,"Unexpected server value: "+JSON.stringify(t,null,2))},hne=function(t,e,n){switch(t){case"timestamp":return n.timestamp;default:Ce(!1,"Unexpected server value: "+t)}},pne=function(t,e,n){t.hasOwnProperty("increment")||Ce(!1,"Unexpected server value: "+JSON.stringify(t,null,2));const r=t.increment;typeof r!="number"&&Ce(!1,"Unexpected increment value: "+r);const s=e.node();if(Ce(s!==null&&typeof s<"u","Expected ChildrenNode.EMPTY_NODE for nulls"),!s.isLeafNode())return r;const a=s.getValue();return typeof a!="number"?r:a+r},mne=function(t,e,n,r){return iS(e,new oS(n,t),r)},gne=function(t,e,n){return iS(t,new sS(e),n)};function iS(t,e,n){const r=t.getPriority().val(),s=HP(r,e.getImmediateChild(".priority"),n);let o;if(t.isLeafNode()){const a=t,l=HP(a.getValue(),e,n);return l!==a.getValue()||s!==a.getPriority().val()?new Hn(l,Xn(s)):t}else{const a=t;return o=a,s!==a.getPriority().val()&&(o=o.updatePriority(new Hn(s))),a.forEachChild(mn,(l,c)=>{const d=iS(c,e.getImmediateChild(l),n);d!==c&&(o=o.updateImmediateChild(l,d))}),o}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class aS{constructor(e="",n=null,r={children:{},childCount:0}){this.name=e,this.parent=n,this.node=r}}function lS(t,e){let n=e instanceof qt?e:new qt(e),r=t,s=mt(n);for(;s!==null;){const o=$d(r.node.children,s)||{children:{},childCount:0};r=new aS(s,r,o),n=Ht(n),s=mt(n)}return r}function fu(t){return t.node.value}function v5(t,e){t.node.value=e,Uw(t)}function _5(t){return t.node.childCount>0}function yne(t){return fu(t)===void 0&&!_5(t)}function Kb(t,e){Yr(t.node.children,(n,r)=>{e(new aS(n,t,r))})}function w5(t,e,n,r){n&&!r&&e(t),Kb(t,s=>{w5(s,e,!0,r)}),n&&r&&e(t)}function bne(t,e,n){let r=n?t:t.parent;for(;r!==null;){if(e(r))return!0;r=r.parent}return!1}function _p(t){return new qt(t.parent===null?t.name:_p(t.parent)+"/"+t.name)}function Uw(t){t.parent!==null&&vne(t.parent,t.name,t)}function vne(t,e,n){const r=yne(n),s=Ao(t.node.children,e);r&&s?(delete t.node.children[e],t.node.childCount--,Uw(t)):!r&&!s&&(t.node.children[e]=n.node,t.node.childCount++,Uw(t))}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const _ne=/[\[\].#$\/\u0000-\u001F\u007F]/,wne=/[\[\].#$\u0000-\u001F\u007F]/,m_=10*1024*1024,cS=function(t){return typeof t=="string"&&t.length!==0&&!_ne.test(t)},x5=function(t){return typeof t=="string"&&t.length!==0&&!wne.test(t)},xne=function(t){return t&&(t=t.replace(/^\/*\.info(\/|$)/,"/")),x5(t)},GP=function(t){return t===null||typeof t=="string"||typeof t=="number"&&!zE(t)||t&&typeof t=="object"&&Ao(t,".sv")},dS=function(t,e,n,r){r&&e===void 0||uS(Bb(t,"value"),e,n)},uS=function(t,e,n){const r=n instanceof qt?new zee(n,t):n;if(e===void 0)throw new Error(t+"contains undefined "+hl(r));if(typeof e=="function")throw new Error(t+"contains a function "+hl(r)+" with contents = "+e.toString());if(zE(e))throw new Error(t+"contains "+e.toString()+" "+hl(r));if(typeof e=="string"&&e.length>m_/3&&Ub(e)>m_)throw new Error(t+"contains a string greater than "+m_+" utf8 bytes "+hl(r)+" ('"+e.substring(0,50)+"...')");if(e&&typeof e=="object"){let s=!1,o=!1;if(Yr(e,(a,l)=>{if(a===".value")s=!0;else if(a!==".priority"&&a!==".sv"&&(o=!0,!cS(a)))throw new Error(t+" contains an invalid key ("+a+") "+hl(r)+`. Keys must be non-empty strings and can't contain ".", "#", "$", "/", "[", or "]"`);qee(r,a),uS(t,l,r),jee(r)}),s&&o)throw new Error(t+' contains ".value" child '+hl(r)+" in addition to actual children.")}},Cne=function(t,e,n,r){if(!(r&&n===void 0)&&!cS(n))throw new Error(Bb(t,e)+'was an invalid key = "'+n+`". Firebase keys must be non-empty strings and can't contain ".", "#", "$", "/", "[", or "]").`)},fS=function(t,e,n,r){if(!(r&&n===void 0)&&!x5(n))throw new Error(Bb(t,e)+'was an invalid path = "'+n+`". Paths must be non-empty strings and can't contain ".", "#", "$", "[", or "]"`)},Ene=function(t,e,n,r){n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),fS(t,e,n,r)},Sne=function(t,e){const n=e.path.toString();if(typeof e.repoInfo.host!="string"||e.repoInfo.host.length===0||!cS(e.repoInfo.namespace)&&e.repoInfo.host.split(":")[0]!=="localhost"||n.length!==0&&!xne(n))throw new Error(Bb(t,"url")+`must be a valid firebase URL and the path can't contain ".", "#", "$", "[", or "]".`)};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Ane{constructor(){this.eventLists_=[],this.recursionDepth_=0}}function C5(t,e){let n=null;for(let r=0;r<e.length;r++){const s=e[r],o=s.getPath();n!==null&&!UE(o,n.path)&&(t.eventLists_.push(n),n=null),n===null&&(n={events:[],path:o}),n.events.push(s)}n&&t.eventLists_.push(n)}function E5(t,e,n){C5(t,n),S5(t,r=>UE(r,e))}function Ha(t,e,n){C5(t,n),S5(t,r=>Us(r,e)||Us(e,r))}function S5(t,e){t.recursionDepth_++;let n=!0;for(let r=0;r<t.eventLists_.length;r++){const s=t.eventLists_[r];if(s){const o=s.path;e(o)?(Nne(t.eventLists_[r]),t.eventLists_[r]=null):n=!1}}n&&(t.eventLists_=[]),t.recursionDepth_--}function Nne(t){for(let e=0;e<t.events.length;e++){const n=t.events[e];if(n!==null){t.events[e]=null;const r=n.getEventRunner();Fl&&ur("event: "+n.toString()),gp(r)}}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Rne="repo_interrupt",Pne=25;class One{constructor(e,n,r,s){this.repoInfo_=e,this.forceRestClient_=n,this.authTokenProvider_=r,this.appCheckProvider_=s,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new Ane,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=Ny(),this.transactionQueueTree_=new aS,this.persistentConnection_=null,this.key=this.repoInfo_.toURLString()}toString(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host}}function Fne(t,e,n){if(t.stats_=$E(t.repoInfo_),t.forceRestClient_||cee())t.server_=new Ay(t.repoInfo_,(r,s,o,a)=>{WP(t,r,s,o,a)},t.authTokenProvider_,t.appCheckProvider_),setTimeout(()=>VP(t,!0),0);else{if(typeof n<"u"&&n!==null){if(typeof n!="object")throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{Ln(n)}catch(r){throw new Error("Invalid authOverride provided: "+r)}}t.persistentConnection_=new gi(t.repoInfo_,e,(r,s,o,a)=>{WP(t,r,s,o,a)},r=>{VP(t,r)},r=>{kne(t,r)},t.authTokenProvider_,t.appCheckProvider_,n),t.server_=t.persistentConnection_}t.authTokenProvider_.addTokenChangeListener(r=>{t.server_.refreshAuthToken(r)}),t.appCheckProvider_.addTokenChangeListener(r=>{t.server_.refreshAppCheckToken(r.token)}),t.statsReporter_=pee(t.repoInfo_,()=>new hte(t.stats_,t.server_)),t.infoData_=new lte,t.infoSyncTree_=new YP({startListening:(r,s,o,a)=>{let l=[];const c=t.infoData_.getNode(r._path);return c.isEmpty()||(l=bp(t.infoSyncTree_,r._path,c),setTimeout(()=>{a("ok")},0)),l},stopListening:()=>{}}),hS(t,"connected",!1),t.serverSyncTree_=new YP({startListening:(r,s,o,a)=>(t.server_.listen(r,o,s,(l,c)=>{const d=a(l,c);Ha(t.eventQueue_,r._path,d)}),[]),stopListening:(r,s)=>{t.server_.unlisten(r,s)}})}function Dne(t){const n=t.infoData_.getNode(new qt(".info/serverTimeOffset")).val()||0;return new Date().getTime()+n}function A5(t){return fne({timestamp:Dne(t)})}function WP(t,e,n,r,s){t.dataUpdateCount++;const o=new qt(e);n=t.interceptServerDataCallback_?t.interceptServerDataCallback_(e,n):n;let a=[];if(s)if(r){const c=_y(n,d=>Xn(d));a=ine(t.serverSyncTree_,o,c,s)}else{const c=Xn(n);a=p5(t.serverSyncTree_,o,c,s)}else if(r){const c=_y(n,d=>Xn(d));a=rne(t.serverSyncTree_,o,c)}else{const c=Xn(n);a=bp(t.serverSyncTree_,o,c)}let l=o;a.length>0&&(l=gS(t,o)),Ha(t.eventQueue_,l,a)}function VP(t,e){hS(t,"connected",e),e===!1&&Mne(t)}function kne(t,e){Yr(e,(n,r)=>{hS(t,n,r)})}function hS(t,e,n){const r=new qt("/.info/"+e),s=Xn(n);t.infoData_.updateSnapshot(r,s);const o=bp(t.infoSyncTree_,r,s);Ha(t.eventQueue_,r,o)}function Tne(t){return t.nextWriteId_++}function Ine(t,e,n){const r=ane(t.serverSyncTree_,e);return r!=null?Promise.resolve(r):t.server_.get(e).then(s=>{const o=Xn(s).withIndex(e._queryParams.getIndex());Bw(t.serverSyncTree_,e,n,!0);let a;if(e._queryParams.loadsAllData())a=bp(t.serverSyncTree_,e._path,o);else{const l=kh(t.serverSyncTree_,e);a=p5(t.serverSyncTree_,e._path,o,l)}return Ha(t.eventQueue_,e._path,a),Iy(t.serverSyncTree_,e,n,null,!0),o},s=>(pS(t,"get for query "+Ln(e)+" failed: "+s),Promise.reject(new Error(s))))}function Mne(t){pS(t,"onDisconnectEvents");const e=A5(t),n=Ny();Lw(t.onDisconnect_,At(),(s,o)=>{const a=mne(s,o,t.serverSyncTree_,e);X3(n,s,a)});let r=[];Lw(n,At(),(s,o)=>{r=r.concat(bp(t.serverSyncTree_,s,o));const a=$ne(t,s);gS(t,a)}),t.onDisconnect_=Ny(),Ha(t.eventQueue_,At(),r)}function Lne(t,e,n){let r;mt(e._path)===".info"?r=Bw(t.infoSyncTree_,e,n):r=Bw(t.serverSyncTree_,e,n),E5(t.eventQueue_,e._path,r)}function Yw(t,e,n){let r;mt(e._path)===".info"?r=Iy(t.infoSyncTree_,e,n):r=Iy(t.serverSyncTree_,e,n),E5(t.eventQueue_,e._path,r)}function zne(t){t.persistentConnection_&&t.persistentConnection_.interrupt(Rne)}function pS(t,...e){let n="";t.persistentConnection_&&(n=t.persistentConnection_.id+":"),ur(n,...e)}function N5(t,e,n){return m5(t.serverSyncTree_,e,n)||Ze.EMPTY_NODE}function mS(t,e=t.transactionQueueTree_){if(e||Zb(t,e),fu(e)){const n=P5(t,e);Ce(n.length>0,"Sending zero length transaction queue"),n.every(s=>s.status===0)&&qne(t,_p(e),n)}else _5(e)&&Kb(e,n=>{mS(t,n)})}function qne(t,e,n){const r=n.map(d=>d.currentWriteId),s=N5(t,e,r);let o=s;const a=s.hash();for(let d=0;d<n.length;d++){const u=n[d];Ce(u.status===0,"tryToSendTransactionQueue_: items in queue should all be run."),u.status=1,u.retryCount++;const f=Er(e,u.path);o=o.updateChild(f,u.currentOutputSnapshotRaw)}const l=o.val(!0),c=e;t.server_.put(c.toString(),l,d=>{pS(t,"transaction put response",{path:c.toString(),status:d});let u=[];if(d==="ok"){const f=[];for(let g=0;g<n.length;g++)n[g].status=2,u=u.concat(td(t.serverSyncTree_,n[g].currentWriteId)),n[g].onComplete&&f.push(()=>n[g].onComplete(null,!0,n[g].currentOutputSnapshotResolved)),n[g].unwatcher();Zb(t,lS(t.transactionQueueTree_,e)),mS(t,t.transactionQueueTree_),Ha(t.eventQueue_,e,u);for(let g=0;g<f.length;g++)gp(f[g])}else{if(d==="datastale")for(let f=0;f<n.length;f++)n[f].status===3?n[f].status=4:n[f].status=0;else{ts("transaction at "+c.toString()+" failed: "+d);for(let f=0;f<n.length;f++)n[f].status=4,n[f].abortReason=d}gS(t,e)}},a)}function gS(t,e){const n=R5(t,e),r=_p(n),s=P5(t,n);return jne(t,s,r),r}function jne(t,e,n){if(e.length===0)return;const r=[];let s=[];const a=e.filter(l=>l.status===0).map(l=>l.currentWriteId);for(let l=0;l<e.length;l++){const c=e[l],d=Er(n,c.path);let u=!1,f;if(Ce(d!==null,"rerunTransactionsUnderNode_: relativePath should not be null."),c.status===4)u=!0,f=c.abortReason,s=s.concat(td(t.serverSyncTree_,c.currentWriteId,!0));else if(c.status===0)if(c.retryCount>=Pne)u=!0,f="maxretry",s=s.concat(td(t.serverSyncTree_,c.currentWriteId,!0));else{const g=N5(t,c.path,a);c.currentInputSnapshot=g;const E=e[l].update(g.val());if(E!==void 0){uS("transaction failed: Data returned ",E,c.path);let S=Xn(E);typeof E=="object"&&E!=null&&Ao(E,".priority")||(S=S.updatePriority(g.getPriority()));const _=c.currentWriteId,h=A5(t),m=gne(S,g,h);c.currentOutputSnapshotRaw=S,c.currentOutputSnapshotResolved=m,c.currentWriteId=Tne(t),a.splice(a.indexOf(_),1),s=s.concat(nne(t.serverSyncTree_,c.path,m,c.currentWriteId,c.applyLocally)),s=s.concat(td(t.serverSyncTree_,_,!0))}else u=!0,f="nodata",s=s.concat(td(t.serverSyncTree_,c.currentWriteId,!0))}Ha(t.eventQueue_,n,s),s=[],u&&(e[l].status=2,function(g){setTimeout(g,Math.floor(0))}(e[l].unwatcher),e[l].onComplete&&(f==="nodata"?r.push(()=>e[l].onComplete(null,!1,e[l].currentInputSnapshot)):r.push(()=>e[l].onComplete(new Error(f),!1,null))))}Zb(t,t.transactionQueueTree_);for(let l=0;l<r.length;l++)gp(r[l]);mS(t,t.transactionQueueTree_)}function R5(t,e){let n,r=t.transactionQueueTree_;for(n=mt(e);n!==null&&fu(r)===void 0;)r=lS(r,n),e=Ht(e),n=mt(e);return r}function P5(t,e){const n=[];return O5(t,e,n),n.sort((r,s)=>r.order-s.order),n}function O5(t,e,n){const r=fu(e);if(r)for(let s=0;s<r.length;s++)n.push(r[s]);Kb(e,s=>{O5(t,s,n)})}function Zb(t,e){const n=fu(e);if(n){let r=0;for(let s=0;s<n.length;s++)n[s].status!==2&&(n[r]=n[s],r++);n.length=r,v5(e,n.length>0?n:void 0)}Kb(e,r=>{Zb(t,r)})}function $ne(t,e){const n=_p(R5(t,e)),r=lS(t.transactionQueueTree_,e);return bne(r,s=>{g_(t,s)}),g_(t,r),w5(r,s=>{g_(t,s)}),n}function g_(t,e){const n=fu(e);if(n){const r=[];let s=[],o=-1;for(let a=0;a<n.length;a++)n[a].status===3||(n[a].status===1?(Ce(o===a-1,"All SENT items should be at beginning of queue."),o=a,n[a].status=3,n[a].abortReason="set"):(Ce(n[a].status===0,"Unexpected transaction status in abort"),n[a].unwatcher(),s=s.concat(td(t.serverSyncTree_,n[a].currentWriteId,!0)),n[a].onComplete&&r.push(n[a].onComplete.bind(null,new Error("set"),!1,null))));o===-1?v5(e,void 0):n.length=o+1,Ha(t.eventQueue_,_p(e),s);for(let a=0;a<r.length;a++)gp(r[a])}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Bne(t){let e="";const n=t.split("/");for(let r=0;r<n.length;r++)if(n[r].length>0){let s=n[r];try{s=decodeURIComponent(s.replace(/\+/g," "))}catch{}e+="/"+s}return e}function Une(t){const e={};t.charAt(0)==="?"&&(t=t.substring(1));for(const n of t.split("&")){if(n.length===0)continue;const r=n.split("=");r.length===2?e[decodeURIComponent(r[0])]=decodeURIComponent(r[1]):ts(`Invalid query segment '${n}' in query '${t}'`)}return e}const KP=function(t,e){const n=Yne(t),r=n.namespace;n.domain==="firebase.com"&&Pi(n.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),(!r||r==="undefined")&&n.domain!=="localhost"&&Pi("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),n.secure||eee();const s=n.scheme==="ws"||n.scheme==="wss";return{repoInfo:new D3(n.host,n.secure,r,s,e,"",r!==n.subdomain),path:new qt(n.pathString)}},Yne=function(t){let e="",n="",r="",s="",o="",a=!0,l="https",c=443;if(typeof t=="string"){let d=t.indexOf("//");d>=0&&(l=t.substring(0,d-1),t=t.substring(d+2));let u=t.indexOf("/");u===-1&&(u=t.length);let f=t.indexOf("?");f===-1&&(f=t.length),e=t.substring(0,Math.min(u,f)),u<f&&(s=Bne(t.substring(u,f)));const g=Une(t.substring(Math.min(t.length,f)));d=e.indexOf(":"),d>=0?(a=l==="https"||l==="wss",c=parseInt(e.substring(d+1),10)):d=e.length;const E=e.slice(0,d);if(E.toLowerCase()==="localhost")n="localhost";else if(E.split(".").length<=2)n=E;else{const S=e.indexOf(".");r=e.substring(0,S).toLowerCase(),n=e.substring(S+1),o=r}"ns"in g&&(o=g.ns)}return{host:e,port:c,domain:n,subdomain:r,secure:a,scheme:l,pathString:s,namespace:o}};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class F5{constructor(e,n,r,s){this.eventType=e,this.eventRegistration=n,this.snapshot=r,this.prevName=s}getPath(){const e=this.snapshot.ref;return this.eventType==="value"?e._path:e.parent._path}getEventType(){return this.eventType}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.getPath().toString()+":"+this.eventType+":"+Ln(this.snapshot.exportVal())}}class D5{constructor(e,n,r){this.eventRegistration=e,this.error=n,this.path=r}getPath(){return this.path}getEventType(){return"cancel"}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.path.toString()+":cancel"}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class yS{constructor(e,n){this.snapshotCallback=e,this.cancelCallback=n}onValue(e,n){this.snapshotCallback.call(null,e,n)}onCancel(e){return Ce(this.hasCancelCallback,"Raising a cancel event on a listener with no cancel callback"),this.cancelCallback.call(null,e)}get hasCancelCallback(){return!!this.cancelCallback}matches(e){return this.snapshotCallback===e.snapshotCallback||this.snapshotCallback.userCallback!==void 0&&this.snapshotCallback.userCallback===e.snapshotCallback.userCallback&&this.snapshotCallback.context===e.snapshotCallback.context}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class hu{constructor(e,n,r,s){this._repo=e,this._path=n,this._queryParams=r,this._orderByCalled=s}get key(){return ut(this._path)?null:$3(this._path)}get ref(){return new No(this._repo,this._path)}get _queryIdentifier(){const e=kP(this._queryParams),n=qE(e);return n==="{}"?"default":n}get _queryObject(){return kP(this._queryParams)}isEqual(e){if(e=du(e),!(e instanceof hu))return!1;const n=this._repo===e._repo,r=UE(this._path,e._path),s=this._queryIdentifier===e._queryIdentifier;return n&&r&&s}toJSON(){return this.toString()}toString(){return this._repo.toString()+Lee(this._path)}}function Hne(t,e){if(t._orderByCalled===!0)throw new Error(e+": You can't combine multiple orderBy calls.")}function bS(t){let e=null,n=null;if(t.hasStart()&&(e=t.getIndexStartValue()),t.hasEnd()&&(n=t.getIndexEndValue()),t.getIndex()===Dl){const r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",s="Query: When ordering by key, the argument passed to startAt(), startAfter(), endAt(), endBefore(), or equalTo() must be a string.";if(t.hasStart()){if(t.getIndexStartName()!==Wl)throw new Error(r);if(typeof e!="string")throw new Error(s)}if(t.hasEnd()){if(t.getIndexEndName()!==Ra)throw new Error(r);if(typeof n!="string")throw new Error(s)}}else if(t.getIndex()===mn){if(e!=null&&!GP(e)||n!=null&&!GP(n))throw new Error("Query: When ordering by priority, the first argument passed to startAt(), startAfter() endAt(), endBefore(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(Ce(t.getIndex()instanceof GE||t.getIndex()===Z3,"unknown index type."),e!=null&&typeof e=="object"||n!=null&&typeof n=="object")throw new Error("Query: First argument passed to startAt(), startAfter(), endAt(), endBefore(), or equalTo() cannot be an object.")}function k5(t){if(t.hasStart()&&t.hasEnd()&&t.hasLimit()&&!t.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), startAfter(), endAt(), endBefore(), and limit(). Use limitToFirst() or limitToLast() instead.")}class No extends hu{constructor(e,n){super(e,n,new VE,!1)}get parent(){const e=U3(this._path);return e===null?null:new No(this._repo,e)}get root(){let e=this;for(;e.parent!==null;)e=e.parent;return e}}class Yd{constructor(e,n,r){this._node=e,this.ref=n,this._index=r}get priority(){return this._node.getPriority().val()}get key(){return this.ref.key}get size(){return this._node.numChildren()}child(e){const n=new qt(e),r=My(this.ref,e);return new Yd(this._node.getChild(n),r,mn)}exists(){return!this._node.isEmpty()}exportVal(){return this._node.val(!0)}forEach(e){return this._node.isLeafNode()?!1:!!this._node.forEachChild(this._index,(r,s)=>e(new Yd(s,My(this.ref,r),mn)))}hasChild(e){const n=new qt(e);return!this._node.getChild(n).isEmpty()}hasChildren(){return this._node.isLeafNode()?!1:!this._node.isEmpty()}toJSON(){return this.exportVal()}val(){return this._node.val()}}function si(t,e){return t=du(t),t._checkNotDeleted("ref"),e!==void 0?My(t._root,e):t._root}function My(t,e){return t=du(t),mt(t._path)===null?Ene("child","path",e,!1):fS("child","path",e,!1),new No(t._repo,zn(t._path,e))}function Gne(t){t=du(t);const e=new yS(()=>{}),n=new wp(e);return Ine(t._repo,t,n).then(r=>new Yd(r,new No(t._repo,t._path),t._queryParams.getIndex()))}class wp{constructor(e){this.callbackContext=e}respondsTo(e){return e==="value"}createEvent(e,n){const r=n._queryParams.getIndex();return new F5("value",this,new Yd(e.snapshotNode,new No(n._repo,n._path),r))}getEventRunner(e){return e.getEventType()==="cancel"?()=>this.callbackContext.onCancel(e.error):()=>this.callbackContext.onValue(e.snapshot,null)}createCancelEvent(e,n){return this.callbackContext.hasCancelCallback?new D5(this,e,n):null}matches(e){return e instanceof wp?!e.callbackContext||!this.callbackContext?!0:e.callbackContext.matches(this.callbackContext):!1}hasAnyCallback(){return this.callbackContext!==null}}class Jb{constructor(e,n){this.eventType=e,this.callbackContext=n}respondsTo(e){let n=e==="children_added"?"child_added":e;return n=n==="children_removed"?"child_removed":n,this.eventType===n}createCancelEvent(e,n){return this.callbackContext.hasCancelCallback?new D5(this,e,n):null}createEvent(e,n){Ce(e.childName!=null,"Child events should have a childName.");const r=My(new No(n._repo,n._path),e.childName),s=n._queryParams.getIndex();return new F5(e.type,this,new Yd(e.snapshotNode,r,s),e.prevName)}getEventRunner(e){return e.getEventType()==="cancel"?()=>this.callbackContext.onCancel(e.error):()=>this.callbackContext.onValue(e.snapshot,e.prevName)}matches(e){return e instanceof Jb?this.eventType===e.eventType&&(!this.callbackContext||!e.callbackContext||this.callbackContext.matches(e.callbackContext)):!1}hasAnyCallback(){return!!this.callbackContext}}function T5(t,e,n,r,s){let o;if(typeof r=="object"&&(o=void 0,s=r),typeof r=="function"&&(o=r),s&&s.onlyOnce){const c=n,d=(u,f)=>{Yw(t._repo,t,l),c(u,f)};d.userCallback=n.userCallback,d.context=n.context,n=d}const a=new yS(n,o||void 0),l=e==="value"?new wp(a):new Jb(e,a);return Lne(t._repo,t,l),()=>Yw(t._repo,t,l)}function bd(t,e,n,r){return T5(t,"value",e,n,r)}function Wne(t,e,n,r){return T5(t,"child_changed",e,n,r)}function ZP(t,e,n){let r=null;const s=n?new yS(n):null;e==="value"?r=new wp(s):e&&(r=new Jb(e,s)),Yw(t._repo,t,r)}class Xb{}class Vne extends Xb{constructor(e,n){super(),this._value=e,this._key=n}_apply(e){dS("endAt",this._value,e._path,!0);const n=ite(e._queryParams,this._value,this._key);if(k5(n),bS(n),e._queryParams.hasEnd())throw new Error("endAt: Starting point was already set (by another call to endAt, endBefore or equalTo).");return new hu(e._repo,e._path,n,e._orderByCalled)}}class Kne extends Xb{constructor(e,n){super(),this._value=e,this._key=n}_apply(e){dS("startAt",this._value,e._path,!0);const n=ote(e._queryParams,this._value,this._key);if(k5(n),bS(n),e._queryParams.hasStart())throw new Error("startAt: Starting point was already set (by another call to startAt, startBefore or equalTo).");return new hu(e._repo,e._path,n,e._orderByCalled)}}class Zne extends Xb{constructor(e){super(),this._path=e}_apply(e){Hne(e,"orderByChild");const n=new qt(this._path);if(ut(n))throw new Error("orderByChild: cannot pass in empty path. Use orderByValue() instead.");const r=new GE(n),s=ate(e._queryParams,r);return bS(s),new hu(e._repo,e._path,s,!0)}}function y_(t){if(t==="$key")throw new Error('orderByChild: "$key" is invalid. Use orderByKey() instead.');if(t==="$priority")throw new Error('orderByChild: "$priority" is invalid. Use orderByPriority() instead.');if(t==="$value")throw new Error('orderByChild: "$value" is invalid. Use orderByValue() instead.');return fS("orderByChild","path",t,!1),new Zne(t)}class Jne extends Xb{constructor(e,n){super(),this._value=e,this._key=n}_apply(e){if(dS("equalTo",this._value,e._path,!1),e._queryParams.hasStart())throw new Error("equalTo: Starting point was already set (by another call to startAt/startAfter or equalTo).");if(e._queryParams.hasEnd())throw new Error("equalTo: Ending point was already set (by another call to endAt/endBefore or equalTo).");return new Vne(this._value,this._key)._apply(new Kne(this._value,this._key)._apply(e))}}function b_(t,e){return Cne("equalTo","key",e,!0),new Jne(t,e)}function v_(t,...e){let n=du(t);for(const r of e)n=r._apply(n);return n}Vte(No);Qte(No);/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Xne="FIREBASE_DATABASE_EMULATOR_HOST",Hw={};let Qne=!1;function ere(t,e,n,r){t.repoInfo_=new D3(`${e}:${n}`,!1,t.repoInfo_.namespace,t.repoInfo_.webSocketOnly,t.repoInfo_.nodeAdmin,t.repoInfo_.persistenceKey,t.repoInfo_.includeNamespaceInQueryParams,!0),r&&(t.authTokenProvider_=r)}function tre(t,e,n,r,s){let o=r||t.options.databaseURL;o===void 0&&(t.options.projectId||Pi("Can't determine Firebase Database URL. Be sure to include a Project ID when calling firebase.initializeApp()."),ur("Using default host for project ",t.options.projectId),o=`${t.options.projectId}-default-rtdb.firebaseio.com`);let a=KP(o,s),l=a.repoInfo,c,d;typeof process<"u"&&process.env&&(d=process.env[Xne]),d?(c=!0,o=`http://${d}?ns=${l.namespace}`,a=KP(o,s),l=a.repoInfo):c=!a.repoInfo.secure;const u=s&&c?new yd(yd.OWNER):new uee(t.name,t.options,e);Sne("Invalid Firebase Database URL",a),ut(a.path)||Pi("Database URL must point to the root of a Firebase Database (not including a child path).");const f=rre(l,t,u,new dee(t.name,n));return new sre(f,t)}function nre(t,e){const n=Hw[e];(!n||n[t.key]!==t)&&Pi(`Database ${e}(${t.repoInfo_}) has already been deleted.`),zne(t),delete n[t.key]}function rre(t,e,n,r){let s=Hw[e.name];s||(s={},Hw[e.name]=s);let o=s[t.toURLString()];return o&&Pi("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),o=new One(t,Qne,n,r),s[t.toURLString()]=o,o}class sre{constructor(e,n){this._repoInternal=e,this.app=n,this.type="database",this._instanceStarted=!1}get _repo(){return this._instanceStarted||(Fne(this._repoInternal,this.app.options.appId,this.app.options.databaseAuthVariableOverride),this._instanceStarted=!0),this._repoInternal}get _root(){return this._rootInternal||(this._rootInternal=new No(this._repo,At())),this._rootInternal}_delete(){return this._rootInternal!==null&&(nre(this._repo,this.app.name),this._repoInternal=null,this._rootInternal=null),Promise.resolve()}_checkNotDeleted(e){this._rootInternal===null&&Pi("Cannot call "+e+" on a deleted database.")}}function I5(t=qQ(),e){const n=IQ(t,"database").getImmediate({identifier:e});if(!n._instanceStarted){const r=NX("database");r&&ore(n,...r)}return n}function ore(t,e,n,r={}){t=du(t),t._checkNotDeleted("useEmulator"),t._instanceStarted&&Pi("Cannot call useEmulator() after instance has already been initialized.");const s=t._repoInternal;let o;if(s.repoInfo_.nodeAdmin)r.mockUserToken&&Pi('mockUserToken is not supported by the Admin SDK. For client access with mock users, please use the "firebase" package instead of "firebase-admin".'),o=new yd(yd.OWNER);else if(r.mockUserToken){const a=typeof r.mockUserToken=="string"?r.mockUserToken:RX(r.mockUserToken,t.app.options.projectId);o=new yd(a)}ere(s,e,n,o)}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function ire(t){KQ(zQ),xy(new Sh("database",(e,{instanceIdentifier:n})=>{const r=e.getProvider("app").getImmediate(),s=e.getProvider("auth-internal"),o=e.getProvider("app-check-internal");return tre(r,s,o,n)},"PUBLIC").setMultipleInstances(!0)),md(gP,yP,t),md(gP,yP,"esm2017")}gi.prototype.simpleListen=function(t,e){this.sendRequest("q",{p:t},e)};gi.prototype.echo=function(t,e){this.sendRequest("echo",{d:t},e)};ire();const are="/assets/GifNahuel-30bb5e69.png";//! moment.js //! version : 2.29.4 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com var M5;function Re(){return M5.apply(null,arguments)}function lre(t){M5=t}function Qs(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function kl(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function Nt(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function vS(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;var e;for(e in t)if(Nt(t,e))return!1;return!0}function kr(t){return t===void 0}function Oi(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function xp(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function L5(t,e){var n=[],r,s=t.length;for(r=0;r<s;++r)n.push(e(t[r],r));return n}function oa(t,e){for(var n in e)Nt(e,n)&&(t[n]=e[n]);return Nt(e,"toString")&&(t.toString=e.toString),Nt(e,"valueOf")&&(t.valueOf=e.valueOf),t}function Ro(t,e,n,r){return az(t,e,n,r,!0).utc()}function cre(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function at(t){return t._pf==null&&(t._pf=cre()),t._pf}var Gw;Array.prototype.some?Gw=Array.prototype.some:Gw=function(t){var e=Object(this),n=e.length>>>0,r;for(r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};function _S(t){if(t._isValid==null){var e=at(t),n=Gw.call(e.parsedDateParts,function(s){return s!=null}),r=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(r=r&&e.charsLeftOver===0&&e.unusedTokens.length===0&&e.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(t))t._isValid=r;else return r}return t._isValid}function Qb(t){var e=Ro(NaN);return t!=null?oa(at(e),t):at(e).userInvalidated=!0,e}var JP=Re.momentProperties=[],__=!1;function wS(t,e){var n,r,s,o=JP.length;if(kr(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),kr(e._i)||(t._i=e._i),kr(e._f)||(t._f=e._f),kr(e._l)||(t._l=e._l),kr(e._strict)||(t._strict=e._strict),kr(e._tzm)||(t._tzm=e._tzm),kr(e._isUTC)||(t._isUTC=e._isUTC),kr(e._offset)||(t._offset=e._offset),kr(e._pf)||(t._pf=at(e)),kr(e._locale)||(t._locale=e._locale),o>0)for(n=0;n<o;n++)r=JP[n],s=e[r],kr(s)||(t[r]=s);return t}function Cp(t){wS(this,t),this._d=new Date(t._d!=null?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),__===!1&&(__=!0,Re.updateOffset(this),__=!1)}function eo(t){return t instanceof Cp||t!=null&&t._isAMomentObject!=null}function z5(t){Re.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+t)}function Rs(t,e){var n=!0;return oa(function(){if(Re.deprecationHandler!=null&&Re.deprecationHandler(null,t),n){var r=[],s,o,a,l=arguments.length;for(o=0;o<l;o++){if(s="",typeof arguments[o]=="object"){s+=` [`+o+"] ";for(a in arguments[0])Nt(arguments[0],a)&&(s+=a+": "+arguments[0][a]+", ");s=s.slice(0,-2)}else s=arguments[o];r.push(s)}z5(t+` Arguments: `+Array.prototype.slice.call(r).join("")+` `+new Error().stack),n=!1}return e.apply(this,arguments)},e)}var XP={};function q5(t,e){Re.deprecationHandler!=null&&Re.deprecationHandler(t,e),XP[t]||(z5(e),XP[t]=!0)}Re.suppressDeprecationWarnings=!1;Re.deprecationHandler=null;function Po(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function dre(t){var e,n;for(n in t)Nt(t,n)&&(e=t[n],Po(e)?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Ww(t,e){var n=oa({},t),r;for(r in e)Nt(e,r)&&(kl(t[r])&&kl(e[r])?(n[r]={},oa(n[r],t[r]),oa(n[r],e[r])):e[r]!=null?n[r]=e[r]:delete n[r]);for(r in t)Nt(t,r)&&!Nt(e,r)&&kl(t[r])&&(n[r]=oa({},n[r]));return n}function xS(t){t!=null&&this.set(t)}var Vw;Object.keys?Vw=Object.keys:Vw=function(t){var e,n=[];for(e in t)Nt(t,e)&&n.push(e);return n};var ure={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function fre(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return Po(r)?r.call(e,n):r}function xo(t,e,n){var r=""+Math.abs(t),s=e-r.length,o=t>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var CS=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Pm=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,w_={},vd={};function $e(t,e,n,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),t&&(vd[t]=s),e&&(vd[e[0]]=function(){return xo(s.apply(this,arguments),e[1],e[2])}),n&&(vd[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),t)})}function hre(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function pre(t){var e=t.match(CS),n,r;for(n=0,r=e.length;n<r;n++)vd[e[n]]?e[n]=vd[e[n]]:e[n]=hre(e[n]);return function(s){var o="",a;for(a=0;a<r;a++)o+=Po(e[a])?e[a].call(s,t):e[a];return o}}function _g(t,e){return t.isValid()?(e=j5(e,t.localeData()),w_[e]=w_[e]||pre(e),w_[e](t)):t.localeData().invalidDate()}function j5(t,e){var n=5;function r(s){return e.longDateFormat(s)||s}for(Pm.lastIndex=0;n>=0&&Pm.test(t);)t=t.replace(Pm,r),Pm.lastIndex=0,n-=1;return t}var mre={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function gre(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(CS).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[t])}var yre="Invalid date";function bre(){return this._invalidDate}var vre="%d",_re=/\d{1,2}/;function wre(t){return this._ordinal.replace("%d",t)}var xre={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Cre(t,e,n,r){var s=this._relativeTime[n];return Po(s)?s(t,e,n,r):s.replace(/%d/i,t)}function Ere(t,e){var n=this._relativeTime[t>0?"future":"past"];return Po(n)?n(e):n.replace(/%s/i,e)}var jf={};function gr(t,e){var n=t.toLowerCase();jf[n]=jf[n+"s"]=jf[e]=t}function Ps(t){return typeof t=="string"?jf[t]||jf[t.toLowerCase()]:void 0}function ES(t){var e={},n,r;for(r in t)Nt(t,r)&&(n=Ps(r),n&&(e[n]=t[r]));return e}var $5={};function yr(t,e){$5[t]=e}function Sre(t){var e=[],n;for(n in t)Nt(t,n)&&e.push({unit:n,priority:$5[n]});return e.sort(function(r,s){return r.priority-s.priority}),e}function ev(t){return t%4===0&&t%100!==0||t%400===0}function ms(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function ht(t){var e=+t,n=0;return e!==0&&isFinite(e)&&(n=ms(e)),n}function pu(t,e){return function(n){return n!=null?(B5(this,t,n),Re.updateOffset(this,e),this):Ly(this,t)}}function Ly(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function B5(t,e,n){t.isValid()&&!isNaN(n)&&(e==="FullYear"&&ev(t.year())&&t.month()===1&&t.date()===29?(n=ht(n),t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),iv(n,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function Are(t){return t=Ps(t),Po(this[t])?this[t]():this}function Nre(t,e){if(typeof t=="object"){t=ES(t);var n=Sre(t),r,s=n.length;for(r=0;r<s;r++)this[n[r].unit](t[n[r].unit])}else if(t=Ps(t),Po(this[t]))return this[t](e);return this}var U5=/\d/,as=/\d\d/,Y5=/\d{3}/,SS=/\d{4}/,tv=/[+-]?\d{6}/,cn=/\d\d?/,H5=/\d\d\d\d?/,G5=/\d\d\d\d\d\d?/,nv=/\d{1,3}/,AS=/\d{1,4}/,rv=/[+-]?\d{1,6}/,mu=/\d+/,sv=/[+-]?\d+/,Rre=/Z|[+-]\d\d:?\d\d/gi,ov=/Z|[+-]\d\d(?::?\d\d)?/gi,Pre=/[+-]?\d+(\.\d{1,3})?/,Ep=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,zy;zy={};function ke(t,e,n){zy[t]=Po(e)?e:function(r,s){return r&&n?n:e}}function Ore(t,e){return Nt(zy,t)?zy[t](e._strict,e._locale):new RegExp(Fre(t))}function Fre(t){return Xr(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,n,r,s,o){return n||r||s||o}))}function Xr(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var Kw={};function $t(t,e){var n,r=e,s;for(typeof t=="string"&&(t=[t]),Oi(e)&&(r=function(o,a){a[e]=ht(o)}),s=t.length,n=0;n<s;n++)Kw[t[n]]=r}function Sp(t,e){$t(t,function(n,r,s,o){s._w=s._w||{},e(n,s._w,s,o)})}function Dre(t,e,n){e!=null&&Nt(Kw,t)&&Kw[t](e,n._a,n,t)}var pr=0,oi=1,po=2,jn=3,Hs=4,ii=5,Cl=6,kre=7,Tre=8;function Ire(t,e){return(t%e+e)%e}var Nn;Array.prototype.indexOf?Nn=Array.prototype.indexOf:Nn=function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};function iv(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=Ire(e,12);return t+=(e-n)/12,n===1?ev(t)?29:28:31-n%7%2}$e("M",["MM",2],"Mo",function(){return this.month()+1});$e("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)});$e("MMMM",0,0,function(t){return this.localeData().months(this,t)});gr("month","M");yr("month",8);ke("M",cn);ke("MM",cn,as);ke("MMM",function(t,e){return e.monthsShortRegex(t)});ke("MMMM",function(t,e){return e.monthsRegex(t)});$t(["M","MM"],function(t,e){e[oi]=ht(t)-1});$t(["MMM","MMMM"],function(t,e,n,r){var s=n._locale.monthsParse(t,r,n._strict);s!=null?e[oi]=s:at(n).invalidMonth=t});var Mre="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),W5="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),V5=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Lre=Ep,zre=Ep;function qre(t,e){return t?Qs(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||V5).test(e)?"format":"standalone"][t.month()]:Qs(this._months)?this._months:this._months.standalone}function jre(t,e){return t?Qs(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[V5.test(e)?"format":"standalone"][t.month()]:Qs(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function $re(t,e,n){var r,s,o,a=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=Ro([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?e==="MMM"?(s=Nn.call(this._shortMonthsParse,a),s!==-1?s:null):(s=Nn.call(this._longMonthsParse,a),s!==-1?s:null):e==="MMM"?(s=Nn.call(this._shortMonthsParse,a),s!==-1?s:(s=Nn.call(this._longMonthsParse,a),s!==-1?s:null)):(s=Nn.call(this._longMonthsParse,a),s!==-1?s:(s=Nn.call(this._shortMonthsParse,a),s!==-1?s:null))}function Bre(t,e,n){var r,s,o;if(this._monthsParseExact)return $re.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(s=Ro([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(o="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&e==="MMMM"&&this._longMonthsParse[r].test(t))return r;if(n&&e==="MMM"&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function K5(t,e){var n;if(!t.isValid())return t;if(typeof e=="string"){if(/^\d+$/.test(e))e=ht(e);else if(e=t.localeData().monthsParse(e),!Oi(e))return t}return n=Math.min(t.date(),iv(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function Z5(t){return t!=null?(K5(this,t),Re.updateOffset(this,!0),this):Ly(this,"Month")}function Ure(){return iv(this.year(),this.month())}function Yre(t){return this._monthsParseExact?(Nt(this,"_monthsRegex")||J5.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(Nt(this,"_monthsShortRegex")||(this._monthsShortRegex=Lre),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function Hre(t){return this._monthsParseExact?(Nt(this,"_monthsRegex")||J5.call(this),t?this._monthsStrictRegex:this._monthsRegex):(Nt(this,"_monthsRegex")||(this._monthsRegex=zre),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function J5(){function t(a,l){return l.length-a.length}var e=[],n=[],r=[],s,o;for(s=0;s<12;s++)o=Ro([2e3,s]),e.push(this.monthsShort(o,"")),n.push(this.months(o,"")),r.push(this.months(o,"")),r.push(this.monthsShort(o,""));for(e.sort(t),n.sort(t),r.sort(t),s=0;s<12;s++)e[s]=Xr(e[s]),n[s]=Xr(n[s]);for(s=0;s<24;s++)r[s]=Xr(r[s]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}$e("Y",0,0,function(){var t=this.year();return t<=9999?xo(t,4):"+"+t});$e(0,["YY",2],0,function(){return this.year()%100});$e(0,["YYYY",4],0,"year");$e(0,["YYYYY",5],0,"year");$e(0,["YYYYYY",6,!0],0,"year");gr("year","y");yr("year",1);ke("Y",sv);ke("YY",cn,as);ke("YYYY",AS,SS);ke("YYYYY",rv,tv);ke("YYYYYY",rv,tv);$t(["YYYYY","YYYYYY"],pr);$t("YYYY",function(t,e){e[pr]=t.length===2?Re.parseTwoDigitYear(t):ht(t)});$t("YY",function(t,e){e[pr]=Re.parseTwoDigitYear(t)});$t("Y",function(t,e){e[pr]=parseInt(t,10)});function $f(t){return ev(t)?366:365}Re.parseTwoDigitYear=function(t){return ht(t)+(ht(t)>68?1900:2e3)};var X5=pu("FullYear",!0);function Gre(){return ev(this.year())}function Wre(t,e,n,r,s,o,a){var l;return t<100&&t>=0?(l=new Date(t+400,e,n,r,s,o,a),isFinite(l.getFullYear())&&l.setFullYear(t)):l=new Date(t,e,n,r,s,o,a),l}function Th(t){var e,n;return t<100&&t>=0?(n=Array.prototype.slice.call(arguments),n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function qy(t,e,n){var r=7+e-n,s=(7+Th(t,0,r).getUTCDay()-e)%7;return-s+r-1}function Q5(t,e,n,r,s){var o=(7+n-r)%7,a=qy(t,r,s),l=1+7*(e-1)+o+a,c,d;return l<=0?(c=t-1,d=$f(c)+l):l>$f(t)?(c=t+1,d=l-$f(t)):(c=t,d=l),{year:c,dayOfYear:d}}function Ih(t,e,n){var r=qy(t.year(),e,n),s=Math.floor((t.dayOfYear()-r-1)/7)+1,o,a;return s<1?(a=t.year()-1,o=s+yi(a,e,n)):s>yi(t.year(),e,n)?(o=s-yi(t.year(),e,n),a=t.year()+1):(a=t.year(),o=s),{week:o,year:a}}function yi(t,e,n){var r=qy(t,e,n),s=qy(t+1,e,n);return($f(t)-r+s)/7}$e("w",["ww",2],"wo","week");$e("W",["WW",2],"Wo","isoWeek");gr("week","w");gr("isoWeek","W");yr("week",5);yr("isoWeek",5);ke("w",cn);ke("ww",cn,as);ke("W",cn);ke("WW",cn,as);Sp(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=ht(t)});function Vre(t){return Ih(t,this._week.dow,this._week.doy).week}var Kre={dow:0,doy:6};function Zre(){return this._week.dow}function Jre(){return this._week.doy}function Xre(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function Qre(t){var e=Ih(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}$e("d",0,"do","day");$e("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)});$e("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)});$e("dddd",0,0,function(t){return this.localeData().weekdays(this,t)});$e("e",0,0,"weekday");$e("E",0,0,"isoWeekday");gr("day","d");gr("weekday","e");gr("isoWeekday","E");yr("day",11);yr("weekday",11);yr("isoWeekday",11);ke("d",cn);ke("e",cn);ke("E",cn);ke("dd",function(t,e){return e.weekdaysMinRegex(t)});ke("ddd",function(t,e){return e.weekdaysShortRegex(t)});ke("dddd",function(t,e){return e.weekdaysRegex(t)});Sp(["dd","ddd","dddd"],function(t,e,n,r){var s=n._locale.weekdaysParse(t,r,n._strict);s!=null?e.d=s:at(n).invalidWeekday=t});Sp(["d","e","E"],function(t,e,n,r){e[r]=ht(t)});function ese(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function tse(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function NS(t,e){return t.slice(e,7).concat(t.slice(0,e))}var nse="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ez="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),rse="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),sse=Ep,ose=Ep,ise=Ep;function ase(t,e){var n=Qs(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?NS(n,this._week.dow):t?n[t.day()]:n}function lse(t){return t===!0?NS(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function cse(t){return t===!0?NS(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function dse(t,e,n){var r,s,o,a=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=Ro([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?e==="dddd"?(s=Nn.call(this._weekdaysParse,a),s!==-1?s:null):e==="ddd"?(s=Nn.call(this._shortWeekdaysParse,a),s!==-1?s:null):(s=Nn.call(this._minWeekdaysParse,a),s!==-1?s:null):e==="dddd"?(s=Nn.call(this._weekdaysParse,a),s!==-1||(s=Nn.call(this._shortWeekdaysParse,a),s!==-1)?s:(s=Nn.call(this._minWeekdaysParse,a),s!==-1?s:null)):e==="ddd"?(s=Nn.call(this._shortWeekdaysParse,a),s!==-1||(s=Nn.call(this._weekdaysParse,a),s!==-1)?s:(s=Nn.call(this._minWeekdaysParse,a),s!==-1?s:null)):(s=Nn.call(this._minWeekdaysParse,a),s!==-1||(s=Nn.call(this._weekdaysParse,a),s!==-1)?s:(s=Nn.call(this._shortWeekdaysParse,a),s!==-1?s:null))}function use(t,e,n){var r,s,o;if(this._weekdaysParseExact)return dse.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=Ro([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&e==="dddd"&&this._fullWeekdaysParse[r].test(t))return r;if(n&&e==="ddd"&&this._shortWeekdaysParse[r].test(t))return r;if(n&&e==="dd"&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function fse(t){if(!this.isValid())return t!=null?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return t!=null?(t=ese(t,this.localeData()),this.add(t-e,"d")):e}function hse(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function pse(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=tse(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function mse(t){return this._weekdaysParseExact?(Nt(this,"_weekdaysRegex")||RS.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(Nt(this,"_weekdaysRegex")||(this._weekdaysRegex=sse),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function gse(t){return this._weekdaysParseExact?(Nt(this,"_weekdaysRegex")||RS.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Nt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ose),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function yse(t){return this._weekdaysParseExact?(Nt(this,"_weekdaysRegex")||RS.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Nt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ise),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function RS(){function t(u,f){return f.length-u.length}var e=[],n=[],r=[],s=[],o,a,l,c,d;for(o=0;o<7;o++)a=Ro([2e3,1]).day(o),l=Xr(this.weekdaysMin(a,"")),c=Xr(this.weekdaysShort(a,"")),d=Xr(this.weekdays(a,"")),e.push(l),n.push(c),r.push(d),s.push(l),s.push(c),s.push(d);e.sort(t),n.sort(t),r.sort(t),s.sort(t),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function PS(){return this.hours()%12||12}function bse(){return this.hours()||24}$e("H",["HH",2],0,"hour");$e("h",["hh",2],0,PS);$e("k",["kk",2],0,bse);$e("hmm",0,0,function(){return""+PS.apply(this)+xo(this.minutes(),2)});$e("hmmss",0,0,function(){return""+PS.apply(this)+xo(this.minutes(),2)+xo(this.seconds(),2)});$e("Hmm",0,0,function(){return""+this.hours()+xo(this.minutes(),2)});$e("Hmmss",0,0,function(){return""+this.hours()+xo(this.minutes(),2)+xo(this.seconds(),2)});function tz(t,e){$e(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}tz("a",!0);tz("A",!1);gr("hour","h");yr("hour",13);function nz(t,e){return e._meridiemParse}ke("a",nz);ke("A",nz);ke("H",cn);ke("h",cn);ke("k",cn);ke("HH",cn,as);ke("hh",cn,as);ke("kk",cn,as);ke("hmm",H5);ke("hmmss",G5);ke("Hmm",H5);ke("Hmmss",G5);$t(["H","HH"],jn);$t(["k","kk"],function(t,e,n){var r=ht(t);e[jn]=r===24?0:r});$t(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t});$t(["h","hh"],function(t,e,n){e[jn]=ht(t),at(n).bigHour=!0});$t("hmm",function(t,e,n){var r=t.length-2;e[jn]=ht(t.substr(0,r)),e[Hs]=ht(t.substr(r)),at(n).bigHour=!0});$t("hmmss",function(t,e,n){var r=t.length-4,s=t.length-2;e[jn]=ht(t.substr(0,r)),e[Hs]=ht(t.substr(r,2)),e[ii]=ht(t.substr(s)),at(n).bigHour=!0});$t("Hmm",function(t,e,n){var r=t.length-2;e[jn]=ht(t.substr(0,r)),e[Hs]=ht(t.substr(r))});$t("Hmmss",function(t,e,n){var r=t.length-4,s=t.length-2;e[jn]=ht(t.substr(0,r)),e[Hs]=ht(t.substr(r,2)),e[ii]=ht(t.substr(s))});function vse(t){return(t+"").toLowerCase().charAt(0)==="p"}var _se=/[ap]\.?m?\.?/i,wse=pu("Hours",!0);function xse(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var rz={calendar:ure,longDateFormat:mre,invalidDate:yre,ordinal:vre,dayOfMonthOrdinalParse:_re,relativeTime:xre,months:Mre,monthsShort:W5,week:Kre,weekdays:nse,weekdaysMin:rse,weekdaysShort:ez,meridiemParse:_se},fn={},Vu={},Mh;function Cse(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function QP(t){return t&&t.toLowerCase().replace("_","-")}function Ese(t){for(var e=0,n,r,s,o;e<t.length;){for(o=QP(t[e]).split("-"),n=o.length,r=QP(t[e+1]),r=r?r.split("-"):null;n>0;){if(s=av(o.slice(0,n).join("-")),s)return s;if(r&&r.length>=n&&Cse(o,r)>=n-1)break;n--}e++}return Mh}function Sse(t){return t.match("^[^/\\\\]*$")!=null}function av(t){var e=null,n;if(fn[t]===void 0&&typeof Mg<"u"&&Mg&&Mg.exports&&Sse(t))try{e=Mh._abbr,n=require,n("./locale/"+t),Ea(e)}catch{fn[t]=null}return fn[t]}function Ea(t,e){var n;return t&&(kr(e)?n=Mi(t):n=OS(t,e),n?Mh=n:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Mh._abbr}function OS(t,e){if(e!==null){var n,r=rz;if(e.abbr=t,fn[t]!=null)q5("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=fn[t]._config;else if(e.parentLocale!=null)if(fn[e.parentLocale]!=null)r=fn[e.parentLocale]._config;else if(n=av(e.parentLocale),n!=null)r=n._config;else return Vu[e.parentLocale]||(Vu[e.parentLocale]=[]),Vu[e.parentLocale].push({name:t,config:e}),null;return fn[t]=new xS(Ww(r,e)),Vu[t]&&Vu[t].forEach(function(s){OS(s.name,s.config)}),Ea(t),fn[t]}else return delete fn[t],null}function Ase(t,e){if(e!=null){var n,r,s=rz;fn[t]!=null&&fn[t].parentLocale!=null?fn[t].set(Ww(fn[t]._config,e)):(r=av(t),r!=null&&(s=r._config),e=Ww(s,e),r==null&&(e.abbr=t),n=new xS(e),n.parentLocale=fn[t],fn[t]=n),Ea(t)}else fn[t]!=null&&(fn[t].parentLocale!=null?(fn[t]=fn[t].parentLocale,t===Ea()&&Ea(t)):fn[t]!=null&&delete fn[t]);return fn[t]}function Mi(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Mh;if(!Qs(t)){if(e=av(t),e)return e;t=[t]}return Ese(t)}function Nse(){return Vw(fn)}function FS(t){var e,n=t._a;return n&&at(t).overflow===-2&&(e=n[oi]<0||n[oi]>11?oi:n[po]<1||n[po]>iv(n[pr],n[oi])?po:n[jn]<0||n[jn]>24||n[jn]===24&&(n[Hs]!==0||n[ii]!==0||n[Cl]!==0)?jn:n[Hs]<0||n[Hs]>59?Hs:n[ii]<0||n[ii]>59?ii:n[Cl]<0||n[Cl]>999?Cl:-1,at(t)._overflowDayOfYear&&(e<pr||e>po)&&(e=po),at(t)._overflowWeeks&&e===-1&&(e=kre),at(t)._overflowWeekday&&e===-1&&(e=Tre),at(t).overflow=e),t}var Rse=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Pse=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ose=/Z|[+-]\d\d(?::?\d\d)?/,Om=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],x_=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Fse=/^\/?Date\((-?\d+)/i,Dse=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,kse={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function sz(t){var e,n,r=t._i,s=Rse.exec(r)||Pse.exec(r),o,a,l,c,d=Om.length,u=x_.length;if(s){for(at(t).iso=!0,e=0,n=d;e<n;e++)if(Om[e][1].exec(s[1])){a=Om[e][0],o=Om[e][2]!==!1;break}if(a==null){t._isValid=!1;return}if(s[3]){for(e=0,n=u;e<n;e++)if(x_[e][1].exec(s[3])){l=(s[2]||" ")+x_[e][0];break}if(l==null){t._isValid=!1;return}}if(!o&&l!=null){t._isValid=!1;return}if(s[4])if(Ose.exec(s[4]))c="Z";else{t._isValid=!1;return}t._f=a+(l||"")+(c||""),kS(t)}else t._isValid=!1}function Tse(t,e,n,r,s,o){var a=[Ise(t),W5.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(s,10)];return o&&a.push(parseInt(o,10)),a}function Ise(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function Mse(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Lse(t,e,n){if(t){var r=ez.indexOf(t),s=new Date(e[0],e[1],e[2]).getDay();if(r!==s)return at(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function zse(t,e,n){if(t)return kse[t];if(e)return 0;var r=parseInt(n,10),s=r%100,o=(r-s)/100;return o*60+s}function oz(t){var e=Dse.exec(Mse(t._i)),n;if(e){if(n=Tse(e[4],e[3],e[2],e[5],e[6],e[7]),!Lse(e[1],n,t))return;t._a=n,t._tzm=zse(e[8],e[9],e[10]),t._d=Th.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),at(t).rfc2822=!0}else t._isValid=!1}function qse(t){var e=Fse.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}if(sz(t),t._isValid===!1)delete t._isValid;else return;if(oz(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:Re.createFromInputFallback(t)}Re.createFromInputFallback=Rs("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function Lc(t,e,n){return t??e??n}function jse(t){var e=new Date(Re.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function DS(t){var e,n,r=[],s,o,a;if(!t._d){for(s=jse(t),t._w&&t._a[po]==null&&t._a[oi]==null&&$se(t),t._dayOfYear!=null&&(a=Lc(t._a[pr],s[pr]),(t._dayOfYear>$f(a)||t._dayOfYear===0)&&(at(t)._overflowDayOfYear=!0),n=Th(a,0,t._dayOfYear),t._a[oi]=n.getUTCMonth(),t._a[po]=n.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=r[e]=s[e];for(;e<7;e++)t._a[e]=r[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[jn]===24&&t._a[Hs]===0&&t._a[ii]===0&&t._a[Cl]===0&&(t._nextDay=!0,t._a[jn]=0),t._d=(t._useUTC?Th:Wre).apply(null,r),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[jn]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==o&&(at(t).weekdayMismatch=!0)}}function $se(t){var e,n,r,s,o,a,l,c,d;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(o=1,a=4,n=Lc(e.GG,t._a[pr],Ih(ln(),1,4).year),r=Lc(e.W,1),s=Lc(e.E,1),(s<1||s>7)&&(c=!0)):(o=t._locale._week.dow,a=t._locale._week.doy,d=Ih(ln(),o,a),n=Lc(e.gg,t._a[pr],d.year),r=Lc(e.w,d.week),e.d!=null?(s=e.d,(s<0||s>6)&&(c=!0)):e.e!=null?(s=e.e+o,(e.e<0||e.e>6)&&(c=!0)):s=o),r<1||r>yi(n,o,a)?at(t)._overflowWeeks=!0:c!=null?at(t)._overflowWeekday=!0:(l=Q5(n,r,s,o,a),t._a[pr]=l.year,t._dayOfYear=l.dayOfYear)}Re.ISO_8601=function(){};Re.RFC_2822=function(){};function kS(t){if(t._f===Re.ISO_8601){sz(t);return}if(t._f===Re.RFC_2822){oz(t);return}t._a=[],at(t).empty=!0;var e=""+t._i,n,r,s,o,a,l=e.length,c=0,d,u;for(s=j5(t._f,t._locale).match(CS)||[],u=s.length,n=0;n<u;n++)o=s[n],r=(e.match(Ore(o,t))||[])[0],r&&(a=e.substr(0,e.indexOf(r)),a.length>0&&at(t).unusedInput.push(a),e=e.slice(e.indexOf(r)+r.length),c+=r.length),vd[o]?(r?at(t).empty=!1:at(t).unusedTokens.push(o),Dre(o,r,t)):t._strict&&!r&&at(t).unusedTokens.push(o);at(t).charsLeftOver=l-c,e.length>0&&at(t).unusedInput.push(e),t._a[jn]<=12&&at(t).bigHour===!0&&t._a[jn]>0&&(at(t).bigHour=void 0),at(t).parsedDateParts=t._a.slice(0),at(t).meridiem=t._meridiem,t._a[jn]=Bse(t._locale,t._a[jn],t._meridiem),d=at(t).era,d!==null&&(t._a[pr]=t._locale.erasConvertYear(d,t._a[pr])),DS(t),FS(t)}function Bse(t,e,n){var r;return n==null?e:t.meridiemHour!=null?t.meridiemHour(e,n):(t.isPM!=null&&(r=t.isPM(n),r&&e<12&&(e+=12),!r&&e===12&&(e=0)),e)}function Use(t){var e,n,r,s,o,a,l=!1,c=t._f.length;if(c===0){at(t).invalidFormat=!0,t._d=new Date(NaN);return}for(s=0;s<c;s++)o=0,a=!1,e=wS({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[s],kS(e),_S(e)&&(a=!0),o+=at(e).charsLeftOver,o+=at(e).unusedTokens.length*10,at(e).score=o,l?o<r&&(r=o,n=e):(r==null||o<r||a)&&(r=o,n=e,a&&(l=!0));oa(t,n||e)}function Yse(t){if(!t._d){var e=ES(t._i),n=e.day===void 0?e.date:e.day;t._a=L5([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(r){return r&&parseInt(r,10)}),DS(t)}}function Hse(t){var e=new Cp(FS(iz(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function iz(t){var e=t._i,n=t._f;return t._locale=t._locale||Mi(t._l),e===null||n===void 0&&e===""?Qb({nullInput:!0}):(typeof e=="string"&&(t._i=e=t._locale.preparse(e)),eo(e)?new Cp(FS(e)):(xp(e)?t._d=e:Qs(n)?Use(t):n?kS(t):Gse(t),_S(t)||(t._d=null),t))}function Gse(t){var e=t._i;kr(e)?t._d=new Date(Re.now()):xp(e)?t._d=new Date(e.valueOf()):typeof e=="string"?qse(t):Qs(e)?(t._a=L5(e.slice(0),function(n){return parseInt(n,10)}),DS(t)):kl(e)?Yse(t):Oi(e)?t._d=new Date(e):Re.createFromInputFallback(t)}function az(t,e,n,r,s){var o={};return(e===!0||e===!1)&&(r=e,e=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(kl(t)&&vS(t)||Qs(t)&&t.length===0)&&(t=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=s,o._l=n,o._i=t,o._f=e,o._strict=r,Hse(o)}function ln(t,e,n,r){return az(t,e,n,r,!1)}var Wse=Rs("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=ln.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:Qb()}),Vse=Rs("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=ln.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:Qb()});function lz(t,e){var n,r;if(e.length===1&&Qs(e[0])&&(e=e[0]),!e.length)return ln();for(n=e[0],r=1;r<e.length;++r)(!e[r].isValid()||e[r][t](n))&&(n=e[r]);return n}function Kse(){var t=[].slice.call(arguments,0);return lz("isBefore",t)}function Zse(){var t=[].slice.call(arguments,0);return lz("isAfter",t)}var Jse=function(){return Date.now?Date.now():+new Date},Ku=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Xse(t){var e,n=!1,r,s=Ku.length;for(e in t)if(Nt(t,e)&&!(Nn.call(Ku,e)!==-1&&(t[e]==null||!isNaN(t[e]))))return!1;for(r=0;r<s;++r)if(t[Ku[r]]){if(n)return!1;parseFloat(t[Ku[r]])!==ht(t[Ku[r]])&&(n=!0)}return!0}function Qse(){return this._isValid}function eoe(){return no(NaN)}function lv(t){var e=ES(t),n=e.year||0,r=e.quarter||0,s=e.month||0,o=e.week||e.isoWeek||0,a=e.day||0,l=e.hour||0,c=e.minute||0,d=e.second||0,u=e.millisecond||0;this._isValid=Xse(e),this._milliseconds=+u+d*1e3+c*6e4+l*1e3*60*60,this._days=+a+o*7,this._months=+s+r*3+n*12,this._data={},this._locale=Mi(),this._bubble()}function wg(t){return t instanceof lv}function Zw(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function toe(t,e,n){var r=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),o=0,a;for(a=0;a<r;a++)(n&&t[a]!==e[a]||!n&&ht(t[a])!==ht(e[a]))&&o++;return o+s}function cz(t,e){$e(t,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+xo(~~(n/60),2)+e+xo(~~n%60,2)})}cz("Z",":");cz("ZZ","");ke("Z",ov);ke("ZZ",ov);$t(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=TS(ov,t)});var noe=/([\+\-]|\d\d)/gi;function TS(t,e){var n=(e||"").match(t),r,s,o;return n===null?null:(r=n[n.length-1]||[],s=(r+"").match(noe)||["-",0,0],o=+(s[1]*60)+ht(s[2]),o===0?0:s[0]==="+"?o:-o)}function IS(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(eo(t)||xp(t)?t.valueOf():ln(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),Re.updateOffset(n,!1),n):ln(t).local()}function Jw(t){return-Math.round(t._d.getTimezoneOffset())}Re.updateOffset=function(){};function roe(t,e,n){var r=this._offset||0,s;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=TS(ov,t),t===null)return this}else Math.abs(t)<16&&!n&&(t=t*60);return!this._isUTC&&e&&(s=Jw(this)),this._offset=t,this._isUTC=!0,s!=null&&this.add(s,"m"),r!==t&&(!e||this._changeInProgress?fz(this,no(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Re.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:Jw(this)}function soe(t,e){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function ooe(t){return this.utcOffset(0,t)}function ioe(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Jw(this),"m")),this}function aoe(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=TS(Rre,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function loe(t){return this.isValid()?(t=t?ln(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function coe(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function doe(){if(!kr(this._isDSTShifted))return this._isDSTShifted;var t={},e;return wS(t,this),t=iz(t),t._a?(e=t._isUTC?Ro(t._a):ln(t._a),this._isDSTShifted=this.isValid()&&toe(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function uoe(){return this.isValid()?!this._isUTC:!1}function foe(){return this.isValid()?this._isUTC:!1}function dz(){return this.isValid()?this._isUTC&&this._offset===0:!1}var hoe=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,poe=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function no(t,e){var n=t,r=null,s,o,a;return wg(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:Oi(t)||!isNaN(+t)?(n={},e?n[e]=+t:n.milliseconds=+t):(r=hoe.exec(t))?(s=r[1]==="-"?-1:1,n={y:0,d:ht(r[po])*s,h:ht(r[jn])*s,m:ht(r[Hs])*s,s:ht(r[ii])*s,ms:ht(Zw(r[Cl]*1e3))*s}):(r=poe.exec(t))?(s=r[1]==="-"?-1:1,n={y:rl(r[2],s),M:rl(r[3],s),w:rl(r[4],s),d:rl(r[5],s),h:rl(r[6],s),m:rl(r[7],s),s:rl(r[8],s)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=moe(ln(n.from),ln(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),o=new lv(n),wg(t)&&Nt(t,"_locale")&&(o._locale=t._locale),wg(t)&&Nt(t,"_isValid")&&(o._isValid=t._isValid),o}no.fn=lv.prototype;no.invalid=eoe;function rl(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function eO(t,e){var n={};return n.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function moe(t,e){var n;return t.isValid()&&e.isValid()?(e=IS(e,t),t.isBefore(e)?n=eO(t,e):(n=eO(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function uz(t,e){return function(n,r){var s,o;return r!==null&&!isNaN(+r)&&(q5(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),s=no(n,r),fz(this,s,t),this}}function fz(t,e,n,r){var s=e._milliseconds,o=Zw(e._days),a=Zw(e._months);t.isValid()&&(r=r??!0,a&&K5(t,Ly(t,"Month")+a*n),o&&B5(t,"Date",Ly(t,"Date")+o*n),s&&t._d.setTime(t._d.valueOf()+s*n),r&&Re.updateOffset(t,o||a))}var goe=uz(1,"add"),yoe=uz(-1,"subtract");function hz(t){return typeof t=="string"||t instanceof String}function boe(t){return eo(t)||xp(t)||hz(t)||Oi(t)||_oe(t)||voe(t)||t===null||t===void 0}function voe(t){var e=kl(t)&&!vS(t),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,o,a=r.length;for(s=0;s<a;s+=1)o=r[s],n=n||Nt(t,o);return e&&n}function _oe(t){var e=Qs(t),n=!1;return e&&(n=t.filter(function(r){return!Oi(r)&&hz(t)}).length===0),e&&n}function woe(t){var e=kl(t)&&!vS(t),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,o;for(s=0;s<r.length;s+=1)o=r[s],n=n||Nt(t,o);return e&&n}function xoe(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Coe(t,e){arguments.length===1&&(arguments[0]?boe(arguments[0])?(t=arguments[0],e=void 0):woe(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||ln(),r=IS(n,this).startOf("day"),s=Re.calendarFormat(this,r)||"sameElse",o=e&&(Po(e[s])?e[s].call(this,n):e[s]);return this.format(o||this.localeData().calendar(s,this,ln(n)))}function Eoe(){return new Cp(this)}function Soe(t,e){var n=eo(t)?t:ln(t);return this.isValid()&&n.isValid()?(e=Ps(e)||"millisecond",e==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf()):!1}function Aoe(t,e){var n=eo(t)?t:ln(t);return this.isValid()&&n.isValid()?(e=Ps(e)||"millisecond",e==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf()):!1}function Noe(t,e,n,r){var s=eo(t)?t:ln(t),o=eo(e)?e:ln(e);return this.isValid()&&s.isValid()&&o.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(s,n):!this.isBefore(s,n))&&(r[1]===")"?this.isBefore(o,n):!this.isAfter(o,n))):!1}function Roe(t,e){var n=eo(t)?t:ln(t),r;return this.isValid()&&n.isValid()?(e=Ps(e)||"millisecond",e==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(e).valueOf()<=r&&r<=this.clone().endOf(e).valueOf())):!1}function Poe(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function Ooe(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function Foe(t,e,n){var r,s,o;if(!this.isValid())return NaN;if(r=IS(t,this),!r.isValid())return NaN;switch(s=(r.utcOffset()-this.utcOffset())*6e4,e=Ps(e),e){case"year":o=xg(this,r)/12;break;case"month":o=xg(this,r);break;case"quarter":o=xg(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-s)/864e5;break;case"week":o=(this-r-s)/6048e5;break;default:o=this-r}return n?o:ms(o)}function xg(t,e){if(t.date()<e.date())return-xg(e,t);var n=(e.year()-t.year())*12+(e.month()-t.month()),r=t.clone().add(n,"months"),s,o;return e-r<0?(s=t.clone().add(n-1,"months"),o=(e-r)/(r-s)):(s=t.clone().add(n+1,"months"),o=(e-r)/(s-r)),-(n+o)||0}Re.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";Re.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Doe(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function koe(t){if(!this.isValid())return null;var e=t!==!0,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?_g(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Po(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",_g(n,"Z")):_g(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Toe(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",n,r,s,o;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",o=e+'[")]',this.format(n+r+s+o)}function Ioe(t){t||(t=this.isUtc()?Re.defaultFormatUtc:Re.defaultFormat);var e=_g(this,t);return this.localeData().postformat(e)}function Moe(t,e){return this.isValid()&&(eo(t)&&t.isValid()||ln(t).isValid())?no({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function Loe(t){return this.from(ln(),t)}function zoe(t,e){return this.isValid()&&(eo(t)&&t.isValid()||ln(t).isValid())?no({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function qoe(t){return this.to(ln(),t)}function pz(t){var e;return t===void 0?this._locale._abbr:(e=Mi(t),e!=null&&(this._locale=e),this)}var mz=Rs("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function gz(){return this._locale}var jy=1e3,_d=60*jy,$y=60*_d,yz=(365*400+97)*24*$y;function wd(t,e){return(t%e+e)%e}function bz(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-yz:new Date(t,e,n).valueOf()}function vz(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-yz:Date.UTC(t,e,n)}function joe(t){var e,n;if(t=Ps(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?vz:bz,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=wd(e+(this._isUTC?0:this.utcOffset()*_d),$y);break;case"minute":e=this._d.valueOf(),e-=wd(e,_d);break;case"second":e=this._d.valueOf(),e-=wd(e,jy);break}return this._d.setTime(e),Re.updateOffset(this,!0),this}function $oe(t){var e,n;if(t=Ps(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?vz:bz,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=$y-wd(e+(this._isUTC?0:this.utcOffset()*_d),$y)-1;break;case"minute":e=this._d.valueOf(),e+=_d-wd(e,_d)-1;break;case"second":e=this._d.valueOf(),e+=jy-wd(e,jy)-1;break}return this._d.setTime(e),Re.updateOffset(this,!0),this}function Boe(){return this._d.valueOf()-(this._offset||0)*6e4}function Uoe(){return Math.floor(this.valueOf()/1e3)}function Yoe(){return new Date(this.valueOf())}function Hoe(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Goe(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Woe(){return this.isValid()?this.toISOString():null}function Voe(){return _S(this)}function Koe(){return oa({},at(this))}function Zoe(){return at(this).overflow}function Joe(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}$e("N",0,0,"eraAbbr");$e("NN",0,0,"eraAbbr");$e("NNN",0,0,"eraAbbr");$e("NNNN",0,0,"eraName");$e("NNNNN",0,0,"eraNarrow");$e("y",["y",1],"yo","eraYear");$e("y",["yy",2],0,"eraYear");$e("y",["yyy",3],0,"eraYear");$e("y",["yyyy",4],0,"eraYear");ke("N",MS);ke("NN",MS);ke("NNN",MS);ke("NNNN",lie);ke("NNNNN",cie);$t(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,r){var s=n._locale.erasParse(t,r,n._strict);s?at(n).era=s:at(n).invalidEra=t});ke("y",mu);ke("yy",mu);ke("yyy",mu);ke("yyyy",mu);ke("yo",die);$t(["y","yy","yyy","yyyy"],pr);$t(["yo"],function(t,e,n,r){var s;n._locale._eraYearOrdinalRegex&&(s=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[pr]=n._locale.eraYearOrdinalParse(t,s):e[pr]=parseInt(t,10)});function Xoe(t,e){var n,r,s,o=this._eras||Mi("en")._eras;for(n=0,r=o.length;n<r;++n){switch(typeof o[n].since){case"string":s=Re(o[n].since).startOf("day"),o[n].since=s.valueOf();break}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":s=Re(o[n].until).startOf("day").valueOf(),o[n].until=s.valueOf();break}}return o}function Qoe(t,e,n){var r,s,o=this.eras(),a,l,c;for(t=t.toUpperCase(),r=0,s=o.length;r<s;++r)if(a=o[r].name.toUpperCase(),l=o[r].abbr.toUpperCase(),c=o[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(l===t)return o[r];break;case"NNNN":if(a===t)return o[r];break;case"NNNNN":if(c===t)return o[r];break}else if([a,l,c].indexOf(t)>=0)return o[r]}function eie(t,e){var n=t.since<=t.until?1:-1;return e===void 0?Re(t.since).year():Re(t.since).year()+(e-t.offset)*n}function tie(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].name;return""}function nie(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].narrow;return""}function rie(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].abbr;return""}function sie(){var t,e,n,r,s=this.localeData().eras();for(t=0,e=s.length;t<e;++t)if(n=s[t].since<=s[t].until?1:-1,r=this.clone().startOf("day").valueOf(),s[t].since<=r&&r<=s[t].until||s[t].until<=r&&r<=s[t].since)return(this.year()-Re(s[t].since).year())*n+s[t].offset;return this.year()}function oie(t){return Nt(this,"_erasNameRegex")||LS.call(this),t?this._erasNameRegex:this._erasRegex}function iie(t){return Nt(this,"_erasAbbrRegex")||LS.call(this),t?this._erasAbbrRegex:this._erasRegex}function aie(t){return Nt(this,"_erasNarrowRegex")||LS.call(this),t?this._erasNarrowRegex:this._erasRegex}function MS(t,e){return e.erasAbbrRegex(t)}function lie(t,e){return e.erasNameRegex(t)}function cie(t,e){return e.erasNarrowRegex(t)}function die(t,e){return e._eraYearOrdinalRegex||mu}function LS(){var t=[],e=[],n=[],r=[],s,o,a=this.eras();for(s=0,o=a.length;s<o;++s)e.push(Xr(a[s].name)),t.push(Xr(a[s].abbr)),n.push(Xr(a[s].narrow)),r.push(Xr(a[s].name)),r.push(Xr(a[s].abbr)),r.push(Xr(a[s].narrow));this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}$e(0,["gg",2],0,function(){return this.weekYear()%100});$e(0,["GG",2],0,function(){return this.isoWeekYear()%100});function cv(t,e){$e(0,[t,t.length],0,e)}cv("gggg","weekYear");cv("ggggg","weekYear");cv("GGGG","isoWeekYear");cv("GGGGG","isoWeekYear");gr("weekYear","gg");gr("isoWeekYear","GG");yr("weekYear",1);yr("isoWeekYear",1);ke("G",sv);ke("g",sv);ke("GG",cn,as);ke("gg",cn,as);ke("GGGG",AS,SS);ke("gggg",AS,SS);ke("GGGGG",rv,tv);ke("ggggg",rv,tv);Sp(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=ht(t)});Sp(["gg","GG"],function(t,e,n,r){e[r]=Re.parseTwoDigitYear(t)});function uie(t){return _z.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function fie(t){return _z.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function hie(){return yi(this.year(),1,4)}function pie(){return yi(this.isoWeekYear(),1,4)}function mie(){var t=this.localeData()._week;return yi(this.year(),t.dow,t.doy)}function gie(){var t=this.localeData()._week;return yi(this.weekYear(),t.dow,t.doy)}function _z(t,e,n,r,s){var o;return t==null?Ih(this,r,s).year:(o=yi(t,r,s),e>o&&(e=o),yie.call(this,t,e,n,r,s))}function yie(t,e,n,r,s){var o=Q5(t,e,n,r,s),a=Th(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}$e("Q",0,"Qo","quarter");gr("quarter","Q");yr("quarter",7);ke("Q",U5);$t("Q",function(t,e){e[oi]=(ht(t)-1)*3});function bie(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}$e("D",["DD",2],"Do","date");gr("date","D");yr("date",9);ke("D",cn);ke("DD",cn,as);ke("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient});$t(["D","DD"],po);$t("Do",function(t,e){e[po]=ht(t.match(cn)[0])});var wz=pu("Date",!0);$e("DDD",["DDDD",3],"DDDo","dayOfYear");gr("dayOfYear","DDD");yr("dayOfYear",4);ke("DDD",nv);ke("DDDD",Y5);$t(["DDD","DDDD"],function(t,e,n){n._dayOfYear=ht(t)});function vie(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}$e("m",["mm",2],0,"minute");gr("minute","m");yr("minute",14);ke("m",cn);ke("mm",cn,as);$t(["m","mm"],Hs);var _ie=pu("Minutes",!1);$e("s",["ss",2],0,"second");gr("second","s");yr("second",15);ke("s",cn);ke("ss",cn,as);$t(["s","ss"],ii);var wie=pu("Seconds",!1);$e("S",0,0,function(){return~~(this.millisecond()/100)});$e(0,["SS",2],0,function(){return~~(this.millisecond()/10)});$e(0,["SSS",3],0,"millisecond");$e(0,["SSSS",4],0,function(){return this.millisecond()*10});$e(0,["SSSSS",5],0,function(){return this.millisecond()*100});$e(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});$e(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});$e(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});$e(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});gr("millisecond","ms");yr("millisecond",16);ke("S",nv,U5);ke("SS",nv,as);ke("SSS",nv,Y5);var ia,xz;for(ia="SSSS";ia.length<=9;ia+="S")ke(ia,mu);function xie(t,e){e[Cl]=ht(("0."+t)*1e3)}for(ia="S";ia.length<=9;ia+="S")$t(ia,xie);xz=pu("Milliseconds",!1);$e("z",0,0,"zoneAbbr");$e("zz",0,0,"zoneName");function Cie(){return this._isUTC?"UTC":""}function Eie(){return this._isUTC?"Coordinated Universal Time":""}var xe=Cp.prototype;xe.add=goe;xe.calendar=Coe;xe.clone=Eoe;xe.diff=Foe;xe.endOf=$oe;xe.format=Ioe;xe.from=Moe;xe.fromNow=Loe;xe.to=zoe;xe.toNow=qoe;xe.get=Are;xe.invalidAt=Zoe;xe.isAfter=Soe;xe.isBefore=Aoe;xe.isBetween=Noe;xe.isSame=Roe;xe.isSameOrAfter=Poe;xe.isSameOrBefore=Ooe;xe.isValid=Voe;xe.lang=mz;xe.locale=pz;xe.localeData=gz;xe.max=Vse;xe.min=Wse;xe.parsingFlags=Koe;xe.set=Nre;xe.startOf=joe;xe.subtract=yoe;xe.toArray=Hoe;xe.toObject=Goe;xe.toDate=Yoe;xe.toISOString=koe;xe.inspect=Toe;typeof Symbol<"u"&&Symbol.for!=null&&(xe[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});xe.toJSON=Woe;xe.toString=Doe;xe.unix=Uoe;xe.valueOf=Boe;xe.creationData=Joe;xe.eraName=tie;xe.eraNarrow=nie;xe.eraAbbr=rie;xe.eraYear=sie;xe.year=X5;xe.isLeapYear=Gre;xe.weekYear=uie;xe.isoWeekYear=fie;xe.quarter=xe.quarters=bie;xe.month=Z5;xe.daysInMonth=Ure;xe.week=xe.weeks=Xre;xe.isoWeek=xe.isoWeeks=Qre;xe.weeksInYear=mie;xe.weeksInWeekYear=gie;xe.isoWeeksInYear=hie;xe.isoWeeksInISOWeekYear=pie;xe.date=wz;xe.day=xe.days=fse;xe.weekday=hse;xe.isoWeekday=pse;xe.dayOfYear=vie;xe.hour=xe.hours=wse;xe.minute=xe.minutes=_ie;xe.second=xe.seconds=wie;xe.millisecond=xe.milliseconds=xz;xe.utcOffset=roe;xe.utc=ooe;xe.local=ioe;xe.parseZone=aoe;xe.hasAlignedHourOffset=loe;xe.isDST=coe;xe.isLocal=uoe;xe.isUtcOffset=foe;xe.isUtc=dz;xe.isUTC=dz;xe.zoneAbbr=Cie;xe.zoneName=Eie;xe.dates=Rs("dates accessor is deprecated. Use date instead.",wz);xe.months=Rs("months accessor is deprecated. Use month instead",Z5);xe.years=Rs("years accessor is deprecated. Use year instead",X5);xe.zone=Rs("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",soe);xe.isDSTShifted=Rs("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",doe);function Sie(t){return ln(t*1e3)}function Aie(){return ln.apply(null,arguments).parseZone()}function Cz(t){return t}var Ot=xS.prototype;Ot.calendar=fre;Ot.longDateFormat=gre;Ot.invalidDate=bre;Ot.ordinal=wre;Ot.preparse=Cz;Ot.postformat=Cz;Ot.relativeTime=Cre;Ot.pastFuture=Ere;Ot.set=dre;Ot.eras=Xoe;Ot.erasParse=Qoe;Ot.erasConvertYear=eie;Ot.erasAbbrRegex=iie;Ot.erasNameRegex=oie;Ot.erasNarrowRegex=aie;Ot.months=qre;Ot.monthsShort=jre;Ot.monthsParse=Bre;Ot.monthsRegex=Hre;Ot.monthsShortRegex=Yre;Ot.week=Vre;Ot.firstDayOfYear=Jre;Ot.firstDayOfWeek=Zre;Ot.weekdays=ase;Ot.weekdaysMin=cse;Ot.weekdaysShort=lse;Ot.weekdaysParse=use;Ot.weekdaysRegex=mse;Ot.weekdaysShortRegex=gse;Ot.weekdaysMinRegex=yse;Ot.isPM=vse;Ot.meridiem=xse;function By(t,e,n,r){var s=Mi(),o=Ro().set(r,e);return s[n](o,t)}function Ez(t,e,n){if(Oi(t)&&(e=t,t=void 0),t=t||"",e!=null)return By(t,e,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=By(t,r,n,"month");return s}function zS(t,e,n,r){typeof t=="boolean"?(Oi(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,Oi(e)&&(n=e,e=void 0),e=e||"");var s=Mi(),o=t?s._week.dow:0,a,l=[];if(n!=null)return By(e,(n+o)%7,r,"day");for(a=0;a<7;a++)l[a]=By(e,(a+o)%7,r,"day");return l}function Nie(t,e){return Ez(t,e,"months")}function Rie(t,e){return Ez(t,e,"monthsShort")}function Pie(t,e,n){return zS(t,e,n,"weekdays")}function Oie(t,e,n){return zS(t,e,n,"weekdaysShort")}function Fie(t,e,n){return zS(t,e,n,"weekdaysMin")}Ea("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=ht(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+n}});Re.lang=Rs("moment.lang is deprecated. Use moment.locale instead.",Ea);Re.langData=Rs("moment.langData is deprecated. Use moment.localeData instead.",Mi);var $o=Math.abs;function Die(){var t=this._data;return this._milliseconds=$o(this._milliseconds),this._days=$o(this._days),this._months=$o(this._months),t.milliseconds=$o(t.milliseconds),t.seconds=$o(t.seconds),t.minutes=$o(t.minutes),t.hours=$o(t.hours),t.months=$o(t.months),t.years=$o(t.years),this}function Sz(t,e,n,r){var s=no(e,n);return t._milliseconds+=r*s._milliseconds,t._days+=r*s._days,t._months+=r*s._months,t._bubble()}function kie(t,e){return Sz(this,t,e,1)}function Tie(t,e){return Sz(this,t,e,-1)}function tO(t){return t<0?Math.floor(t):Math.ceil(t)}function Iie(){var t=this._milliseconds,e=this._days,n=this._months,r=this._data,s,o,a,l,c;return t>=0&&e>=0&&n>=0||t<=0&&e<=0&&n<=0||(t+=tO(Xw(n)+e)*864e5,e=0,n=0),r.milliseconds=t%1e3,s=ms(t/1e3),r.seconds=s%60,o=ms(s/60),r.minutes=o%60,a=ms(o/60),r.hours=a%24,e+=ms(a/24),c=ms(Az(e)),n+=c,e-=tO(Xw(c)),l=ms(n/12),n%=12,r.days=e,r.months=n,r.years=l,this}function Az(t){return t*4800/146097}function Xw(t){return t*146097/4800}function Mie(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if(t=Ps(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+r/864e5,n=this._months+Az(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(Xw(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return e*24+r/36e5;case"minute":return e*1440+r/6e4;case"second":return e*86400+r/1e3;case"millisecond":return Math.floor(e*864e5)+r;default:throw new Error("Unknown unit "+t)}}function Lie(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+ht(this._months/12)*31536e6:NaN}function Li(t){return function(){return this.as(t)}}var zie=Li("ms"),qie=Li("s"),jie=Li("m"),$ie=Li("h"),Bie=Li("d"),Uie=Li("w"),Yie=Li("M"),Hie=Li("Q"),Gie=Li("y");function Wie(){return no(this)}function Vie(t){return t=Ps(t),this.isValid()?this[t+"s"]():NaN}function ic(t){return function(){return this.isValid()?this._data[t]:NaN}}var Kie=ic("milliseconds"),Zie=ic("seconds"),Jie=ic("minutes"),Xie=ic("hours"),Qie=ic("days"),eae=ic("months"),tae=ic("years");function nae(){return ms(this.days()/7)}var Go=Math.round,nd={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function rae(t,e,n,r,s){return s.relativeTime(e||1,!!n,t,r)}function sae(t,e,n,r){var s=no(t).abs(),o=Go(s.as("s")),a=Go(s.as("m")),l=Go(s.as("h")),c=Go(s.as("d")),d=Go(s.as("M")),u=Go(s.as("w")),f=Go(s.as("y")),g=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||a<=1&&["m"]||a<n.m&&["mm",a]||l<=1&&["h"]||l<n.h&&["hh",l]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(g=g||u<=1&&["w"]||u<n.w&&["ww",u]),g=g||d<=1&&["M"]||d<n.M&&["MM",d]||f<=1&&["y"]||["yy",f],g[2]=e,g[3]=+t>0,g[4]=r,rae.apply(null,g)}function oae(t){return t===void 0?Go:typeof t=="function"?(Go=t,!0):!1}function iae(t,e){return nd[t]===void 0?!1:e===void 0?nd[t]:(nd[t]=e,t==="s"&&(nd.ss=e-1),!0)}function aae(t,e){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=nd,s,o;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(n=t),typeof e=="object"&&(r=Object.assign({},nd,e),e.s!=null&&e.ss==null&&(r.ss=e.s-1)),s=this.localeData(),o=sae(this,!n,r,s),n&&(o=s.pastFuture(+this,o)),s.postformat(o)}var C_=Math.abs;function Rc(t){return(t>0)-(t<0)||+t}function dv(){if(!this.isValid())return this.localeData().invalidDate();var t=C_(this._milliseconds)/1e3,e=C_(this._days),n=C_(this._months),r,s,o,a,l=this.asSeconds(),c,d,u,f;return l?(r=ms(t/60),s=ms(r/60),t%=60,r%=60,o=ms(n/12),n%=12,a=t?t.toFixed(3).replace(/\.?0+$/,""):"",c=l<0?"-":"",d=Rc(this._months)!==Rc(l)?"-":"",u=Rc(this._days)!==Rc(l)?"-":"",f=Rc(this._milliseconds)!==Rc(l)?"-":"",c+"P"+(o?d+o+"Y":"")+(n?d+n+"M":"")+(e?u+e+"D":"")+(s||r||t?"T":"")+(s?f+s+"H":"")+(r?f+r+"M":"")+(t?f+a+"S":"")):"P0D"}var xt=lv.prototype;xt.isValid=Qse;xt.abs=Die;xt.add=kie;xt.subtract=Tie;xt.as=Mie;xt.asMilliseconds=zie;xt.asSeconds=qie;xt.asMinutes=jie;xt.asHours=$ie;xt.asDays=Bie;xt.asWeeks=Uie;xt.asMonths=Yie;xt.asQuarters=Hie;xt.asYears=Gie;xt.valueOf=Lie;xt._bubble=Iie;xt.clone=Wie;xt.get=Vie;xt.milliseconds=Kie;xt.seconds=Zie;xt.minutes=Jie;xt.hours=Xie;xt.days=Qie;xt.weeks=nae;xt.months=eae;xt.years=tae;xt.humanize=aae;xt.toISOString=dv;xt.toString=dv;xt.toJSON=dv;xt.locale=pz;xt.localeData=gz;xt.toIsoString=Rs("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",dv);xt.lang=mz;$e("X",0,0,"unix");$e("x",0,0,"valueOf");ke("x",sv);ke("X",Pre);$t("X",function(t,e,n){n._d=new Date(parseFloat(t)*1e3)});$t("x",function(t,e,n){n._d=new Date(ht(t))});//! moment.js Re.version="2.29.4";lre(ln);Re.fn=xe;Re.min=Kse;Re.max=Zse;Re.now=Jse;Re.utc=Ro;Re.unix=Sie;Re.months=Nie;Re.isDate=xp;Re.locale=Ea;Re.invalid=Qb;Re.duration=no;Re.isMoment=eo;Re.weekdays=Pie;Re.parseZone=Aie;Re.localeData=Mi;Re.isDuration=wg;Re.monthsShort=Rie;Re.weekdaysMin=Fie;Re.defineLocale=OS;Re.updateLocale=Ase;Re.locales=Nse;Re.weekdaysShort=Oie;Re.normalizeUnits=Ps;Re.relativeTimeRounding=oae;Re.relativeTimeThreshold=iae;Re.calendarFormat=xoe;Re.prototype=xe;Re.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const lae=()=>{const t=I5(),[e,n]=C.useState([]),[r,s]=C.useState([]),[o,a]=C.useState([]),[l,c]=C.useState(!0);return C.useEffect(()=>{c(!0);const d=si(t,"1xD10-tawmlMevscwue25TRJ7HL2SK-QLR7PUGUeK2k0/SextaFalta"),u=si(t,"1xD10-tawmlMevscwue25TRJ7HL2SK-QLR7PUGUeK2k0/Equipos"),f=si(t,"1xD10-tawmlMevscwue25TRJ7HL2SK-QLR7PUGUeK2k0/PromediosSexta");bd(f,g=>{const E=g.val();s(E)}),bd(d,g=>{const E=g.val();n(E)}),bd(u,g=>{const E=g.val();a(E)}),setTimeout(()=>c(!1),800)},[t]),l?i("div",{className:"d-flex justify-content-center",style:{marginTop:250},children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL -SEXTA FALTAS - ESTADISTICAS"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de LA COPA ARGENTINA DE Futsal AFA , fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:"tamañoTorneo",children:[p(ae,{className:"",children:[i(V,{children:i($,{children:p("h6",{className:"text-center text-white",style:{fontSize:20,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",alignItems:"center"},children:[i(qd,{style:{marginRight:"5px"}}),"ESTADISTICAS SEXTA FALTA",i(qd,{style:{marginLeft:"5px"}})," "]})})}),i(V,{children:i($,{children:i("div",{className:"mt-2",style:{display:"flex",flexDirection:"column",alignItems:"center"},children:i("a",{className:"mb-2",href:"https://link.mercadopago.com.ar/profenahue",target:"_blank",children:i("img",{className:"ms-1 bannerSextaFalta",src:are,width:"150",height:"250",alt:"Argentina"})})})})}),i("div",{style:{position:"relative",width:"100%",paddingTop:"100.0000%",paddingBottom:0,marginBottom:"0.9em",overflow:"hidden",borderRadius:"8px",willChange:"transform"},children:i("iframe",{style:{position:"absolute",width:"100%",height:"100%",top:0,left:0,border:"none",padding:0,margin:0,bottom:0},src:"https://www.canva.com/design/DAFnCD3gUZU/view?embed",allow:"fullscreen"})})]}),i(ae,{className:" mt-5",children:Object.values(r).map(d=>{const u=Re(d.ultimaFecha).format("DD/MM/YYYY");return d.porcetajePieDerecho,d.porcetajePieIzquierdo,d.porcentajeAtajados,d.porcentajeErrados,d.porcentajeConvertido,i(V,{children:p($,{children:[p("h6",{className:"text-center text-white",style:{fontSize:25,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",alignItems:"center"},children:["Datos obtenidos sobre ",p("span",{className:"fw-bolder",children:[" ",d.cantidadTotalSextaFalta]})," partidos Televisados"]}),p("h6",{className:"text-center text-white",style:{fontSize:18,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",alignItems:"center"},children:["*La ultima estadistica se cargo el: ",p("span",{className:"fw-bolder",children:[" ",u]})]}),p(Ie,{bordered:!0,size:"sm",className:"mt-5",children:[i("thead",{children:i("tr",{className:"text-center text-white tituloPartidos ",style:{fontSize:20,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},colSpan:"6",children:"Resultados Totales"})}),p("tbody",{children:[i("tr",{className:"text-center text-white",style:{fontSize:40,fontFamily:"Roboto Condensed, sans-serif"},children:p("td",{className:"fw-bolder text-dark bg-warning",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["Atajados: ",d.porcentajeAtajados,"%"]})}),i("tr",{className:"text-center text-white",style:{fontSize:40,fontFamily:"Roboto Condensed, sans-serif"},children:p("td",{className:"fw-bolder bg-danger",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["Errados: ",d.porcentajeErrados,"%"]})}),i("tr",{className:"text-center text-white",style:{fontSize:40,fontFamily:"Roboto Condensed, sans-serif"},children:p("td",{className:"fw-bolder bg-success",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["Convertidos: ",d.porcentajeConvertido,"%"]})}),i("tr",{className:"text-center text-white",style:{fontSize:40,fontFamily:"Roboto Condensed, sans-serif"},children:p("td",{className:"fw-bolder bg-secondary",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["Pierna Derecha: ",d.porcetajePieDerecho,"%"]})}),i("tr",{className:"text-center text-white",style:{fontSize:40,fontFamily:"Roboto Condensed, sans-serif"},children:p("td",{className:"fw-bolder bg-primary",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["Pierna Izquierda: ",d.porcetajePieIzquierdo,"%"]})}),i("tr",{className:"text-center text-dark",style:{fontSize:40,fontFamily:"Roboto Condensed, sans-serif"},children:p("td",{className:"fw-bolder bg-info-subtle",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["En el 1er Tiempo: ",d.cantidadSextaPrimerTiempo]})}),i("tr",{className:"text-center text-dark",style:{fontSize:40,fontFamily:"Roboto Condensed, sans-serif"},children:p("td",{className:"fw-bolder bg-info",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["En el 2do Tiempo: ",d.cantidadSextaSegundoTiempo]})})]})]}),p(Ie,{bordered:!0,size:"sm",className:"mt-5",children:[i("thead",{children:i("tr",{className:"text-center text-white tituloPartidos ",style:{fontSize:20,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},colSpan:"6",children:"Porcentajes de Efectividad"})}),p("tbody",{children:[i("tr",{className:"text-center text-white",style:{fontSize:40,fontFamily:"Roboto Condensed, sans-serif"},children:p("td",{className:"fw-bolder bg-success",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["Gol: ",d.chanchesDeConvertir,"%"]})}),i("tr",{className:"text-center text-white",style:{fontSize:40,fontFamily:"Roboto Condensed, sans-serif"},children:p("td",{className:"fw-bolder bg-danger",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["No Gol: ",d.chanceDeNoConvertir,"%"]})})]})]}),p(Ie,{bordered:!0,size:"sm",className:"mt-5 bg-secondary",children:[i("thead",{children:i("h6",{className:"text-center text-white",style:{fontSize:20,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",alignItems:"center"},children:"Estadisticas Jugador Derecho"})}),p("tbody",{children:[i("tr",{className:"text-center text-white",children:p("td",{className:"fw-bolder bg-success",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["Convierte el: ",d.efectividadPiernaDerecha,"%"]})}),i("tr",{className:"text-center text-white",children:p("td",{className:"fw-bolder bg-danger",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["Erran el: ",d.erradosPiernaDerecha,"%"]})}),i("tr",{className:"text-center text-dark",children:p("td",{className:"fw-bolder bg-warning",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["Le Atajan: ",d.atajadosPiernaDerecha,"%"]})}),i("tr",{className:"text-center text-white",children:p("td",{className:"fw-bolder bg-secondary",style:{width:"10%",fontSize:15,fontFamily:"Roboto Condensed, sans-serif"},children:["Lugar Más Elegido: ",d.lugarElegidoDerecho]})})]})]}),p(Ie,{bordered:!0,size:"sm",className:"bg-secondary mt-5",children:[i("thead",{children:i("h6",{className:"text-center text-white",style:{fontSize:20,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",alignItems:"center"},children:"Estadisticas Jugador Izquierdo"})}),p("tbody",{children:[i("tr",{className:"text-center text-white",children:p("td",{className:"fw-bolder bg-success",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["Convierte el: ",d.efectividadPiernaIzquierda,"%"]})}),i("tr",{className:"text-center text-white",children:p("td",{className:"fw-bolder bg-danger",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["Erran el: ",d.erradosPiernaIzquierda,"%"]})}),i("tr",{className:"text-center text-dark",children:p("td",{className:"fw-bolder bg-warning",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["Le Atajan: ",d.atajadosPiernaIzquierda,"%"]})}),i("tr",{className:"text-center text-white",children:p("td",{className:"fw-bolder bg-secondary",style:{width:"10%",fontSize:15,fontFamily:"Roboto Condensed, sans-serif"},children:["Lugar Más Elegido: ",d.lugarElegidoIzquierdo]})})]})]}),p(Ie,{bordered:!0,size:"sm",className:"mt-5 bg-secondary mb-5",children:[i("thead",{children:i("h6",{className:"text-center text-white",style:{fontSize:20,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",alignItems:"center"},children:"Estadisticas Arquero"})}),p("tbody",{children:[i("tr",{className:"text-center text-white",children:p("td",{className:"fw-bolder bg-success",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["Ataja el: ",d.porcentajeAtajados,"%"]})}),i("tr",{className:"text-center ",children:p("td",{className:"fw-bolder text-white bg-danger",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["Le Convierten el: ",d.porcentajeConvertido,"%"]})}),i("tr",{className:"text-center text-white",children:p("td",{className:"fw-bolder text-dark bg-warning ",style:{width:"10%",fontSize:20,fontFamily:"Roboto Condensed, sans-serif"},children:["Erran el: ",d.porcentajeErrados,"%"]})}),i("tr",{className:"text-center text-white",children:p("td",{className:"fw-bolder bg-secondary",style:{width:"10%",fontSize:15,fontFamily:"Roboto Condensed, sans-serif"},children:["Ataja más veces con: ",d.parteDelArquero]})}),i("tr",{className:"text-center text-dark",children:p("td",{className:"fw-bolder bg-info-subtle",style:{width:"10%",fontSize:15,fontFamily:"Roboto Condensed, sans-serif"},children:["El lugar mas elegido: ",d.arqueroLugar]})}),i("tr",{className:"text-center text-dark",children:p("td",{className:"fw-bolder bg-info",style:{width:"10%",fontSize:15,fontFamily:"Roboto Condensed, sans-serif"},children:["Técnica mas empleada al atajar: ",d.tecnicaArquero]})})]})]})]})},d.id)})})]})]})};function nO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function cae(t,e,n){return e&&nO(t.prototype,e),n&&nO(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var rO="(prefers-reduced-motion: reduce)",rd=1,dae=2,Hd=3,gu=4,Ap=5,Cg=6,Uy=7,uae={CREATED:rd,MOUNTED:dae,IDLE:Hd,MOVING:gu,SCROLLING:Ap,DRAGGING:Cg,DESTROYED:Uy};function Fi(t){t.length=0}function Ga(t,e,n){return Array.prototype.slice.call(t,e,n)}function Wt(t){return t.bind.apply(t,[null].concat(Ga(arguments,1)))}var Nz=setTimeout,Qw=function(){};function sO(t){return requestAnimationFrame(t)}function uv(t,e){return typeof e===t}function Lh(t){return!jS(t)&&uv("object",t)}var qS=Array.isArray,Rz=Wt(uv,"function"),Da=Wt(uv,"string"),Np=Wt(uv,"undefined");function jS(t){return t===null}function Pz(t){try{return t instanceof(t.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Rp(t){return qS(t)?t:[t]}function Cs(t,e){Rp(t).forEach(e)}function $S(t,e){return t.indexOf(e)>-1}function Eg(t,e){return t.push.apply(t,Rp(e)),t}function ai(t,e,n){t&&Cs(e,function(r){r&&t.classList[n?"add":"remove"](r)})}function Co(t,e){ai(t,Da(e)?e.split(" "):e,!0)}function Pp(t,e){Cs(e,t.appendChild.bind(t))}function BS(t,e){Cs(t,function(n){var r=(e||n).parentNode;r&&r.insertBefore(n,e)})}function zh(t,e){return Pz(t)&&(t.msMatchesSelector||t.matches).call(t,e)}function Oz(t,e){var n=t?Ga(t.children):[];return e?n.filter(function(r){return zh(r,e)}):n}function Op(t,e){return e?Oz(t,e)[0]:t.firstElementChild}var qh=Object.keys;function Tl(t,e,n){return t&&(n?qh(t).reverse():qh(t)).forEach(function(r){r!=="__proto__"&&e(t[r],r)}),t}function jh(t){return Ga(arguments,1).forEach(function(e){Tl(e,function(n,r){t[r]=e[r]})}),t}function aa(t){return Ga(arguments,1).forEach(function(e){Tl(e,function(n,r){qS(n)?t[r]=n.slice():Lh(n)?t[r]=aa({},Lh(t[r])?t[r]:{},n):t[r]=n})}),t}function oO(t,e){Cs(e||qh(t),function(n){delete t[n]})}function Eo(t,e){Cs(t,function(n){Cs(e,function(r){n&&n.removeAttribute(r)})})}function lt(t,e,n){Lh(e)?Tl(e,function(r,s){lt(t,s,r)}):Cs(t,function(r){jS(n)||n===""?Eo(r,e):r.setAttribute(e,String(n))})}function xd(t,e,n){var r=document.createElement(t);return e&&(Da(e)?Co(r,e):lt(r,e)),n&&Pp(n,r),r}function js(t,e,n){if(Np(n))return getComputedStyle(t)[e];jS(n)||(t.style[e]=""+n)}function $h(t,e){js(t,"display",e)}function Fz(t){t.setActive&&t.setActive()||t.focus({preventScroll:!0})}function Gs(t,e){return t.getAttribute(e)}function iO(t,e){return t&&t.classList.contains(e)}function gs(t){return t.getBoundingClientRect()}function Zl(t){Cs(t,function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})}function Dz(t){return Op(new DOMParser().parseFromString(t,"text/html").body)}function Ko(t,e){t.preventDefault(),e&&(t.stopPropagation(),t.stopImmediatePropagation())}function kz(t,e){return t&&t.querySelector(e)}function US(t,e){return e?Ga(t.querySelectorAll(e)):[]}function li(t,e){ai(t,e,!1)}function ex(t){return t.timeStamp}function sl(t){return Da(t)?t:t?t+"px":""}var Fp="splide",YS="data-"+Fp;function Bf(t,e){if(!t)throw new Error("["+Fp+"] "+(e||""))}var ka=Math.min,Yy=Math.max,Hy=Math.floor,Bh=Math.ceil,qr=Math.abs;function Tz(t,e,n){return qr(t-e)<n}function Sg(t,e,n,r){var s=ka(e,n),o=Yy(e,n);return r?s<t&&t<o:s<=t&&t<=o}function zc(t,e,n){var r=ka(e,n),s=Yy(e,n);return ka(Yy(r,t),s)}function tx(t){return+(t>0)-+(t<0)}function nx(t,e){return Cs(e,function(n){t=t.replace("%s",""+n)}),t}function HS(t){return t<10?"0"+t:""+t}var aO={};function fae(t){return""+t+HS(aO[t]=(aO[t]||0)+1)}function Iz(){var t=[];function e(a,l,c,d){s(a,l,function(u,f,g){var E="addEventListener"in u,S=E?u.removeEventListener.bind(u,f,c,d):u.removeListener.bind(u,c);E?u.addEventListener(f,c,d):u.addListener(c),t.push([u,f,g,c,S])})}function n(a,l,c){s(a,l,function(d,u,f){t=t.filter(function(g){return g[0]===d&&g[1]===u&&g[2]===f&&(!c||g[3]===c)?(g[4](),!1):!0})})}function r(a,l,c){var d,u=!0;return typeof CustomEvent=="function"?d=new CustomEvent(l,{bubbles:u,detail:c}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(l,u,!1,c)),a.dispatchEvent(d),d}function s(a,l,c){Cs(a,function(d){d&&Cs(l,function(u){u.split(" ").forEach(function(f){var g=f.split(".");c(d,g[0],g[1])})})})}function o(){t.forEach(function(a){a[4]()}),Fi(t)}return{bind:e,unbind:n,dispatch:r,destroy:o}}var Wa="mounted",rx="ready",Di="move",yu="moved",GS="click",Mz="active",Lz="inactive",zz="visible",qz="hidden",Dn="refresh",Rr="updated",Gd="resize",fv="resized",jz="drag",$z="dragging",Bz="dragged",hv="scroll",ac="scrolled",hae="overflow",WS="destroy",Uz="arrows:mounted",Yz="arrows:updated",Hz="pagination:mounted",Gz="pagination:updated",VS="navigation:mounted",KS="autoplay:play",Wz="autoplay:playing",ZS="autoplay:pause",JS="lazyload:loaded",Vz="sk",Kz="sh",Gy="ei";function vn(t){var e=t?t.event.bus:document.createDocumentFragment(),n=Iz();function r(o,a){n.bind(e,Rp(o).join(" "),function(l){a.apply(a,qS(l.detail)?l.detail:[])})}function s(o){n.dispatch(e,o,Ga(arguments,1))}return t&&t.event.on(WS,n.destroy),jh(n,{bus:e,on:r,off:Wt(n.unbind,e),emit:s})}function pv(t,e,n,r){var s=Date.now,o,a=0,l,c=!0,d=0;function u(){if(!c){if(a=t?ka((s()-o)/t,1):1,n&&n(a),a>=1&&(e(),o=s(),r&&++d>=r))return g();l=sO(u)}}function f(h){h||S(),o=s()-(h?a*t:0),c=!1,l=sO(u)}function g(){c=!0}function E(){o=s(),a=0,n&&n(a)}function S(){l&&cancelAnimationFrame(l),a=0,l=0,c=!0}function w(h){t=h}function _(){return c}return{start:f,rewind:E,pause:g,cancel:S,set:w,isPaused:_}}function pae(t){var e=t;function n(s){e=s}function r(s){return $S(Rp(s),e)}return{set:n,is:r}}function mae(t,e){var n=pv(e||0,t,null,1);return function(){n.isPaused()&&n.start()}}function gae(t,e,n){var r=t.state,s=n.breakpoints||{},o=n.reducedMotion||{},a=Iz(),l=[];function c(){var S=n.mediaQuery==="min";qh(s).sort(function(w,_){return S?+w-+_:+_-+w}).forEach(function(w){u(s[w],"("+(S?"min":"max")+"-width:"+w+"px)")}),u(o,rO),f()}function d(S){S&&a.destroy()}function u(S,w){var _=matchMedia(w);a.bind(_,"change",f),l.push([S,_])}function f(){var S=r.is(Uy),w=n.direction,_=l.reduce(function(h,m){return aa(h,m[1].matches?m[0]:{})},{});oO(n),E(_),n.destroy?t.destroy(n.destroy==="completely"):S?(d(!0),t.mount()):w!==n.direction&&t.refresh()}function g(S){matchMedia(rO).matches&&(S?aa(n,o):oO(n,qh(o)))}function E(S,w,_){aa(n,S),w&&aa(Object.getPrototypeOf(n),S),(_||!r.is(rd))&&t.emit(Rr,n)}return{setup:c,destroy:d,reduce:g,set:E}}var mv="Arrow",gv=mv+"Left",yv=mv+"Right",Zz=mv+"Up",Jz=mv+"Down",lO="rtl",bv="ttb",E_={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Zz,yv],ArrowRight:[Jz,gv]};function yae(t,e,n){function r(o,a,l){l=l||n.direction;var c=l===lO&&!a?1:l===bv?0:-1;return E_[o]&&E_[o][c]||o.replace(/width|left|right/i,function(d,u){var f=E_[d.toLowerCase()][c]||d;return u>0?f.charAt(0).toUpperCase()+f.slice(1):f})}function s(o){return o*(n.direction===lO?1:-1)}return{resolve:r,orient:s}}var bi="role",Cd="tabindex",bae="disabled",ro="aria-",Dp=ro+"controls",Xz=ro+"current",cO=ro+"selected",bs=ro+"label",XS=ro+"labelledby",Qz=ro+"hidden",QS=ro+"orientation",Uh=ro+"roledescription",dO=ro+"live",uO=ro+"busy",fO=ro+"atomic",eA=[bi,Cd,bae,Dp,Xz,bs,XS,Qz,QS,Uh],Oo=Fp+"__",Va="is-",S_=Fp,hO=Oo+"track",vae=Oo+"list",vv=Oo+"slide",eq=vv+"--clone",_ae=vv+"__container",tA=Oo+"arrows",_v=Oo+"arrow",tq=_v+"--prev",nq=_v+"--next",wv=Oo+"pagination",rq=wv+"__page",wae=Oo+"progress",xae=wae+"__bar",Cae=Oo+"toggle",Eae=Oo+"spinner",Sae=Oo+"sr",Aae=Va+"initialized",Jl=Va+"active",sq=Va+"prev",oq=Va+"next",sx=Va+"visible",ox=Va+"loading",iq=Va+"focus-in",aq=Va+"overflow",Nae=[Jl,sx,sq,oq,ox,iq,aq],Rae={slide:vv,clone:eq,arrows:tA,arrow:_v,prev:tq,next:nq,pagination:wv,page:rq,spinner:Eae};function Pae(t,e){if(Rz(t.closest))return t.closest(e);for(var n=t;n&&n.nodeType===1&&!zh(n,e);)n=n.parentElement;return n}var Oae=5,pO=200,lq="touchstart mousedown",A_="touchmove mousemove",N_="touchend touchcancel mouseup click";function Fae(t,e,n){var r=vn(t),s=r.on,o=r.bind,a=t.root,l=n.i18n,c={},d=[],u=[],f=[],g,E,S;function w(){A(),k(),m()}function _(){s(Dn,h),s(Dn,w),s(Rr,m),o(document,lq+" keydown",function(N){S=N.type==="keydown"},{capture:!0}),o(a,"focusin",function(){ai(a,iq,!!S)})}function h(N){var y=eA.concat("style");Fi(d),li(a,u),li(g,f),Eo([g,E],y),Eo(a,N?y:["style",Uh])}function m(){li(a,u),li(g,f),u=O(S_),f=O(hO),Co(a,u),Co(g,f),lt(a,bs,n.label),lt(a,XS,n.labelledby)}function A(){g=R("."+hO),E=Op(g,"."+vae),Bf(g&&E,"A track/list element is missing."),Eg(d,Oz(E,"."+vv+":not(."+eq+")")),Tl({arrows:tA,pagination:wv,prev:tq,next:nq,bar:xae,toggle:Cae},function(N,y){c[y]=R("."+N)}),jh(c,{root:a,track:g,list:E,slides:d})}function k(){var N=a.id||fae(Fp),y=n.role;a.id=N,g.id=g.id||N+"-track",E.id=E.id||N+"-list",!Gs(a,bi)&&a.tagName!=="SECTION"&&y&<(a,bi,y),lt(a,Uh,l.carousel),lt(E,bi,"presentation")}function R(N){var y=kz(a,N);return y&&Pae(y,"."+S_)===a?y:void 0}function O(N){return[N+"--"+n.type,N+"--"+n.direction,n.drag&&N+"--draggable",n.isNavigation&&N+"--nav",N===S_&&Jl]}return jh(c,{setup:w,mount:_,destroy:h})}var Wd="slide",bu="loop",kp="fade";function Dae(t,e,n,r){var s=vn(t),o=s.on,a=s.emit,l=s.bind,c=t.Components,d=t.root,u=t.options,f=u.isNavigation,g=u.updateOnMove,E=u.i18n,S=u.pagination,w=u.slideFocus,_=c.Direction.resolve,h=Gs(r,"style"),m=Gs(r,bs),A=n>-1,k=Op(r,"."+_ae),R;function O(){A||(r.id=d.id+"-slide"+HS(e+1),lt(r,bi,S?"tabpanel":"group"),lt(r,Uh,E.slide),lt(r,bs,m||nx(E.slideLabel,[e+1,t.length]))),N()}function N(){l(r,"click",Wt(a,GS,H)),l(r,"keydown",Wt(a,Vz,H)),o([yu,Kz,ac],P),o(VS,v),g&&o(Di,b)}function y(){R=!0,s.destroy(),li(r,Nae),Eo(r,eA),lt(r,"style",h),lt(r,bs,m||"")}function v(){var j=t.splides.map(function(U){var L=U.splide.Components.Slides.getAt(e);return L?L.slide.id:""}).join(" ");lt(r,bs,nx(E.slideX,(A?n:e)+1)),lt(r,Dp,j),lt(r,bi,w?"button":""),w&&Eo(r,Uh)}function b(){R||P()}function P(){if(!R){var j=t.index;F(),I(),ai(r,sq,e===j-1),ai(r,oq,e===j+1)}}function F(){var j=q();j!==iO(r,Jl)&&(ai(r,Jl,j),lt(r,Xz,f&&j||""),a(j?Mz:Lz,H))}function I(){var j=W(),U=!j&&(!q()||A);if(t.state.is([gu,Ap])||lt(r,Qz,U||""),lt(US(r,u.focusableNodes||""),Cd,U?-1:""),w&<(r,Cd,U?-1:0),j!==iO(r,sx)&&(ai(r,sx,j),a(j?zz:qz,H)),!j&&document.activeElement===r){var L=c.Slides.getAt(t.index);L&&Fz(L.slide)}}function T(j,U,L){js(L&&k||r,j,U)}function q(){var j=t.index;return j===e||u.cloneStatus&&j===n}function W(){if(t.is(kp))return q();var j=gs(c.Elements.track),U=gs(r),L=_("left",!0),K=_("right",!0);return Hy(j[L])<=Bh(U[L])&&Hy(U[K])<=Bh(j[K])}function G(j,U){var L=qr(j-e);return!A&&(u.rewind||t.is(bu))&&(L=ka(L,t.length-L)),L<=U}var H={index:e,slideIndex:n,slide:r,container:k,isClone:A,mount:O,destroy:y,update:P,style:T,isWithin:G};return H}function kae(t,e,n){var r=vn(t),s=r.on,o=r.emit,a=r.bind,l=e.Elements,c=l.slides,d=l.list,u=[];function f(){g(),s(Dn,E),s(Dn,g)}function g(){c.forEach(function(P,F){w(P,F,-1)})}function E(){R(function(P){P.destroy()}),Fi(u)}function S(){R(function(P){P.update()})}function w(P,F,I){var T=Dae(t,F,I,P);T.mount(),u.push(T),u.sort(function(q,W){return q.index-W.index})}function _(P){return P?O(function(F){return!F.isClone}):u}function h(P){var F=e.Controller,I=F.toIndex(P),T=F.hasFocus()?1:n.perPage;return O(function(q){return Sg(q.index,I,I+T-1)})}function m(P){return O(P)[0]}function A(P,F){Cs(P,function(I){if(Da(I)&&(I=Dz(I)),Pz(I)){var T=c[F];T?BS(I,T):Pp(d,I),Co(I,n.classes.slide),y(I,Wt(o,Gd))}}),o(Dn)}function k(P){Zl(O(P).map(function(F){return F.slide})),o(Dn)}function R(P,F){_(F).forEach(P)}function O(P){return u.filter(Rz(P)?P:function(F){return Da(P)?zh(F.slide,P):$S(Rp(P),F.index)})}function N(P,F,I){R(function(T){T.style(P,F,I)})}function y(P,F){var I=US(P,"img"),T=I.length;T?I.forEach(function(q){a(q,"load error",function(){--T||F()})}):F()}function v(P){return P?c.length:u.length}function b(){return u.length>n.perPage}return{mount:f,destroy:E,update:S,register:w,get:_,getIn:h,getAt:m,add:A,remove:k,forEach:R,filter:O,style:N,getLength:v,isEnough:b}}function Tae(t,e,n){var r=vn(t),s=r.on,o=r.bind,a=r.emit,l=e.Slides,c=e.Direction.resolve,d=e.Elements,u=d.root,f=d.track,g=d.list,E=l.getAt,S=l.style,w,_,h;function m(){A(),o(window,"resize load",mae(Wt(a,Gd))),s([Rr,Dn],A),s(Gd,k)}function A(){w=n.direction===bv,js(u,"maxWidth",sl(n.width)),js(f,c("paddingLeft"),R(!1)),js(f,c("paddingRight"),R(!0)),k(!0)}function k(H){var j=gs(u);(H||_.width!==j.width||_.height!==j.height)&&(js(f,"height",O()),S(c("marginRight"),sl(n.gap)),S("width",y()),S("height",v(),!0),_=j,a(fv),h!==(h=G())&&(ai(u,aq,h),a(hae,h)))}function R(H){var j=n.padding,U=c(H?"right":"left");return j&&sl(j[U]||(Lh(j)?0:j))||"0px"}function O(){var H="";return w&&(H=N(),Bf(H,"height or heightRatio is missing."),H="calc("+H+" - "+R(!1)+" - "+R(!0)+")"),H}function N(){return sl(n.height||gs(g).width*n.heightRatio)}function y(){return n.autoWidth?null:sl(n.fixedWidth)||(w?"":b())}function v(){return sl(n.fixedHeight)||(w?n.autoHeight?null:b():N())}function b(){var H=sl(n.gap);return"calc((100%"+(H&&" + "+H)+")/"+(n.perPage||1)+(H&&" - "+H)+")"}function P(){return gs(g)[c("width")]}function F(H,j){var U=E(H||0);return U?gs(U.slide)[c("width")]+(j?0:q()):0}function I(H,j){var U=E(H);if(U){var L=gs(U.slide)[c("right")],K=gs(g)[c("left")];return qr(L-K)+(j?0:q())}return 0}function T(H){return I(t.length-1)-I(0)+F(0,H)}function q(){var H=E(0);return H&&parseFloat(js(H.slide,c("marginRight")))||0}function W(H){return parseFloat(js(f,c("padding"+(H?"Right":"Left"))))||0}function G(){return t.is(kp)||T(!0)>P()}return{mount:m,resize:k,listSize:P,slideSize:F,sliderSize:T,totalSize:I,getPadding:W,isOverflow:G}}var Iae=2;function Mae(t,e,n){var r=vn(t),s=r.on,o=e.Elements,a=e.Slides,l=e.Direction.resolve,c=[],d;function u(){s(Dn,f),s([Rr,Gd],E),(d=_())&&(S(d),e.Layout.resize(!0))}function f(){g(),u()}function g(){Zl(c),Fi(c),r.destroy()}function E(){var h=_();d!==h&&(d<h||!h)&&r.emit(Dn)}function S(h){var m=a.get().slice(),A=m.length;if(A){for(;m.length<h;)Eg(m,m);Eg(m.slice(-h),m.slice(0,h)).forEach(function(k,R){var O=R<h,N=w(k.slide,R);O?BS(N,m[0].slide):Pp(o.list,N),Eg(c,N),a.register(N,R-h+(O?0:A),k.index)})}}function w(h,m){var A=h.cloneNode(!0);return Co(A,n.classes.clone),A.id=t.root.id+"-clone"+HS(m+1),A}function _(){var h=n.clones;if(!t.is(bu))h=0;else if(Np(h)){var m=n[l("fixedWidth")]&&e.Layout.slideSize(0),A=m&&Bh(gs(o.track)[l("width")]/m);h=A||n[l("autoWidth")]&&t.length||n.perPage*Iae}return h}return{mount:u,destroy:g}}function Lae(t,e,n){var r=vn(t),s=r.on,o=r.emit,a=t.state.set,l=e.Layout,c=l.slideSize,d=l.getPadding,u=l.totalSize,f=l.listSize,g=l.sliderSize,E=e.Direction,S=E.resolve,w=E.orient,_=e.Elements,h=_.list,m=_.track,A;function k(){A=e.Transition,s([Wa,fv,Rr,Dn],R)}function R(){e.Controller.isBusy()||(e.Scroll.cancel(),N(t.index),e.Slides.update())}function O(U,L,K,Y){U!==L&&H(U>K)&&(P(),y(b(T(),U>K),!0)),a(gu),o(Di,L,K,U),A.start(L,function(){a(Hd),o(yu,L,K,U),Y&&Y()})}function N(U){y(I(U,!0))}function y(U,L){if(!t.is(kp)){var K=L?U:v(U);js(h,"transform","translate"+S("X")+"("+K+"px)"),U!==K&&o(Kz)}}function v(U){if(t.is(bu)){var L=F(U),K=L>e.Controller.getEnd(),Y=L<0;(Y||K)&&(U=b(U,K))}return U}function b(U,L){var K=U-G(L),Y=g();return U-=w(Y*(Bh(qr(K)/Y)||1))*(L?1:-1),U}function P(){y(T(),!0),A.cancel()}function F(U){for(var L=e.Slides.get(),K=0,Y=1/0,te=0;te<L.length;te++){var J=L[te].index,Q=qr(I(J,!0)-U);if(Q<=Y)Y=Q,K=J;else break}return K}function I(U,L){var K=w(u(U-1)-W(U));return L?q(K):K}function T(){var U=S("left");return gs(h)[U]-gs(m)[U]+w(d(!1))}function q(U){return n.trimSpace&&t.is(Wd)&&(U=zc(U,0,w(g(!0)-f()))),U}function W(U){var L=n.focus;return L==="center"?(f()-c(U,!0))/2:+L*c(U)||0}function G(U){return I(U?e.Controller.getEnd():0,!!n.trimSpace)}function H(U){var L=w(b(T(),U));return U?L>=0:L<=h[S("scrollWidth")]-gs(m)[S("width")]}function j(U,L){L=Np(L)?T():L;var K=U!==!0&&w(L)<w(G(!1)),Y=U!==!1&&w(L)>w(G(!0));return K||Y}return{mount:k,move:O,jump:N,translate:y,shift:b,cancel:P,toIndex:F,toPosition:I,getPosition:T,getLimit:G,exceededLimit:j,reposition:R}}function zae(t,e,n){var r=vn(t),s=r.on,o=r.emit,a=e.Move,l=a.getPosition,c=a.getLimit,d=a.toPosition,u=e.Slides,f=u.isEnough,g=u.getLength,E=n.omitEnd,S=t.is(bu),w=t.is(Wd),_=Wt(T,!1),h=Wt(T,!0),m=n.start||0,A,k=m,R,O,N;function y(){v(),s([Rr,Dn,Gy],v),s(fv,b)}function v(){R=g(!0),O=n.perMove,N=n.perPage,A=H();var Q=zc(m,0,E?A:R-1);Q!==m&&(m=Q,a.reposition())}function b(){A!==H()&&o(Gy)}function P(Q,oe,pe){if(!J()){var ye=I(Q),Pe=G(ye);Pe>-1&&(oe||Pe!==m)&&(K(Pe),a.move(ye,Pe,k,pe))}}function F(Q,oe,pe,ye){e.Scroll.scroll(Q,oe,pe,function(){var Pe=G(a.toIndex(l()));K(E?ka(Pe,A):Pe),ye&&ye()})}function I(Q){var oe=m;if(Da(Q)){var pe=Q.match(/([+\-<>])(\d+)?/)||[],ye=pe[1],Pe=pe[2];ye==="+"||ye==="-"?oe=q(m+ +(""+ye+(+Pe||1)),m):ye===">"?oe=Pe?j(+Pe):_(!0):ye==="<"&&(oe=h(!0))}else oe=S?Q:zc(Q,0,A);return oe}function T(Q,oe){var pe=O||(te()?1:N),ye=q(m+pe*(Q?-1:1),m,!(O||te()));return ye===-1&&w&&!Tz(l(),c(!Q),1)?Q?0:A:oe?ye:G(ye)}function q(Q,oe,pe){if(f()||te()){var ye=W(Q);ye!==Q&&(oe=Q,Q=ye,pe=!1),Q<0||Q>A?!O&&(Sg(0,Q,oe,!0)||Sg(A,oe,Q,!0))?Q=j(U(Q)):S?Q=pe?Q<0?-(R%N||N):R:Q:n.rewind?Q=Q<0?A:0:Q=-1:pe&&Q!==oe&&(Q=j(U(oe)+(Q<oe?-1:1)))}else Q=-1;return Q}function W(Q){if(w&&n.trimSpace==="move"&&Q!==m)for(var oe=l();oe===d(Q,!0)&&Sg(Q,0,t.length-1,!n.rewind);)Q<m?--Q:++Q;return Q}function G(Q){return S?(Q+R)%R||0:Q}function H(){for(var Q=R-(te()||S&&O?1:N);E&&Q-- >0;)if(d(R-1,!0)!==d(Q,!0)){Q++;break}return zc(Q,0,R-1)}function j(Q){return zc(te()?Q:N*Q,0,A)}function U(Q){return te()?ka(Q,A):Hy((Q>=A?R-1:Q)/N)}function L(Q){var oe=a.toIndex(Q);return w?zc(oe,0,A):oe}function K(Q){Q!==m&&(k=m,m=Q)}function Y(Q){return Q?k:m}function te(){return!Np(n.focus)||n.isNavigation}function J(){return t.state.is([gu,Ap])&&!!n.waitForTransition}return{mount:y,go:P,scroll:F,getNext:_,getPrev:h,getAdjacent:T,getEnd:H,setIndex:K,getIndex:Y,toIndex:j,toPage:U,toDest:L,hasFocus:te,isBusy:J}}var qae="http://www.w3.org/2000/svg",jae="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",Fm=40;function $ae(t,e,n){var r=vn(t),s=r.on,o=r.bind,a=r.emit,l=n.classes,c=n.i18n,d=e.Elements,u=e.Controller,f=d.arrows,g=d.track,E=f,S=d.prev,w=d.next,_,h,m={};function A(){R(),s(Rr,k)}function k(){O(),A()}function R(){var F=n.arrows;F&&!(S&&w)&&v(),S&&w&&(jh(m,{prev:S,next:w}),$h(E,F?"":"none"),Co(E,h=tA+"--"+n.direction),F&&(N(),P(),lt([S,w],Dp,g.id),a(Uz,S,w)))}function O(){r.destroy(),li(E,h),_?(Zl(f?[S,w]:E),S=w=null):Eo([S,w],eA)}function N(){s([Wa,yu,Dn,ac,Gy],P),o(w,"click",Wt(y,">")),o(S,"click",Wt(y,"<"))}function y(F){u.go(F,!0)}function v(){E=f||xd("div",l.arrows),S=b(!0),w=b(!1),_=!0,Pp(E,[S,w]),!f&&BS(E,g)}function b(F){var I='<button class="'+l.arrow+" "+(F?l.prev:l.next)+'" type="button"><svg xmlns="'+qae+'" viewBox="0 0 '+Fm+" "+Fm+'" width="'+Fm+'" height="'+Fm+'" focusable="false"><path d="'+(n.arrowPath||jae)+'" />';return Dz(I)}function P(){if(S&&w){var F=t.index,I=u.getPrev(),T=u.getNext(),q=I>-1&&F<I?c.last:c.prev,W=T>-1&&F>T?c.first:c.next;S.disabled=I<0,w.disabled=T<0,lt(S,bs,q),lt(w,bs,W),a(Yz,S,w,I,T)}}return{arrows:m,mount:A,destroy:O,update:P}}var Bae=YS+"-interval";function Uae(t,e,n){var r=vn(t),s=r.on,o=r.bind,a=r.emit,l=pv(n.interval,t.go.bind(t,">"),N),c=l.isPaused,d=e.Elements,u=e.Elements,f=u.root,g=u.toggle,E=n.autoplay,S,w,_=E==="pause";function h(){E&&(m(),g&<(g,Dp,d.track.id),_||A(),O())}function m(){n.pauseOnHover&&o(f,"mouseenter mouseleave",function(v){S=v.type==="mouseenter",R()}),n.pauseOnFocus&&o(f,"focusin focusout",function(v){w=v.type==="focusin",R()}),g&&o(g,"click",function(){_?A():k(!0)}),s([Di,hv,Dn],l.rewind),s(Di,y)}function A(){c()&&e.Slides.isEnough()&&(l.start(!n.resetProgress),w=S=_=!1,O(),a(KS))}function k(v){v===void 0&&(v=!0),_=!!v,O(),c()||(l.pause(),a(ZS))}function R(){_||(S||w?k(!1):A())}function O(){g&&(ai(g,Jl,!_),lt(g,bs,n.i18n[_?"play":"pause"]))}function N(v){var b=d.bar;b&&js(b,"width",v*100+"%"),a(Wz,v)}function y(v){var b=e.Slides.getAt(v);l.set(b&&+Gs(b.slide,Bae)||n.interval)}return{mount:h,destroy:l.cancel,play:A,pause:k,isPaused:c}}function Yae(t,e,n){var r=vn(t),s=r.on;function o(){n.cover&&(s(JS,Wt(l,!0)),s([Wa,Rr,Dn],Wt(a,!0)))}function a(c){e.Slides.forEach(function(d){var u=Op(d.container||d.slide,"img");u&&u.src&&l(c,u,d)})}function l(c,d,u){u.style("background",c?'center/cover no-repeat url("'+d.src+'")':"",!0),$h(d,c?"none":"")}return{mount:o,destroy:Wt(a,!1)}}var Hae=10,Gae=600,Wae=.6,Vae=1.5,Kae=800;function Zae(t,e,n){var r=vn(t),s=r.on,o=r.emit,a=t.state.set,l=e.Move,c=l.getPosition,d=l.getLimit,u=l.exceededLimit,f=l.translate,g=t.is(Wd),E,S,w=1;function _(){s(Di,k),s([Rr,Dn],R)}function h(N,y,v,b,P){var F=c();if(k(),v&&(!g||!u())){var I=e.Layout.sliderSize(),T=tx(N)*I*Hy(qr(N)/I)||0;N=l.toPosition(e.Controller.toDest(N%I))+T}var q=Tz(F,N,1);w=1,y=q?0:y||Yy(qr(N-F)/Vae,Kae),S=b,E=pv(y,m,Wt(A,F,N,P),1),a(Ap),o(hv),E.start()}function m(){a(Hd),S&&S(),o(ac)}function A(N,y,v,b){var P=c(),F=N+(y-N)*O(b),I=(F-P)*w;f(P+I),g&&!v&&u()&&(w*=Wae,qr(I)<Hae&&h(d(u(!0)),Gae,!1,S,!0))}function k(){E&&E.cancel()}function R(){E&&!E.isPaused()&&(k(),m())}function O(N){var y=n.easingFunc;return y?y(N):1-Math.pow(1-N,4)}return{mount:_,destroy:k,scroll:h,cancel:R}}var qc={passive:!1,capture:!0};function Jae(t,e,n){var r=vn(t),s=r.on,o=r.emit,a=r.bind,l=r.unbind,c=t.state,d=e.Move,u=e.Scroll,f=e.Controller,g=e.Elements.track,E=e.Media.reduce,S=e.Direction,w=S.resolve,_=S.orient,h=d.getPosition,m=d.exceededLimit,A,k,R,O,N,y=!1,v,b,P;function F(){a(g,A_,Qw,qc),a(g,N_,Qw,qc),a(g,lq,T,qc),a(g,"click",G,{capture:!0}),a(g,"dragstart",Ko),s([Wa,Rr],I)}function I(){var ie=n.drag;He(!ie),O=ie==="free"}function T(ie){if(v=!1,!b){var Se=Pe(ie);ye(ie.target)&&(Se||!ie.button)&&(f.isBusy()?Ko(ie,!0):(P=Se?g:window,N=c.is([gu,Ap]),R=null,a(P,A_,q,qc),a(P,N_,W,qc),d.cancel(),u.cancel(),H(ie)))}}function q(ie){if(c.is(Cg)||(c.set(Cg),o(jz)),ie.cancelable)if(N){d.translate(A+pe(te(ie)));var Se=J(ie)>pO,he=y!==(y=m());(Se||he)&&H(ie),v=!0,o($z),Ko(ie)}else L(ie)&&(N=U(ie),Ko(ie))}function W(ie){c.is(Cg)&&(c.set(Hd),o(Bz)),N&&(j(ie),Ko(ie)),l(P,A_,q),l(P,N_,W),N=!1}function G(ie){!b&&v&&Ko(ie,!0)}function H(ie){R=k,k=ie,A=h()}function j(ie){var Se=K(ie),he=Y(Se),Je=n.rewind&&n.rewindByDrag;E(!1),O?f.scroll(he,0,n.snap):t.is(kp)?f.go(_(tx(Se))<0?Je?"<":"-":Je?">":"+"):t.is(Wd)&&y&&Je?f.go(m(!0)?">":"<"):f.go(f.toDest(he),!0),E(!0)}function U(ie){var Se=n.dragMinThreshold,he=Lh(Se),Je=he&&Se.mouse||0,Ct=(he?Se.touch:+Se)||10;return qr(te(ie))>(Pe(ie)?Ct:Je)}function L(ie){return qr(te(ie))>qr(te(ie,!0))}function K(ie){if(t.is(bu)||!y){var Se=J(ie);if(Se&&Se<pO)return te(ie)/Se}return 0}function Y(ie){return h()+tx(ie)*ka(qr(ie)*(n.flickPower||600),O?1/0:e.Layout.listSize()*(n.flickMaxPages||1))}function te(ie,Se){return oe(ie,Se)-oe(Q(ie),Se)}function J(ie){return ex(ie)-ex(Q(ie))}function Q(ie){return k===ie&&R||k}function oe(ie,Se){return(Pe(ie)?ie.changedTouches[0]:ie)["page"+w(Se?"Y":"X")]}function pe(ie){return ie/(y&&t.is(Wd)?Oae:1)}function ye(ie){var Se=n.noDrag;return!zh(ie,"."+rq+", ."+_v)&&(!Se||!zh(ie,Se))}function Pe(ie){return typeof TouchEvent<"u"&&ie instanceof TouchEvent}function Me(){return N}function He(ie){b=ie}return{mount:F,disable:He,isDragging:Me}}var Xae={Spacebar:" ",Right:yv,Left:gv,Up:Zz,Down:Jz};function nA(t){return t=Da(t)?t:t.key,Xae[t]||t}var mO="keydown";function Qae(t,e,n){var r=vn(t),s=r.on,o=r.bind,a=r.unbind,l=t.root,c=e.Direction.resolve,d,u;function f(){g(),s(Rr,E),s(Rr,g),s(Di,w)}function g(){var h=n.keyboard;h&&(d=h==="global"?window:l,o(d,mO,_))}function E(){a(d,mO)}function S(h){u=h}function w(){var h=u;u=!0,Nz(function(){u=h})}function _(h){if(!u){var m=nA(h);m===c(gv)?t.go("<"):m===c(yv)&&t.go(">")}}return{mount:f,destroy:E,disable:S}}var Uf=YS+"-lazy",Ag=Uf+"-srcset",ele="["+Uf+"], ["+Ag+"]";function tle(t,e,n){var r=vn(t),s=r.on,o=r.off,a=r.bind,l=r.emit,c=n.lazyLoad==="sequential",d=[yu,ac],u=[];function f(){n.lazyLoad&&(g(),s(Dn,g))}function g(){Fi(u),E(),c?h():(o(d),s(d,S),S())}function E(){e.Slides.forEach(function(m){US(m.slide,ele).forEach(function(A){var k=Gs(A,Uf),R=Gs(A,Ag);if(k!==A.src||R!==A.srcset){var O=n.classes.spinner,N=A.parentElement,y=Op(N,"."+O)||xd("span",O,N);u.push([A,m,y]),A.src||$h(A,"none")}})})}function S(){u=u.filter(function(m){var A=n.perPage*((n.preloadPages||1)+1)-1;return m[1].isWithin(t.index,A)?w(m):!0}),u.length||o(d)}function w(m){var A=m[0];Co(m[1].slide,ox),a(A,"load error",Wt(_,m)),lt(A,"src",Gs(A,Uf)),lt(A,"srcset",Gs(A,Ag)),Eo(A,Uf),Eo(A,Ag)}function _(m,A){var k=m[0],R=m[1];li(R.slide,ox),A.type!=="error"&&(Zl(m[2]),$h(k,""),l(JS,k,R),l(Gd)),c&&h()}function h(){u.length&&w(u.shift())}return{mount:f,destroy:Wt(Fi,u),check:S}}function nle(t,e,n){var r=vn(t),s=r.on,o=r.emit,a=r.bind,l=e.Slides,c=e.Elements,d=e.Controller,u=d.hasFocus,f=d.getIndex,g=d.go,E=e.Direction.resolve,S=c.pagination,w=[],_,h;function m(){A(),s([Rr,Dn,Gy],m);var b=n.pagination;S&&$h(S,b?"":"none"),b&&(s([Di,hv,ac],v),k(),v(),o(Hz,{list:_,items:w},y(t.index)))}function A(){_&&(Zl(S?Ga(_.children):_),li(_,h),Fi(w),_=null),r.destroy()}function k(){var b=t.length,P=n.classes,F=n.i18n,I=n.perPage,T=u()?d.getEnd()+1:Bh(b/I);_=S||xd("ul",P.pagination,c.track.parentElement),Co(_,h=wv+"--"+N()),lt(_,bi,"tablist"),lt(_,bs,F.select),lt(_,QS,N()===bv?"vertical":"");for(var q=0;q<T;q++){var W=xd("li",null,_),G=xd("button",{class:P.page,type:"button"},W),H=l.getIn(q).map(function(U){return U.slide.id}),j=!u()&&I>1?F.pageX:F.slideX;a(G,"click",Wt(R,q)),n.paginationKeyboard&&a(G,"keydown",Wt(O,q)),lt(W,bi,"presentation"),lt(G,bi,"tab"),lt(G,Dp,H.join(" ")),lt(G,bs,nx(j,q+1)),lt(G,Cd,-1),w.push({li:W,button:G,page:q})}}function R(b){g(">"+b,!0)}function O(b,P){var F=w.length,I=nA(P),T=N(),q=-1;I===E(yv,!1,T)?q=++b%F:I===E(gv,!1,T)?q=(--b+F)%F:I==="Home"?q=0:I==="End"&&(q=F-1);var W=w[q];W&&(Fz(W.button),g(">"+q),Ko(P,!0))}function N(){return n.paginationDirection||n.direction}function y(b){return w[d.toPage(b)]}function v(){var b=y(f(!0)),P=y(f());if(b){var F=b.button;li(F,Jl),Eo(F,cO),lt(F,Cd,-1)}if(P){var I=P.button;Co(I,Jl),lt(I,cO,!0),lt(I,Cd,"")}o(Gz,{list:_,items:w},b,P)}return{items:w,mount:m,destroy:A,getAt:y,update:v}}var rle=[" ","Enter"];function sle(t,e,n){var r=n.isNavigation,s=n.slideFocus,o=[];function a(){t.splides.forEach(function(S){S.isParent||(d(t,S.splide),d(S.splide,t))}),r&&u()}function l(){o.forEach(function(S){S.destroy()}),Fi(o)}function c(){l(),a()}function d(S,w){var _=vn(S);_.on(Di,function(h,m,A){w.go(w.is(bu)?A:h)}),o.push(_)}function u(){var S=vn(t),w=S.on;w(GS,g),w(Vz,E),w([Wa,Rr],f),o.push(S),S.emit(VS,t.splides)}function f(){lt(e.Elements.list,QS,n.direction===bv?"vertical":"")}function g(S){t.go(S.index)}function E(S,w){$S(rle,nA(w))&&(g(S),Ko(w))}return{setup:Wt(e.Media.set,{slideFocus:Np(s)?r:s},!0),mount:a,destroy:l,remount:c}}function ole(t,e,n){var r=vn(t),s=r.bind,o=0;function a(){n.wheel&&s(e.Elements.track,"wheel",l,qc)}function l(d){if(d.cancelable){var u=d.deltaY,f=u<0,g=ex(d),E=n.wheelMinThreshold||0,S=n.wheelSleep||0;qr(u)>E&&g-o>S&&(t.go(f?"<":">"),o=g),c(f)&&Ko(d)}}function c(d){return!n.releaseWheel||t.state.is(gu)||e.Controller.getAdjacent(d)!==-1}return{mount:a}}var ile=90;function ale(t,e,n){var r=vn(t),s=r.on,o=e.Elements.track,a=n.live&&!n.isNavigation,l=xd("span",Sae),c=pv(ile,Wt(u,!1));function d(){a&&(g(!e.Autoplay.isPaused()),lt(o,fO,!0),l.textContent="…",s(KS,Wt(g,!0)),s(ZS,Wt(g,!1)),s([yu,ac],Wt(u,!0)))}function u(E){lt(o,uO,E),E?(Pp(o,l),c.start()):(Zl(l),c.cancel())}function f(){Eo(o,[dO,fO,uO]),Zl(l)}function g(E){a&<(o,dO,E?"off":"polite")}return{mount:d,disable:g,destroy:f}}var lle=Object.freeze({__proto__:null,Media:gae,Direction:yae,Elements:Fae,Slides:kae,Layout:Tae,Clones:Mae,Move:Lae,Controller:zae,Arrows:$ae,Autoplay:Uae,Cover:Yae,Scroll:Zae,Drag:Jae,Keyboard:Qae,LazyLoad:tle,Pagination:nle,Sync:sle,Wheel:ole,Live:ale}),cle={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},dle={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Rae,i18n:cle,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ule(t,e,n){var r=e.Slides;function s(){vn(t).on([Wa,Dn],o)}function o(){r.forEach(function(l){l.style("transform","translateX(-"+100*l.index+"%)")})}function a(l,c){r.style("transition","opacity "+n.speed+"ms "+n.easing),Nz(c)}return{mount:s,start:a,cancel:Qw}}function fle(t,e,n){var r=e.Move,s=e.Controller,o=e.Scroll,a=e.Elements.list,l=Wt(js,a,"transition"),c;function d(){vn(t).bind(a,"transitionend",function(E){E.target===a&&c&&(f(),c())})}function u(E,S){var w=r.toPosition(E,!0),_=r.getPosition(),h=g(E);qr(w-_)>=1&&h>=1?n.useScroll?o.scroll(w,h,!1,S):(l("transform "+h+"ms "+n.easing),r.translate(w,!0),c=S):(r.jump(E),S())}function f(){l(""),o.cancel()}function g(E){var S=n.rewindSpeed;if(t.is(Wd)&&S){var w=s.getIndex(!0),_=s.getEnd();if(w===0&&E>=_||w>=_&&E===0)return S}return n.speed}return{mount:d,start:u,cancel:f}}var hle=function(){function t(n,r){this.event=vn(),this.Components={},this.state=pae(rd),this.splides=[],this._o={},this._E={};var s=Da(n)?kz(document,n):n;Bf(s,s+" is invalid."),this.root=s,r=aa({label:Gs(s,bs)||"",labelledby:Gs(s,XS)||""},dle,t.defaults,r||{});try{aa(r,JSON.parse(Gs(s,YS)))}catch{Bf(!1,"Invalid JSON")}this._o=Object.create(aa({},r))}var e=t.prototype;return e.mount=function(r,s){var o=this,a=this.state,l=this.Components;Bf(a.is([rd,Uy]),"Already mounted!"),a.set(rd),this._C=l,this._T=s||this._T||(this.is(kp)?ule:fle),this._E=r||this._E;var c=jh({},lle,this._E,{Transition:this._T});return Tl(c,function(d,u){var f=d(o,l,o._o);l[u]=f,f.setup&&f.setup()}),Tl(l,function(d){d.mount&&d.mount()}),this.emit(Wa),Co(this.root,Aae),a.set(Hd),this.emit(rx),this},e.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(Hd)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},e.go=function(r){return this._C.Controller.go(r),this},e.on=function(r,s){return this.event.on(r,s),this},e.off=function(r){return this.event.off(r),this},e.emit=function(r){var s;return(s=this.event).emit.apply(s,[r].concat(Ga(arguments,1))),this},e.add=function(r,s){return this._C.Slides.add(r,s),this},e.remove=function(r){return this._C.Slides.remove(r),this},e.is=function(r){return this._o.type===r},e.refresh=function(){return this.emit(Dn),this},e.destroy=function(r){r===void 0&&(r=!0);var s=this.event,o=this.state;return o.is(rd)?vn(this).on(rx,this.destroy.bind(this,r)):(Tl(this._C,function(a){a.destroy&&a.destroy(r)},!0),s.emit(WS),s.destroy(),r&&Fi(this.splides),o.set(Uy)),this},cae(t,[{key:"options",get:function(){return this._o},set:function(r){this._C.Media.set(r,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),t}(),rA=hle;rA.defaults={};rA.STATES=uae;var gO=[[Wa,"onMounted"],[rx,"onReady"],[Di,"onMove"],[yu,"onMoved"],[GS,"onClick"],[Mz,"onActive"],[Lz,"onInactive"],[zz,"onVisible"],[qz,"onHidden"],[Dn,"onRefresh"],[Rr,"onUpdated"],[Gd,"onResize"],[fv,"onResized"],[jz,"onDrag"],[$z,"onDragging"],[Bz,"onDragged"],[hv,"onScroll"],[ac,"onScrolled"],[WS,"onDestroy"],[Uz,"onArrowsMounted"],[Yz,"onArrowsUpdated"],[Hz,"onPaginationMounted"],[Gz,"onPaginationUpdated"],[VS,"onNavigationMounted"],[KS,"onAutoplayPlay"],[Wz,"onAutoplayPlaying"],[ZS,"onAutoplayPause"],[JS,"onLazyLoadLoaded"]];function sA(...t){return t.filter(Boolean).join(" ")}function Wy(t){return t!==null&&typeof t=="object"}function ix(t,e){if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&!t.some((n,r)=>!ix(n,e[r]));if(Wy(t)&&Wy(e)){const n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&!n.some(s=>!Object.prototype.hasOwnProperty.call(e,s)||!ix(t[s],e[s]))}return t===e}function ple(t,e){return t.length===e.length&&!t.some((n,r)=>n!==e[r])}function mle(t,e){if(t){const n=Object.keys(t);for(let r=0;r<n.length;r++){const s=n[r];if(s!=="__proto__"&&e(t[s],s)===!1)break}}return t}function ax(t,e){const n=t;return mle(e,(r,s)=>{Array.isArray(r)?n[s]=r.slice():Wy(r)?n[s]=ax(Wy(n[s])?n[s]:{},r):n[s]=r}),n}var gle=({children:t,className:e,...n})=>Fe.createElement("div",{className:sA("splide__track",e),...n},Fe.createElement("ul",{className:"splide__list"},t)),Pc=class extends Fe.Component{constructor(){super(...arguments),this.splideRef=Fe.createRef(),this.slides=[]}componentDidMount(){const{options:t,extensions:e,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new rA(r,t),this.bind(this.splide),this.splide.mount(e,n),this.options=ax({},t||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:t}=this.props;t&&!ix(this.options,t)&&(this.splide.options=t,this.options=ax({},t));const e=this.getSlides();ple(this.slides,e)||(this.splide.refresh(),this.slides=e)}sync(t){var e;(e=this.splide)==null||e.sync(t)}go(t){var e;(e=this.splide)==null||e.go(t)}getSlides(){var t;if(this.splide){const e=(t=this.splide.Components.Elements)==null?void 0:t.list.children;return e&&Array.prototype.slice.call(e)||[]}return[]}bind(t){gO.forEach(([e,n])=>{const r=this.props[n];typeof r=="function"&&t.on(e,(...s)=>{r(t,...s)})})}omit(t,e){return e.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&delete t[n]}),t}render(){const{className:t,tag:e="div",hasTrack:n=!0,children:r,...s}=this.props;return Fe.createElement(e,{className:sA("splide",t),ref:this.splideRef,...this.omit(s,["options",...gO.map(o=>o[1])])},n?Fe.createElement(gle,null,r):r)}},Wi=({children:t,className:e,...n})=>Fe.createElement("li",{className:sA("splide__slide",e),...n},t);/*! * Splide.js * Version : 4.1.3 * License : MIT * Copyright: 2022 Naotoshi Fujita *//*! * @splidejs/splide-extension-auto-scroll * Version : 0.5.3 * License : MIT * Copyright: 2022 Naotoshi Fujita */function yle(t){t.length=0}function oA(t,e,n){return Array.prototype.slice.call(t,e,n)}function xv(t){return t.bind.apply(t,[null].concat(oA(arguments,1)))}function yO(t){return requestAnimationFrame(t)}function iA(t,e){return typeof e===t}var cq=Array.isArray;xv(iA,"function");xv(iA,"string");xv(iA,"undefined");function dq(t){return cq(t)?t:[t]}function bO(t,e){dq(t).forEach(e)}var ble=Object.keys;function vle(t,e,n){if(t){var r=ble(t);r=n?r.reverse():r;for(var s=0;s<r.length;s++){var o=r[s];if(o!=="__proto__"&&e(t[o],o)===!1)break}}return t}function _le(t){return oA(arguments,1).forEach(function(e){vle(e,function(n,r){t[r]=e[r]})}),t}var wle=Math.min;function xle(){var t=[];function e(a,l,c,d){s(a,l,function(u,f,g){var E="addEventListener"in u,S=E?u.removeEventListener.bind(u,f,c,d):u.removeListener.bind(u,c);E?u.addEventListener(f,c,d):u.addListener(c),t.push([u,f,g,c,S])})}function n(a,l,c){s(a,l,function(d,u,f){t=t.filter(function(g){return g[0]===d&&g[1]===u&&g[2]===f&&(!c||g[3]===c)?(g[4](),!1):!0})})}function r(a,l,c){var d,u=!0;return typeof CustomEvent=="function"?d=new CustomEvent(l,{bubbles:u,detail:c}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(l,u,!1,c)),a.dispatchEvent(d),d}function s(a,l,c){bO(a,function(d){d&&bO(l,function(u){u.split(" ").forEach(function(f){var g=f.split(".");c(d,g[0],g[1])})})})}function o(){t.forEach(function(a){a[4]()}),yle(t)}return{bind:e,unbind:n,dispatch:r,destroy:o}}var vO="move",_O="moved",Cle="updated",wO="drag",Ele="dragged",xO="scroll",CO="scrolled",Sle="destroy";function Ale(t){var e=t?t.event.bus:document.createDocumentFragment(),n=xle();function r(o,a){n.bind(e,dq(o).join(" "),function(l){a.apply(a,cq(l.detail)?l.detail:[])})}function s(o){n.dispatch(e,o,oA(arguments,1))}return t&&t.event.on(Sle,n.destroy),_le(n,{bus:e,on:r,off:xv(n.unbind,e),emit:s})}function uq(t,e,n,r){var s=Date.now,o,a=0,l,c=!0,d=0;function u(){if(!c){if(a=t?wle((s()-o)/t,1):1,n&&n(a),a>=1&&(e(),o=s(),r&&++d>=r))return g();yO(u)}}function f(h){!h&&S(),o=s()-(h?a*t:0),c=!1,yO(u)}function g(){c=!0}function E(){o=s(),a=0,n&&n(a)}function S(){l&&cancelAnimationFrame(l),a=0,l=0,c=!0}function w(h){t=h}function _(){return c}return{start:f,rewind:E,pause:g,cancel:S,set:w,isPaused:_}}function Nle(t,e){var n;function r(){n||(n=uq(e||0,function(){t(),n=null},null,1),n.start())}return r}var Rle="is-active",Ple="slide",Ole="fade";function fq(t,e,n){return Array.prototype.slice.call(t,e,n)}function aA(t){return t.bind(null,...fq(arguments,1))}function Cv(t,e){return typeof e===t}function lx(t){return!hq(t)&&Cv("object",t)}const Fle=Array.isArray;aA(Cv,"function");aA(Cv,"string");const Dle=aA(Cv,"undefined");function hq(t){return t===null}function kle(t){return Fle(t)?t:[t]}function Vy(t,e){kle(t).forEach(e)}function Tle(t,e,n){t&&Vy(e,r=>{r&&t.classList[n?"add":"remove"](r)})}const Ile=Object.keys;function pq(t,e,n){if(t){let r=Ile(t);r=n?r.reverse():r;for(let s=0;s<r.length;s++){const o=r[s];if(o!=="__proto__"&&e(t[o],o)===!1)break}}return t}function EO(t){return fq(arguments,1).forEach(e=>{pq(e,(n,r)=>{t[r]=e[r]})}),t}function Mle(t,e){Vy(t,n=>{Vy(e,r=>{n&&n.removeAttribute(r)})})}function mq(t,e,n){lx(e)?pq(e,(r,s)=>{mq(t,s,r)}):Vy(t,r=>{hq(n)||n===""?Mle(r,e):r.setAttribute(e,String(n))})}const{min:SO,max:AO,floor:J1e,ceil:X1e,abs:Q1e}=Math;function Lle(t,e,n){const r=SO(e,n),s=AO(e,n);return SO(AO(r,t),s)}const zle={speed:1,autoStart:!0,pauseOnHover:!0,pauseOnFocus:!0},qle={startScroll:"Start auto scroll",pauseScroll:"Pause auto scroll"};function Dm(t,e,n){const{on:r,off:s,bind:o,unbind:a}=Ale(t),{translate:l,getPosition:c,toIndex:d,getLimit:u}=e.Move,{setIndex:f,getIndex:g}=e.Controller,{orient:E}=e.Direction,{toggle:S}=e.Elements,{Live:w}=e,{root:_}=t,h=Nle(e.Arrows.update,500);let m={},A,k,R,O,N,y;function v(){const{autoScroll:Y}=n;m=EO({},zle,lx(Y)?Y:{})}function b(){t.is(Ole)||!A&&n.autoScroll!==!1&&(A=uq(0,H),F(),T())}function P(){A&&(A.cancel(),A=null,y=void 0,s([vO,wO,xO,_O,CO]),a(_,"mouseenter mouseleave focusin focusout"),a(S,"click"))}function F(){m.pauseOnHover&&o(_,"mouseenter mouseleave",Y=>{R=Y.type==="mouseenter",G()}),m.pauseOnFocus&&o(_,"focusin focusout",Y=>{O=Y.type==="focusin",G()}),m.useToggleButton&&o(S,"click",()=>{k?q():W()}),r(Cle,I),r([vO,wO,xO],()=>{N=!0,W(!1)}),r([_O,Ele,CO],()=>{N=!1,G()})}function I(){const{autoScroll:Y}=n;Y!==!1?(m=EO({},m,lx(Y)?Y:{}),b()):P(),A&&!Dle(y)&&l(y)}function T(){m.autoStart&&(document.readyState==="complete"?q():o(window,"load",q))}function q(){K()&&(A.start(!0),w.disable(!0),O=R=k=!1,L())}function W(Y=!0){k||(k=Y,L(),K()||(A.pause(),w.disable(!1)))}function G(){k||(R||O||N?W(!1):q())}function H(){const Y=c(),te=j(Y);Y!==te?(l(te),U(y=c())):(W(!1),m.rewind&&t.go(m.speed>0?0:e.Controller.getEnd())),h()}function j(Y){const te=m.speed||1;return Y+=E(te),t.is(Ple)&&(Y=Lle(Y,u(!1),u(!0))),Y}function U(Y){const{length:te}=t,J=(d(Y)+te)%te;J!==g()&&(f(J),e.Slides.update(),e.Pagination.update(),n.lazyLoad==="nearby"&&e.LazyLoad.check())}function L(){if(S){const Y=k?"startScroll":"pauseScroll";Tle(S,Rle,!k),mq(S,"aria-label",n.i18n[Y]||qle[Y])}}function K(){return!A||A.isPaused()}return{setup:v,mount:b,destroy:P,play:q,pause:W,isPaused:K}}const jle="/assets/logodos-31e268e1.png",$le=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]);C.useState([]);const[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState({background:"rgb(52, 58, 64)"}),[g,E]=C.useState([]);C.useEffect(()=>{const h=se().subtract(1,"days").startOf("day").format();se().endOf("day").format(),se().subtract(1,"days").startOf("day").format(),se().subtract(1,"days").endOf("day").format(),(async()=>{let{data:A,error:k}=await z.from("Fixture2023").select("*").eq("fecha",h).eq("organizador","Afa").eq("añoTorneo","2024").in("torneo",["PRIMERAA","PRIMERAB","PRIMERAC","PRIMERAD1","PRIMERAD2","COPAARGENTINA"]);k&&console.log("Error fetching today's partidos: ",k),d(A)})()},[]);const S=async()=>{let{data:h,error:m}=await z.from("Fixture2023").select("*").eq("fecha",se().format("YYYY-MM-DD")).eq("organizador","Afa").eq("añoTorneo","2024").in("torneo",["PRIMERAA","PRIMERAB","PRIMERAC","PRIMERAD1","PRIMERAD2","COPAARGENTINA"]);m&&console.log("Error fetching today's partidos: ",m),e(h)};C.useEffect(()=>{S();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},m=>{S()}).subscribe();return()=>{h.unsubscribe()}},[]);const w=h=>{h.target.value==="bg-dark"?f({background:"rgb(52, 58, 64)"}):h.target.value==="bg-gradient"?f({background:"rgb(1,84,150)",background:"-moz-linear-gradient(60deg, rgba(1,84,150,1) 40%, rgba(0,0,0,1) 85%)",background:"-webkit-linear-gradient(60deg, rgba(1,84,150,1) 40%, rgba(0,0,0,1) 85%)",background:"linear-gradient(60deg, rgba(1,84,150,1) 40%, rgba(0,0,0,1) 85%)",filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr="#015496",endColorstr="#000000",GradientType=1)'}):h.target.value==="bg-gradient-red"&&f({background:"rgb(172,40,29)",background:"moz-linear-gradient(60deg, rgba(172,40,29,1) 6%, rgba(0,0,0,1) 85%)",background:"-webkit-linear-gradient(60deg, rgba(172,40,29,1) 6%, rgba(0,0,0,1) 85%)",background:"linear-gradient(60deg, rgba(172,40,29,1) 6%, rgba(0,0,0,1) 85%)",filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr="#ac281d",endColorstr="#000000",GradientType=1)'})},_=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):E(h)}catch(h){console.error("Error",h.message)}};return C.useEffect(()=>{_();const h=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},m=>{_()}).subscribe();return()=>{h.unsubscribe()}},[]),p(ee,{children:[p("div",{style:{display:"flex",justifyContent:"center",marginTop:"50px"},children:[i("label",{htmlFor:"background-color-select",className:"text-white",children:"Selecciona color de fondo:"}),p("select",{id:"background-color-select",onChange:w,defaultValue:"bg-dark",children:[i("option",{value:"bg-dark",children:"Negro"}),i("option",{value:"bg-gradient",children:"Azul"}),i("option",{value:"bg-gradient-red",children:"Rojo"})]})]}),p(ae,{style:{zIndex:999,...u},children:[i("h6",{className:"text-white text-center fw-bolder bg-danger d-flex justify-content-center",style:{marginTop:"15px",height:"50px",alignContent:"center",alignItems:"center"},children:"Restulados en vivo"}),t&&Object.values(t).length===1?i(Pc,{options:{type:"slide",gap:"20px",drag:"free",arrows:!1,pagination:!1,perPage:0},children:Object.values(t).map(h=>{se(h.hora,"HH:mm").format("HH:mm");let m="";return h.estado==="Jugandose"?m=h.tiempodelpartido:h.estado==="Suspendido"?m="Susp":h.estado==="Pendiente"?m=new Date(h.hora).toLocaleString(void 0,{timeZone:"America/Argentina/Buenos_Aires",hour:"2-digit",minute:"2-digit"}):h.estado==="Finalizado"?m="Final":h.estado==="Parcial"&&(m="Parc"),i(Wi,{children:i(Ie,{children:i("tbody",{children:p("tr",{children:[p("td",{className:"text-white d-flex justify-content-end",style:{fontFamily:"Montserrat",fontSize:"1.8rem",display:"flex",alignItems:"center",borderColor:"transparent"},children:[i("span",{className:"fw-bolder",style:{marginRight:5,width:"auto",fontSize:24,backgroundColor:h.estado==="Jugandose"||h.estado==="Suspendido"?"red":h.estado==="Finalizado"||h.estado==="Parcial"?" #C0C0C0":"transparent",color:h.estado==="Finalizado"||h.estado==="Parcial"?"black":"white"},children:m}),"| ",h.equipolocal]}),i("td",{className:"text-white text-end fw-bolder",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent",color:n?"red":"inherit"},children:h.goleslocal}),i("td",{className:"text-white text-end fw-bolder",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent"},children:i("span",{className:"text-white d-flex justify-content-center",children:"-"})}),i("td",{className:"text-white fw-bolder",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent"},children:h.golesvisitante}),i("td",{className:"text-white d-flex justify-content-start fw-bolder",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent"},children:h.equipovisitante})]})})})},h.id)})}):t&&p(Pc,{options:{type:"loop",gap:"30px",drag:"free",arrows:!1,pagination:!1,perPage:1,height:60,autoScroll:{pauseOnHover:!1,pauseOnFocus:!1,rewind:!1,speed:1}},extensions:{AutoScroll:Dm},children:[Object.values(t).map(h=>{let m="";return h.estado==="Jugandose"?m=h.tiempodelpartido:h.estado==="Suspendido"?m="Susp":h.estado==="Pendiente"?m=se(h.hora,"HH:mm:ss").format("HH:mm").toLocaleString(void 0,{timeZone:"America/Argentina/Buenos_Aires",hour:"2-digit",minute:"2-digit"}):h.estado==="Finalizado"?m="Final":h.estado==="Parcial"&&(m="Parc"),i(ee,{children:i(Wi,{children:p(Ie,{className:"fw-bolder border-0",children:[i("thead",{children:p("tr",{className:"border-0",children:[i("th",{className:"border-0",style:{width:"5%"}}),i("th",{className:"border-0",style:{width:"10%"}}),i("th",{className:"border-0",style:{width:"5%"}}),i("th",{className:"border-0",style:{width:"10%"}})]})}),i("tbody",{children:p("tr",{children:[i("td",{className:"text-white fw-bolder",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent"},children:i("span",{className:"fw-bolder",style:{marginRight:10,fontSize:24,backgroundColor:h.estado==="Jugandose"||h.estado==="Suspendido"?"red":h.estado==="Finalizado"||h.estado==="Parcial"?"#C0C0C0":"transparent",color:h.estado==="Finalizado"||h.estado==="Parcial"?"black":"white"},children:m})}),p("td",{className:"text-white d-flex justify-content-end align-items-center fw-bolder",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent"},children:[g.filter(A=>A.nombre===h.equipolocal).map(A=>i("img",{src:A.escudos,alt:"Escudo Local",style:{width:25,height:25,marginRight:10}},A.nombre)),h.equipolocal]}),i("td",{className:"text-white text-end align-items-center",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent"},children:h.estado!=="Pendiente"?h.goleslocal:null}),i("td",{className:"text-white text-center align-items-center",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent"},children:h.estado!=="Pendiente"?"-":"vs"}),i("td",{className:"text-white text-center align-items-center",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent"},children:h.estado!=="Pendiente"?h.golesvisitante:null}),p("td",{className:"text-white d-flex justify-content-start align-items-center fw-bolder",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent"},children:[g.filter(A=>A.nombre===h.equipovisitante).map(A=>i("img",{src:A.escudos,alt:"Escudo Visitante",style:{width:25,height:25,marginLeft:10}},A.nombre)),h.equipovisitante]})]})})]})},h.id)})}),i(Wi,{children:i("div",{className:"mt-4 fw-bolder ",style:{fontFamily:"Montserrat",fontSize:"1.5rem",color:"white",textAlign:"center"},children:"WWW.SEGUNDOPALO.COM.AR"})})]}),i("h6",{className:"text-white text-center fw-bolder bg-primary d-flex justify-content-center",style:{marginTop:"15px",height:"50px",alignContent:"center",alignItems:"center"},children:"Restulados en vivo para despues de las 12(ayer)"}),c&&Object.values(c).length===1?i(Pc,{options:{type:"slide",gap:"20px",drag:"free",arrows:!1,pagination:!1,perPage:0},children:Object.values(c).map(h=>(se(h.hora,"HH:mm").format("HH:mm"),i(Wi,{children:i(Ie,{children:i("tbody",{children:p("tr",{children:[i("td",{className:"text-white d-flex justify-content-end",style:{fontFamily:"Montserrat",fontSize:"1.8rem",display:"flex",alignItems:"center",borderColor:"transparent"},children:h.equipolocal}),i("td",{className:"text-white text-end",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent",color:n?"red":"inherit"},children:h.goleslocal}),i("td",{className:"text-white text-end",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent"},children:i("span",{className:"text-white d-flex justify-content-center",children:"-"})}),i("td",{className:"text-white",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent"},children:h.golesvisitante}),i("td",{className:"text-white d-flex justify-content-start",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent"},children:h.equipovisitante})]})})})},h.id)))}):c&&p(Pc,{options:{type:"loop",gap:"30px",drag:"free",arrows:!1,pagination:!1,perPage:2,height:45,autoScroll:{pauseOnHover:!1,pauseOnFocus:!1,rewind:!1,speed:1}},extensions:{AutoScroll:Dm},children:[Object.values(c).map(h=>{let m="";return h.estado==="Jugandose"?m=h.tiempodelpartido:h.estado==="Suspendido"?m="Susp":h.estado==="Pendiente"?m=new Date(h.hora).toLocaleString(void 0,{timeZone:"America/Argentina/Buenos_Aires",hour:"2-digit",minute:"2-digit"}):h.estado==="Finalizado"?m="Final":h.estado==="Parcial"&&(m="Parc"),i(ee,{children:i(Wi,{children:i(Ie,{children:i("tbody",{children:p("tr",{children:[p("td",{className:"text-white d-flex justify-content-end",style:{fontFamily:"Montserrat",fontSize:"1.8rem",display:"flex",alignItems:"center",borderColor:"transparent"},children:[i("span",{className:"fw-bolder",style:{marginRight:5,width:"auto",fontSize:24,backgroundColor:h.estado==="Jugandose"||h.estado==="Suspendido"?"red":h.estado==="Finalizado"||h.estado==="Parcial"?" #C0C0C0":"transparent",color:h.estado==="Finalizado"||h.estado==="Parcial"?"black":"white"},children:m}),"| ",h.equipolocal]}),i("td",{className:"text-white text-end",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent"},children:h.estado!=="Pendiente"?h.goleslocal:null}),i("td",{className:"text-white text-end",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent"},children:i("span",{className:"text-white d-flex justify-content-center",children:"-"})}),i("td",{className:"text-white",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent"},children:h.estado!=="Pendiente"?h.golesvisitante:null}),p("td",{className:"text-white d-flex justify-content-start",style:{fontFamily:"Montserrat",fontSize:"1.8rem",borderColor:"transparent"},children:[h.equipovisitante," |"]})]})})})},h.id)})}),i(Wi,{children:i("div",{className:"mt-2 fw-bolder",style:{fontFamily:"Montserrat",fontSize:"1.8rem",color:"white",textAlign:"center"},children:"WWW.SEGUNDOPALO.COM.AR"})})]}),i("h6",{className:"text-dark text-center fw-bolder bg-warning d-flex justify-content-center",style:{marginTop:"15px",height:"50px",alignContent:"center",alignItems:"center"},children:"Mercado de Pases"}),i(Pc,{options:{type:"loop",gap:"5px",drag:"free",arrows:!1,pagination:!1,perPage:2,height:45,autoScroll:{pauseOnHover:!1,pauseOnFocus:!1,rewind:!1,speed:2}},extensions:{AutoScroll:Dm},children:Object.values(s).map(h=>i(Wi,{children:i(Ie,{children:i("tbody",{children:i("tr",{children:p("td",{className:"text-white text-end fw-bolder",style:{fontFamily:"Montserrat",fontSize:"24px",borderColor:"transparent",display:"flex",alignItems:"center"},children:[p("span",{style:{marginRight:"5px"},children:["|",h.jugador]})," ",p("span",{style:{marginLeft:"5px"},children:[" a ",h.clubDestino," | "]})]})})})})}))}),i("h6",{className:"text-white text-center fw-bolder d-flex justify-content-center bg-secondary",style:{marginTop:"15px",height:"50px",alignContent:"center",alignItems:"center"},children:"Tabla de posiciones Primera B"}),i(Pc,{options:{type:"loop",gap:"5px",drag:"free",arrows:!1,pagination:!1,perPage:3,height:45,autoScroll:{pauseOnHover:!1,pauseOnFocus:!1,rewind:!1,speed:2}},extensions:{AutoScroll:Dm},children:Object.values(a).map(h=>i(Wi,{children:i(Ie,{children:i("tbody",{children:i("tr",{children:p("td",{className:" border border-dark text-white text-center",style:{fontSize:24,fontWeight:700},children:[h.equipo," ",h.puntos," Pts."]})})})})}))})]})]})},Ble=()=>i(ae,{className:"anchoFooter",children:i(V,{style:{display:"flex",justifyContent:"center",flexDirection:"column",color:"white",fontFamily:"Roboto Condensed, sans-serif"},children:p($,{children:[i("h1",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif"},children:"SEGUND⚽PALO"}),i("p",{className:"text-center mt-4 fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"rgb(14, 148, 255)",fontSize:"1.8em"},children:"SOBRE NOSOTROS"}),i("p",{className:"fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"rgb(14, 148, 255)"},children:"Segund⚽Palo nace con el objetivo de informar las posiciones, resultados, estadísticas en tiempo real de todo lo que acontece en la liga Futsal en Argentina. "}),i("p",{className:"fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"rgb(14, 148, 255)"},children:"Desde el inicio, nos hemos enfocado en crear la mejor aplicación posible para que todos los usuarios puedan disfrutar de todo el contenido al instante."}),i("p",{className:"fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"rgb(14, 148, 255)"},children:"Nuestro compromiso en desarrollar la disciplina y brindar tecnología a nuestros usuarios ha sido fundamental para el crecimiento de SegundoPalo."}),i("p",{className:"fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"rgb(14, 148, 255)"},children:"Nos preocupamos por ofrecer un producto de calidad, establecer relaciones de confianza con nuestros clientes y fomentar un sentido de comunidad que conecte a nuestros usuarios y a nuestro equipo entre sí."}),i("p",{className:"fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"rgb(14, 148, 255)"},children:"Si deseas obtener más información sobre nosotros, no dudes en contactarnos a través de info@segundopalo.com.ar. Asimismo, si estás interesado en publicitar en nuestro sitio, puedes comunicarte con nosotros a través de la misma dirección de correo electrónico."})]})})}),Ule=()=>p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO FUTSAL AFA - CONTACTO-"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera A: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),i(ae,{className:"tamañoTorneo",children:i(V,{style:{display:"flex",justifyContent:"center",flexDirection:"column",color:"white",fontFamily:"Roboto Condensed, sans-serif"},children:p($,{children:[i("h1",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif"},children:"SEGUND⚽PALO"}),i("p",{className:"text-center mt-4 fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"rgb(14, 148, 255)",fontSize:"1.8em"},children:"CONTACTO"}),i("p",{className:"fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"rgb(14, 148, 255)"},children:"No dudes en ponerte en contacto con el equipo de Segund⚽Palo para cualquier comentario, corrección de resultados, consulta sobre publicidad o cualquier otra inquietud que tengas en mente."}),i("p",{className:"fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"rgb(14, 148, 255)"},children:"¿Necesitas ayuda con alguna función de Segund⚽Palo? ¿Encontraste algún error? ¿Experimentas problemas con el sitio web o nuestra aplicación? Escríbenos a info@segundopalo.com.ar."}),i("p",{className:"fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"rgb(14, 148, 255)"},children:"Para cualquier consulta relacionada con publicidad, también puedes contactarnos a través de info@segundopalo.com.ar."}),i("p",{className:"fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"rgb(14, 148, 255)"},children:"Además, te invitamos a seguirnos en nuestras redes sociales para mantenerte al tanto de las novedades y noticias relacionadas con el futsal."})]})})})]});var Yle="firebase",Hle="9.23.0";/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */md(Yle,Hle,"app");const Gle={apiKey:"AIzaSyAkpcd_q0V4-8SBMRIZBkujWn2bbLiUPVM",authDomain:"segundopalodatabase.firebaseapp.com",databaseURL:"https://segundopalodatabase-default-rtdb.firebaseio.com/",projectId:"segundopalodatabase",storageBucket:"segundopalodatabase.appspot.com",messagingSenderId:"9067919541",appId:"1:9067919541:web:f17c0bf56812afd2a926fc",measurementId:"G-2JB5X4JKW9"},Wle=m3(Gle),sd=I5(Wle),Vle=()=>{const t=si(sd,"1xD10-tawmlMevscwue25TRJ7HL2SK-QLR7PUGUeK2k0/pruebaJugadores"),[e,n]=C.useState([]);C.useEffect(()=>{Gne(t).then(R=>{R.exists()?n(R.val()):console.log("No data available")}).catch(R=>{console.error(R)})},[]);const[r,s]=C.useState(""),[o,a]=C.useState(""),[l,c]=C.useState(""),[d,u]=C.useState(""),f=e.filter(R=>R.liga.toLowerCase().includes(r.toLowerCase())&&R.zona.toLowerCase().includes(o.toLowerCase())&&R.categoria.toLowerCase().includes(l.toLowerCase())&&R.puesto.toLowerCase().includes(d.toLowerCase())),g=new Set,E=new Set,S=new Set,w=new Set;e.forEach(R=>{const O=R.liga.split(",").map(b=>b.trim()),N=R.zona.trim(),y=R.categoria.split(",").map(b=>b.trim()),v=R.puesto.split(",").map(b=>b.trim());O.forEach(b=>{g.add(b)}),E.add(N),y.forEach(b=>{S.add(b)}),v.forEach(b=>{w.add(b)})});const _=Array.from(g),h=Array.from(E),m=Array.from(S),A=Array.from(w),k=()=>{s(""),a(""),c(""),u("")};return p(ae,{className:"d-flex mt-5 anchoPruebaJugadores",style:{flexDirection:"column",justifyContent:"center",backgroundColor:"transparent",marginBottom:"100%"},children:[p(Xe,{children:[i("title",{children:" SEGUNDOPALO - PRUEBA DE JUGADORES - Futsal AFA Primera A, B, C, D - Fixture completo con tabla de posiciones "}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera A, B, C, D : tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),i("div",{className:"mb-5 banner",children:i(et,{})}),p("div",{className:"",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px",borderRadius:"10px",backgroundColor:"#001c31"},children:[i("h1",{className:"text-center text-white fw-bolder mt-1 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"17px"},children:"PRUEBAS DE JUGADORES"}),p("p",{className:"text-center text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"14px"},children:["¡Te ayudamos a difundir!",i("br",{}),"Todos los clubes interesados en compartir sus convocatorias, pueden enviarnos toda la información haciendo",i("span",{className:"fst-italic ",style:{marginLeft:8,textDecoration:"none"},children:i("a",{href:"https://docs.google.com/forms/u/1/d/e/1FAIpQLSfwWpyESTtoeh3KTre9V7uI5TZLfc0jvsmQAPx0trSQVq8k-w/viewform",target:"blank",children:"click aquí"})}),i("br",{}),"¡Juntos, difundimos el deporte más lindo del mundo!",i("br",{}),i("br",{}),i("span",{style:{fontSize:"13px"},children:"*La búsqueda incluye a jugadores, técnicos, preparadores físicos y fotógrafos."})]})]}),p("div",{className:"mt-3",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px",borderRadius:"10px",backgroundColor:"#001c31"},children:[i("h1",{className:"text-center text-white fw-bolder mt-1 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"17px"},children:"BUSQUEDA"}),i("p",{className:"text-center text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"14px"},children:" Aquí encontrarás las publicaciones enviadas por los clubes que están en busca de jugadores, técnicos, preparadores físicos y fotógrafos."}),i(V,{className:"mt-2 mb-3",children:p($,{style:{display:"flex",justifyContent:"center"},children:[p(uf,{className:"w-25 fw-bolder","aria-label":"Default select example",value:r,onChange:R=>s(R.target.value),style:{marginRight:8,fontSize:"14px",fontFamily:"Roboto Condensed, sans-serif"},children:[i("option",{className:"",value:"",children:"LIGA"}),_.map(R=>i("option",{value:R,style:{fontFamily:"Roboto Condensed, sans-serif"},children:R},R))]}),p(uf,{className:"w-25 fw-bolder","aria-label":"Default select example",value:o,onChange:R=>a(R.target.value),style:{marginRight:8,fontSize:"14px",fontFamily:"Roboto Condensed, sans-serif"},children:[i("option",{className:"",value:"",children:"ZONA"}),h.map(R=>i("option",{value:R,style:{fontFamily:"Roboto Condensed, sans-serif"},children:R},R))]}),p(uf,{className:"w-25 fw-bolder","aria-label":"Default select example",value:l,onChange:R=>c(R.target.value),style:{marginRight:8,fontSize:"14px",fontFamily:"Roboto Condensed, sans-serif"},children:[i("option",{className:"",value:"",children:"CAT"}),m.map(R=>i("option",{value:R,style:{fontFamily:"Roboto Condensed, sans-serif"},children:R},R))]}),p(uf,{className:"w-25 fw-bolder","aria-label":"Default select example",value:d,onChange:R=>u(R.target.value),style:{fontSize:"14px",fontFamily:"Roboto Condensed, sans-serif"},children:[i("option",{className:"",value:"",children:"PUESTO"}),A.map(R=>i("option",{value:R,style:{fontFamily:"Roboto Condensed, sans-serif"},children:R},R))]})]})}),i(V,{children:i($,{style:{display:"flex",justifyContent:"center"},children:i("button",{className:"btn btn-secondary mt-1 mb-1",onClick:k,children:"Refrescar"})})})]}),i(V,{children:i($,{className:"mt-5",style:{display:"flex",justifyContent:"center",flexDirection:"column"},children:f.map((R,O)=>i(Wn,{className:"mt-3 border border-dark ",style:{border:"none",backgroundColor:"#001c31"},children:p(Wn.Body,{children:[i(Wn.Img,{variant:"top",src:R.foto}),p(Wn.Title,{className:"text-center text-white fw-bolder mt-2",style:{fontFamily:"Roboto Condensed, sans-serif"},children:["CLUB : ",R.equipo]}),p(Wn.Title,{className:"text-center text-white",children:["Zona: ",R.zona]}),p(Wn.Title,{className:"text-center text-white",children:["Categorias: ",R.categoria]}),p(Wn.Title,{className:"text-center text-white",children:["Puesto: ",R.puesto]}),p(Wn.Title,{className:"text-center text-white",children:["Liga: ",R.liga]}),R.contacto!==""?i("div",{className:"d-flex justify-content-end",children:i("a",{href:`https://api.whatsapp.com/send?phone=549${R.contacto}&text=Hola%2C%20hice%20click%20en%20la%20web%20de%20SegundoPalo%20y%20quiero%20recibir%20información%20sobre%20la%20convocatoria.`,target:"_blank",rel:"noopener noreferrer",children:i(Qe,{size:"sm",className:"btn btn-secondary",style:{fontFamily:"Roboto Condensed, sans-serif"},children:"Contactar"})})}):null]})},O))})})]})},Kle=({dataEquipos:t,dataFixture:e,canalesTvPlayoff:n})=>{var k;const[r,s]=C.useState(!0),[o,a]=C.useState([]),[l,c]=C.useState([]),[d,u]=C.useState([]),[f,g]=C.useState([]),E=e||[];C.useEffect(()=>{c(t),u(n),a(S(e)),s(!1)},[t,e]);const S=R=>{const O={};R.forEach(y=>{const v=y.faseCopas,b=y.llavePlayOff;O[v]||(O[v]={}),O[v][b]||(O[v][b]=[]),O[v][b].push(y)});const N={};return Object.keys(O).sort().forEach(y=>{N[y]={};const v=["Ida","Vuelta","Tercer partido"];Object.keys(O[y]).sort().forEach(b=>{O[y][b].sort((P,F)=>v.indexOf(P.partidoPlayOff)-v.indexOf(F.partidoPlayOff)),N[y][b]=O[y][b]})}),N},w=S(E),_=Object.fromEntries(Object.entries(w).map(([R,O])=>{const N=Object.fromEntries(Object.entries(O).map(([y,v])=>{const b=v.filter(P=>P.equipolocal!=="A conf"||P.equipovisitante!=="A conf");return[y,b]}).filter(([y,v])=>v.length>0));return[R,N]}).filter(([R,O])=>Object.keys(O).length>0)),h=(R,O)=>{m("/videos",{state:{url:R,data:O}})},m=Rt(),A=["Final","3 puesto","Semi final","Cuartos de final","Octavos de final","16avos","32avos","5 puesto","7 puesto","5 a 8 puesto","9 puesto","11 puesto","2° Fase","1° Fase"];return(k=E[0])==null||k.torneo,p(ae,{className:"anchoPlayoff",children:[Object.entries(_).sort((R,O)=>{const N=R[0],y=O[0],v=A.indexOf(N),b=A.indexOf(y);return v-b}).map(([R,O])=>i(ee,{children:p(ae,{className:" mt-1",children:[p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"18px"},children:[" ",R.toUpperCase()]}),i($,{children:Object.entries(O).map(([N,y])=>i(ee,{children:i($,{md:12,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{children:Array.isArray(y)&&y.map(v=>{var L,K,Y,te,J;const b=v.equipolocal,P=v.equipovisitante,F=v.transmision,I=Array.isArray(l)?(L=l.find(Q=>Q.nombre===b))==null?void 0:L.escudos:void 0,T=Array.isArray(l)?(K=l.find(Q=>Q.nombre===P))==null?void 0:K.escudos:void 0,q=(Y=d.find(Q=>Q.idTv===F))==null?void 0:Y.logo,W=v.hora?se(v.hora,"HH:mm:ss").format("HH:mm"):"A conf",G=f===v.id&&v.estado==="Jugandose"?"#dc3545":"white",H=f===v.id&&v.estado==="Jugandose"?"white":"black",j=se(v.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("DD/MM"),U=se(v.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("dddd").toUpperCase();return p(Fe.Fragment,{children:[v.fecha!==null?i("tr",{children:p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[U," ",j]})}):i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"FECHA Y HORA A CONFIRMAR"}),i("tr",{children:i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:v.partidoPlayOff})}),p("tr",{children:[v.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder",style:{fontSize:9,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):v.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",v.motivossuspension,")"]})]}):v.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:v.estado}):v.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Parc ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}})]}):v.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:[v.tiempodelpartido," ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}})]}):v.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[v.hora===""?i(ee,{children:"A conf"}):W," ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}}),i("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"}})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[I&&i("img",{src:I,alt:b,style:{width:"15px",height:"15px"}})," ",i("span",{style:{height:"auto"},children:b!==""?b:"A conf"})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:G,color:H,width:"auto"},children:[v.estado!=="Pendiente"?v.goleslocal:null,v.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+v.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:G,color:H},children:[v.estado!=="Pendiente"?v.golesvisitante:null,v.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+v.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[I&&i("img",{src:T,alt:P,style:{width:"15px",height:"15px"}})," ",p("span",{style:{height:"auto"},children:[" ",P!==""?P:"A conf"]})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[v.linkgoles===null||v.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(v.linkgoles,{id:v.id,estado:v.estado,equipolocal:v.equipolocal,equipovisitante:v.equipovisitante,goleslocal:v.goleslocal,penaleslocal:v.penaleslocal,penalesvisitante:v.penalesvisitante,golesvisitante:v.golesvisitante,escudoLocal:I,escudoVisitante:T,tiempodelpartido:v.tiempodelpartido,hora:W,goleadoresLocal:v.goleadoresLocal,goleadoresVisitante:v.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})}),v.linkvivo===null||v.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(v.linkvivo,{estado:v.estado,equipolocal:v.equipolocal,equipovisitante:v.equipovisitante,goleslocal:v.goleslocal,penaleslocal:v.penaleslocal,penalesvisitante:v.penalesvisitante,golesvisitante:v.golesvisitante,escudoLocal:I,escudoVisitante:T,tiempodelpartido:v.tiempodelpartido}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Ns,{style:{fontSize:"12px"}})})]})})]},v.id),(v.goleadoresLocal||v.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(te=v.goleadoresLocal)==null?void 0:te.split(",").map((Q,oe)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[oe>0&&"-",Q.trim().slice(0,-1)]},oe))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(J=v.goleadoresVisitante)==null?void 0:J.split(",").map((Q,oe)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[oe>0&&"-",Q.trim().slice(0,-1)]},oe))})})]})]},v.id)})})]})})}))},R)]})})),i(V,{})]})},Zle=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_(),h();const m=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{_()}).subscribe();return()=>{m.unsubscribe()}},[]);const g=async()=>{try{const{data:m,error:A}=await z.from("Goleadores").select("*").eq("torneo","COPADEORO").eq("añoGoleadores",2024);A?console.error("Error",A):e(m)}catch(m){console.error("Error",m.message)}},E=async()=>{try{const{data:m,error:A}=await z.from("Equipos").select("*");A?console.error("Error",A):r(m)}catch(m){console.error("Error",m.message)}},S=async()=>{try{const{data:m,error:A}=await z.from("Asistencias").select("*").eq("torneo","COPADEORO").eq("añoAsistencia",2024);A?console.error("Error",A):o(m)}catch(m){console.error("Error",m.message)}},w=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").eq("torneo","COPADEORO").eq("añoTorneo",2023);A?console.error("Error",A):l(m)}catch(m){console.error("Error",m.message)}},_=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").eq("torneo","COPADEORO").eq("añoTorneo",2024).order("fecha",{ascending:!1});A?console.error("Error",A):d(m)}catch(m){console.error("Error",m.message)}},h=async()=>{try{const{data:m,error:A}=await z.from("CanalesTv").select("*");A?console.error("Error",A):f(m)}catch(m){console.error("Error",m.message)}};return p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL -COPA DE ORO - FIXTURES - PARTIDOS"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de LA COPA ARGENTINA DE Futsal AFA , fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo mb-5",children:[i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:3}}),"COPA DE ORO FUTSAL",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:3}})]})}),i(V,{children:i($,{md:12,children:i(et,{})})}),i(V,{}),i(V,{children:i($,{md:12,children:i(Kle,{dataFixture:c,dataEquipos:n,canalesTvPlayoff:u})})}),i(V,{children:i($,{md:6,className:"mb-5",children:i(Vt,{goleadores:t,dataEquipos:n})})})]})]})},Jle=({dataTabla:t,escudos:e})=>p(Ie,{bordered:!0,size:"sm",children:[i("thead",{children:p("tr",{style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:[i("th",{className:"text-center text-white",colSpan:1,children:"#"}),i("th",{className:"text-center anchoPosiciones text-white",children:"Equipo"}),i("th",{className:"text-center anchoPosiciones text-white",children:"Pts."}),i("th",{className:"text-center anchoPosiciones text-white",children:"PJ"}),i("th",{className:"text-center anchoPosiciones text-white",children:"PG"}),i("th",{className:"text-center anchoPosiciones text-white",children:"PE"}),i("th",{className:"text-center anchoPosiciones text-white",children:"PP"}),i("th",{className:"text-center anchoPosiciones text-white",children:"GF"}),i("th",{className:"text-center anchoPosiciones text-white",children:"GC"}),i("th",{className:"text-center anchoPosiciones text-white",children:"Dif"})]})}),p("tbody",{style:{backgroundColor:"#ffff",color:"black",fontWeight:"700",fontFamily:"Roboto Condensed, sans-serif"},children:[t.map((n,r)=>{const s=e&&e.find(o=>o.nombre===n.equipo);return p("tr",{children:[i("th",{className:"border border-dark text-dark text-center col-1",scope:"row",style:n.posicion===1?{backgroundColor:"#B8F7A6"}:n.posicion===2?{backgroundColor:"#BAC1C0"}:{backgroundColor:"#DE9090"},children:p("span",{style:{fontSize:12},children:[n.posicion," "]})}),p("td",{className:"text-start border border-dark ",style:{border:"none",outline:"none",fontSize:"12px"},children:[s?i("img",{className:"me-1",src:s.escudos,alt:"escudo equipo",style:{width:"15px",height:"15px"}}):null,n.equipo==="República Checa"?"Rep Checha":n.equipo]}),i("td",{className:" border border-dark text-center",style:{fontSize:13,fontWeight:700},children:n.puntos}),i("td",{className:" border border-dark text-center",style:{fontSize:13,color:"#330"},children:n.pj}),i("td",{className:" border border-dark text-center",style:{fontSize:13,color:"#330"},children:n.pg}),i("td",{className:" border border-dark text-center",style:{fontSize:13,color:"#330"},children:n.pe}),i("td",{className:" border border-dark text-center",style:{fontSize:13,color:"#330"},children:n.pp}),i("td",{className:" border border-dark text-center",style:{fontSize:13,color:"#330"},children:n.gf}),i("td",{className:" border border-dark text-center",style:{fontSize:13,color:"#330"},children:n.gc}),i("td",{className:" border border-dark text-center",style:{fontSize:13,color:"#330"},children:n.gf-n.gc})]},r)}),i("tr",{children:i("td",{className:"text-center ",colSpan:10,style:{backgroundColor:"#B8F7A6",fontSize:11},children:"CLASIFICACION DIRECTA AL MUNDIAL"})}),i("tr",{children:i("td",{className:"text-center border border-dark",colSpan:10,style:{backgroundColor:"#BAC1C0",fontSize:11},children:"PLAYOFF - Los cuatro mejores 2° de los 5 grupos"})}),i("tr",{children:i("td",{className:"text-center border border-dark",colSpan:10,style:{backgroundColor:"#DE9090",fontSize:11},children:"NO CLASIFICAN AL MUNDIAL"})}),i("tr",{children:i("td",{className:"text-center border border-dark",colSpan:10,style:{backgroundColor:"#9370DB",fontSize:11},children:"TOTAL CUPOS UEFA 7"})})]})]});function Xle(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},s=e.attributes[n]||{},o=e.elements[n];!_s(o)||!wo(o)||(Object.assign(o.style,r),Object.keys(s).forEach(function(a){var l=s[a];l===!1?o.removeAttribute(a):o.setAttribute(a,l===!0?"":l)}))})}function Qle(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var s=e.elements[r],o=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),l=a.reduce(function(c,d){return c[d]="",c},{});!_s(s)||!wo(s)||(Object.assign(s.style,l),Object.keys(o).forEach(function(c){s.removeAttribute(c)}))})}}const lA={name:"applyStyles",enabled:!0,phase:"write",fn:Xle,effect:Qle,requires:["computeStyles"]};var ece=[Ib,Mb,Tb,lA],tce=cp({defaultModifiers:ece}),nce=[Ib,Mb,Tb,lA,JC,KC,XC,HC,ZC],cA=cp({defaultModifiers:nce});const gq=Object.freeze(Object.defineProperty({__proto__:null,afterMain:HI,afterRead:BI,afterWrite:VI,applyStyles:lA,arrow:HC,auto:Db,basePlacements:iu,beforeMain:UI,beforeRead:jI,beforeWrite:GI,bottom:rs,clippingParents:zI,computeStyles:Tb,createPopper:cA,createPopperBase:OG,createPopperLite:tce,detectOverflow:Ld,end:kd,eventListeners:Ib,flip:KC,hide:ZC,left:Nr,main:YI,modifierPhases:KI,offset:JC,placements:$C,popper:Tc,popperGenerator:cp,popperOffsets:Mb,preventOverflow:XC,read:$I,reference:qI,right:ss,start:Bl,top:Ar,variationPlacements:iw,viewport:jC,write:WI},Symbol.toStringTag,{value:"Module"}));/*! * Bootstrap v5.2.3 (https://getbootstrap.com/) * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */const rce=1e6,sce=1e3,cx="transitionend",oce=t=>t==null?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),ice=t=>{do t+=Math.floor(Math.random()*rce);while(document.getElementById(t));return t},yq=t=>{let e=t.getAttribute("data-bs-target");if(!e||e==="#"){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&n!=="#"?n.trim():null}return e},bq=t=>{const e=yq(t);return e&&document.querySelector(e)?e:null},vi=t=>{const e=yq(t);return e?document.querySelector(e):null},ace=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:n}=window.getComputedStyle(t);const r=Number.parseFloat(e),s=Number.parseFloat(n);return!r&&!s?0:(e=e.split(",")[0],n=n.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(n))*sce)},vq=t=>{t.dispatchEvent(new Event(cx))},_i=t=>!t||typeof t!="object"?!1:(typeof t.jquery<"u"&&(t=t[0]),typeof t.nodeType<"u"),Ta=t=>_i(t)?t.jquery?t[0]:t:typeof t=="string"&&t.length>0?document.querySelector(t):null,vu=t=>{if(!_i(t)||t.getClientRects().length===0)return!1;const e=getComputedStyle(t).getPropertyValue("visibility")==="visible",n=t.closest("details:not([open])");if(!n)return e;if(n!==t){const r=t.closest("summary");if(r&&r.parentNode!==n||r===null)return!1}return e},Ia=t=>!t||t.nodeType!==Node.ELEMENT_NODE||t.classList.contains("disabled")?!0:typeof t.disabled<"u"?t.disabled:t.hasAttribute("disabled")&&t.getAttribute("disabled")!=="false",_q=t=>{if(!document.documentElement.attachShadow)return null;if(typeof t.getRootNode=="function"){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?_q(t.parentNode):null},Ky=()=>{},Tp=t=>{t.offsetHeight},wq=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,R_=[],lce=t=>{document.readyState==="loading"?(R_.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of R_)e()}),R_.push(t)):t()},Es=()=>document.documentElement.dir==="rtl",Os=t=>{lce(()=>{const e=wq();if(e){const n=t.NAME,r=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=r,t.jQueryInterface)}})},Qo=t=>{typeof t=="function"&&t()},xq=(t,e,n=!0)=>{if(!n){Qo(t);return}const r=5,s=ace(e)+r;let o=!1;const a=({target:l})=>{l===e&&(o=!0,e.removeEventListener(cx,a),Qo(t))};e.addEventListener(cx,a),setTimeout(()=>{o||vq(e)},s)},dA=(t,e,n,r)=>{const s=t.length;let o=t.indexOf(e);return o===-1?!n&&r?t[s-1]:t[0]:(o+=n?1:-1,r&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},cce=/[^.]*(?=\..*)\.|.*/,dce=/\..*/,uce=/::\d+$/,P_={};let NO=1;const Cq={mouseenter:"mouseover",mouseleave:"mouseout"},fce=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Eq(t,e){return e&&`${e}::${NO++}`||t.uidEvent||NO++}function Sq(t){const e=Eq(t);return t.uidEvent=e,P_[e]=P_[e]||{},P_[e]}function hce(t,e){return function n(r){return uA(r,{delegateTarget:t}),n.oneOff&&ge.off(t,r.type,e),e.apply(t,[r])}}function pce(t,e,n){return function r(s){const o=t.querySelectorAll(e);for(let{target:a}=s;a&&a!==this;a=a.parentNode)for(const l of o)if(l===a)return uA(s,{delegateTarget:a}),r.oneOff&&ge.off(t,s.type,e,n),n.apply(a,[s])}}function Aq(t,e,n=null){return Object.values(t).find(r=>r.callable===e&&r.delegationSelector===n)}function Nq(t,e,n){const r=typeof e=="string",s=r?n:e||n;let o=Rq(t);return fce.has(o)||(o=t),[r,s,o]}function RO(t,e,n,r,s){if(typeof e!="string"||!t)return;let[o,a,l]=Nq(e,n,r);e in Cq&&(a=(S=>function(w){if(!w.relatedTarget||w.relatedTarget!==w.delegateTarget&&!w.delegateTarget.contains(w.relatedTarget))return S.call(this,w)})(a));const c=Sq(t),d=c[l]||(c[l]={}),u=Aq(d,a,o?n:null);if(u){u.oneOff=u.oneOff&&s;return}const f=Eq(a,e.replace(cce,"")),g=o?pce(t,n,a):hce(t,a);g.delegationSelector=o?n:null,g.callable=a,g.oneOff=s,g.uidEvent=f,d[f]=g,t.addEventListener(l,g,o)}function dx(t,e,n,r,s){const o=Aq(e[n],r,s);o&&(t.removeEventListener(n,o,!!s),delete e[n][o.uidEvent])}function mce(t,e,n,r){const s=e[n]||{};for(const o of Object.keys(s))if(o.includes(r)){const a=s[o];dx(t,e,n,a.callable,a.delegationSelector)}}function Rq(t){return t=t.replace(dce,""),Cq[t]||t}const ge={on(t,e,n,r){RO(t,e,n,r,!1)},one(t,e,n,r){RO(t,e,n,r,!0)},off(t,e,n,r){if(typeof e!="string"||!t)return;const[s,o,a]=Nq(e,n,r),l=a!==e,c=Sq(t),d=c[a]||{},u=e.startsWith(".");if(typeof o<"u"){if(!Object.keys(d).length)return;dx(t,c,a,o,s?n:null);return}if(u)for(const f of Object.keys(c))mce(t,c,f,e.slice(1));for(const f of Object.keys(d)){const g=f.replace(uce,"");if(!l||e.includes(g)){const E=d[f];dx(t,c,a,E.callable,E.delegationSelector)}}},trigger(t,e,n){if(typeof e!="string"||!t)return null;const r=wq(),s=Rq(e),o=e!==s;let a=null,l=!0,c=!0,d=!1;o&&r&&(a=r.Event(e,n),r(t).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),d=a.isDefaultPrevented());let u=new Event(e,{bubbles:l,cancelable:!0});return u=uA(u,n),d&&u.preventDefault(),c&&t.dispatchEvent(u),u.defaultPrevented&&a&&a.preventDefault(),u}};function uA(t,e){for(const[n,r]of Object.entries(e||{}))try{t[n]=r}catch{Object.defineProperty(t,n,{configurable:!0,get(){return r}})}return t}const Vi=new Map,O_={set(t,e,n){Vi.has(t)||Vi.set(t,new Map);const r=Vi.get(t);if(!r.has(e)&&r.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(r.keys())[0]}.`);return}r.set(e,n)},get(t,e){return Vi.has(t)&&Vi.get(t).get(e)||null},remove(t,e){if(!Vi.has(t))return;const n=Vi.get(t);n.delete(e),n.size===0&&Vi.delete(t)}};function PO(t){if(t==="true")return!0;if(t==="false")return!1;if(t===Number(t).toString())return Number(t);if(t===""||t==="null")return null;if(typeof t!="string")return t;try{return JSON.parse(decodeURIComponent(t))}catch{return t}}function F_(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const wi={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${F_(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${F_(e)}`)},getDataAttributes(t){if(!t)return{};const e={},n=Object.keys(t.dataset).filter(r=>r.startsWith("bs")&&!r.startsWith("bsConfig"));for(const r of n){let s=r.replace(/^bs/,"");s=s.charAt(0).toLowerCase()+s.slice(1,s.length),e[s]=PO(t.dataset[r])}return e},getDataAttribute(t,e){return PO(t.getAttribute(`data-bs-${F_(e)}`))}};let Ip=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,n){const r=_i(n)?wi.getDataAttribute(n,"config"):{};return{...this.constructor.Default,...typeof r=="object"?r:{},..._i(n)?wi.getDataAttributes(n):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,n=this.constructor.DefaultType){for(const r of Object.keys(n)){const s=n[r],o=e[r],a=_i(o)?"element":oce(o);if(!new RegExp(s).test(a))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${a}" but expected type "${s}".`)}}};const gce="5.2.3";class so extends Ip{constructor(e,n){super(),e=Ta(e),e&&(this._element=e,this._config=this._getConfig(n),O_.set(this._element,this.constructor.DATA_KEY,this))}dispose(){O_.remove(this._element,this.constructor.DATA_KEY),ge.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,n,r=!0){xq(e,n,r)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return O_.get(Ta(e),this.DATA_KEY)}static getOrCreateInstance(e,n={}){return this.getInstance(e)||new this(e,typeof n=="object"?n:null)}static get VERSION(){return gce}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const Ev=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,r=t.NAME;ge.on(document,n,`[data-bs-dismiss="${r}"]`,function(s){if(["A","AREA"].includes(this.tagName)&&s.preventDefault(),Ia(this))return;const o=vi(this)||this.closest(`.${r}`);t.getOrCreateInstance(o)[e]()})},yce="alert",bce="bs.alert",Pq=`.${bce}`,vce=`close${Pq}`,_ce=`closed${Pq}`,wce="fade",xce="show";class Sv extends so{static get NAME(){return yce}close(){if(ge.trigger(this._element,vce).defaultPrevented)return;this._element.classList.remove(xce);const n=this._element.classList.contains(wce);this._queueCallback(()=>this._destroyElement(),this._element,n)}_destroyElement(){this._element.remove(),ge.trigger(this._element,_ce),this.dispose()}static jQueryInterface(e){return this.each(function(){const n=Sv.getOrCreateInstance(this);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e](this)}})}}Ev(Sv,"close");Os(Sv);const Cce="button",Ece="bs.button",Sce=`.${Ece}`,Ace=".data-api",Nce="active",OO='[data-bs-toggle="button"]',Rce=`click${Sce}${Ace}`;class Av extends so{static get NAME(){return Cce}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(Nce))}static jQueryInterface(e){return this.each(function(){const n=Av.getOrCreateInstance(this);e==="toggle"&&n[e]()})}}ge.on(document,Rce,OO,t=>{t.preventDefault();const e=t.target.closest(OO);Av.getOrCreateInstance(e).toggle()});Os(Av);const dt={find(t,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,t))},findOne(t,e=document.documentElement){return Element.prototype.querySelector.call(e,t)},children(t,e){return[].concat(...t.children).filter(n=>n.matches(e))},parents(t,e){const n=[];let r=t.parentNode.closest(e);for(;r;)n.push(r),r=r.parentNode.closest(e);return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(n=>`${n}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(n=>!Ia(n)&&vu(n))}},Pce="swipe",_u=".bs.swipe",Oce=`touchstart${_u}`,Fce=`touchmove${_u}`,Dce=`touchend${_u}`,kce=`pointerdown${_u}`,Tce=`pointerup${_u}`,Ice="touch",Mce="pen",Lce="pointer-event",zce=40,qce={endCallback:null,leftCallback:null,rightCallback:null},jce={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Zy extends Ip{constructor(e,n){super(),this._element=e,!(!e||!Zy.isSupported())&&(this._config=this._getConfig(n),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return qce}static get DefaultType(){return jce}static get NAME(){return Pce}dispose(){ge.off(this._element,_u)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),Qo(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=zce)return;const n=e/this._deltaX;this._deltaX=0,n&&Qo(n>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(ge.on(this._element,kce,e=>this._start(e)),ge.on(this._element,Tce,e=>this._end(e)),this._element.classList.add(Lce)):(ge.on(this._element,Oce,e=>this._start(e)),ge.on(this._element,Fce,e=>this._move(e)),ge.on(this._element,Dce,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===Mce||e.pointerType===Ice)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const $ce="carousel",Bce="bs.carousel",Ka=`.${Bce}`,Oq=".data-api",Uce="ArrowLeft",Yce="ArrowRight",Hce=500,Zu="next",Oc="prev",jc="left",Ng="right",Gce=`slide${Ka}`,D_=`slid${Ka}`,Wce=`keydown${Ka}`,Vce=`mouseenter${Ka}`,Kce=`mouseleave${Ka}`,Zce=`dragstart${Ka}`,Jce=`load${Ka}${Oq}`,Xce=`click${Ka}${Oq}`,Fq="carousel",km="active",Qce="slide",ede="carousel-item-end",tde="carousel-item-start",nde="carousel-item-next",rde="carousel-item-prev",Dq=".active",kq=".carousel-item",sde=Dq+kq,ode=".carousel-item img",ide=".carousel-indicators",ade="[data-bs-slide], [data-bs-slide-to]",lde='[data-bs-ride="carousel"]',cde={[Uce]:Ng,[Yce]:jc},dde={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},ude={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Mp extends so{constructor(e,n){super(e,n),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=dt.findOne(ide,this._element),this._addEventListeners(),this._config.ride===Fq&&this.cycle()}static get Default(){return dde}static get DefaultType(){return ude}static get NAME(){return $ce}next(){this._slide(Zu)}nextWhenVisible(){!document.hidden&&vu(this._element)&&this.next()}prev(){this._slide(Oc)}pause(){this._isSliding&&vq(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){ge.one(this._element,D_,()=>this.cycle());return}this.cycle()}}to(e){const n=this._getItems();if(e>n.length-1||e<0)return;if(this._isSliding){ge.one(this._element,D_,()=>this.to(e));return}const r=this._getItemIndex(this._getActive());if(r===e)return;const s=e>r?Zu:Oc;this._slide(s,n[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&ge.on(this._element,Wce,e=>this._keydown(e)),this._config.pause==="hover"&&(ge.on(this._element,Vce,()=>this.pause()),ge.on(this._element,Kce,()=>this._maybeEnableCycle())),this._config.touch&&Zy.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const r of dt.find(ode,this._element))ge.on(r,Zce,s=>s.preventDefault());const n={leftCallback:()=>this._slide(this._directionToOrder(jc)),rightCallback:()=>this._slide(this._directionToOrder(Ng)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),Hce+this._config.interval))}};this._swipeHelper=new Zy(this._element,n)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const n=cde[e.key];n&&(e.preventDefault(),this._slide(this._directionToOrder(n)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const n=dt.findOne(Dq,this._indicatorsElement);n.classList.remove(km),n.removeAttribute("aria-current");const r=dt.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);r&&(r.classList.add(km),r.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const n=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=n||this._config.defaultInterval}_slide(e,n=null){if(this._isSliding)return;const r=this._getActive(),s=e===Zu,o=n||dA(this._getItems(),r,s,this._config.wrap);if(o===r)return;const a=this._getItemIndex(o),l=E=>ge.trigger(this._element,E,{relatedTarget:o,direction:this._orderToDirection(e),from:this._getItemIndex(r),to:a});if(l(Gce).defaultPrevented||!r||!o)return;const d=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(a),this._activeElement=o;const u=s?tde:ede,f=s?nde:rde;o.classList.add(f),Tp(o),r.classList.add(u),o.classList.add(u);const g=()=>{o.classList.remove(u,f),o.classList.add(km),r.classList.remove(km,f,u),this._isSliding=!1,l(D_)};this._queueCallback(g,r,this._isAnimated()),d&&this.cycle()}_isAnimated(){return this._element.classList.contains(Qce)}_getActive(){return dt.findOne(sde,this._element)}_getItems(){return dt.find(kq,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return Es()?e===jc?Oc:Zu:e===jc?Zu:Oc}_orderToDirection(e){return Es()?e===Oc?jc:Ng:e===Oc?Ng:jc}static jQueryInterface(e){return this.each(function(){const n=Mp.getOrCreateInstance(this,e);if(typeof e=="number"){n.to(e);return}if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e]()}})}}ge.on(document,Xce,ade,function(t){const e=vi(this);if(!e||!e.classList.contains(Fq))return;t.preventDefault();const n=Mp.getOrCreateInstance(e),r=this.getAttribute("data-bs-slide-to");if(r){n.to(r),n._maybeEnableCycle();return}if(wi.getDataAttribute(this,"slide")==="next"){n.next(),n._maybeEnableCycle();return}n.prev(),n._maybeEnableCycle()});ge.on(window,Jce,()=>{const t=dt.find(lde);for(const e of t)Mp.getOrCreateInstance(e)});Os(Mp);const fde="collapse",hde="bs.collapse",Lp=`.${hde}`,pde=".data-api",mde=`show${Lp}`,gde=`shown${Lp}`,yde=`hide${Lp}`,bde=`hidden${Lp}`,vde=`click${Lp}${pde}`,k_="show",od="collapse",Tm="collapsing",_de="collapsed",wde=`:scope .${od} .${od}`,xde="collapse-horizontal",Cde="width",Ede="height",Sde=".collapse.show, .collapse.collapsing",ux='[data-bs-toggle="collapse"]',Ade={parent:null,toggle:!0},Nde={parent:"(null|element)",toggle:"boolean"};class Yh extends so{constructor(e,n){super(e,n),this._isTransitioning=!1,this._triggerArray=[];const r=dt.find(ux);for(const s of r){const o=bq(s),a=dt.find(o).filter(l=>l===this._element);o!==null&&a.length&&this._triggerArray.push(s)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ade}static get DefaultType(){return Nde}static get NAME(){return fde}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(Sde).filter(l=>l!==this._element).map(l=>Yh.getOrCreateInstance(l,{toggle:!1}))),e.length&&e[0]._isTransitioning||ge.trigger(this._element,mde).defaultPrevented)return;for(const l of e)l.hide();const r=this._getDimension();this._element.classList.remove(od),this._element.classList.add(Tm),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const s=()=>{this._isTransitioning=!1,this._element.classList.remove(Tm),this._element.classList.add(od,k_),this._element.style[r]="",ge.trigger(this._element,gde)},a=`scroll${r[0].toUpperCase()+r.slice(1)}`;this._queueCallback(s,this._element,!0),this._element.style[r]=`${this._element[a]}px`}hide(){if(this._isTransitioning||!this._isShown()||ge.trigger(this._element,yde).defaultPrevented)return;const n=this._getDimension();this._element.style[n]=`${this._element.getBoundingClientRect()[n]}px`,Tp(this._element),this._element.classList.add(Tm),this._element.classList.remove(od,k_);for(const s of this._triggerArray){const o=vi(s);o&&!this._isShown(o)&&this._addAriaAndCollapsedClass([s],!1)}this._isTransitioning=!0;const r=()=>{this._isTransitioning=!1,this._element.classList.remove(Tm),this._element.classList.add(od),ge.trigger(this._element,bde)};this._element.style[n]="",this._queueCallback(r,this._element,!0)}_isShown(e=this._element){return e.classList.contains(k_)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=Ta(e.parent),e}_getDimension(){return this._element.classList.contains(xde)?Cde:Ede}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(ux);for(const n of e){const r=vi(n);r&&this._addAriaAndCollapsedClass([n],this._isShown(r))}}_getFirstLevelChildren(e){const n=dt.find(wde,this._config.parent);return dt.find(e,this._config.parent).filter(r=>!n.includes(r))}_addAriaAndCollapsedClass(e,n){if(e.length)for(const r of e)r.classList.toggle(_de,!n),r.setAttribute("aria-expanded",n)}static jQueryInterface(e){const n={};return typeof e=="string"&&/show|hide/.test(e)&&(n.toggle=!1),this.each(function(){const r=Yh.getOrCreateInstance(this,n);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e]()}})}}ge.on(document,vde,ux,function(t){(t.target.tagName==="A"||t.delegateTarget&&t.delegateTarget.tagName==="A")&&t.preventDefault();const e=bq(this),n=dt.find(e);for(const r of n)Yh.getOrCreateInstance(r,{toggle:!1}).toggle()});Os(Yh);const FO="dropdown",Rde="bs.dropdown",lc=`.${Rde}`,fA=".data-api",Pde="Escape",DO="Tab",Ode="ArrowUp",kO="ArrowDown",Fde=2,Dde=`hide${lc}`,kde=`hidden${lc}`,Tde=`show${lc}`,Ide=`shown${lc}`,Tq=`click${lc}${fA}`,Iq=`keydown${lc}${fA}`,Mde=`keyup${lc}${fA}`,$c="show",Lde="dropup",zde="dropend",qde="dropstart",jde="dropup-center",$de="dropdown-center",El='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Bde=`${El}.${$c}`,Rg=".dropdown-menu",Ude=".navbar",Yde=".navbar-nav",Hde=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Gde=Es()?"top-end":"top-start",Wde=Es()?"top-start":"top-end",Vde=Es()?"bottom-end":"bottom-start",Kde=Es()?"bottom-start":"bottom-end",Zde=Es()?"left-start":"right-start",Jde=Es()?"right-start":"left-start",Xde="top",Qde="bottom",eue={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},tue={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class vo extends so{constructor(e,n){super(e,n),this._popper=null,this._parent=this._element.parentNode,this._menu=dt.next(this._element,Rg)[0]||dt.prev(this._element,Rg)[0]||dt.findOne(Rg,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return eue}static get DefaultType(){return tue}static get NAME(){return FO}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Ia(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!ge.trigger(this._element,Tde,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(Yde))for(const r of[].concat(...document.body.children))ge.on(r,"mouseover",Ky);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add($c),this._element.classList.add($c),ge.trigger(this._element,Ide,e)}}hide(){if(Ia(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!ge.trigger(this._element,Dde,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const r of[].concat(...document.body.children))ge.off(r,"mouseover",Ky);this._popper&&this._popper.destroy(),this._menu.classList.remove($c),this._element.classList.remove($c),this._element.setAttribute("aria-expanded","false"),wi.removeDataAttribute(this._menu,"popper"),ge.trigger(this._element,kde,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!_i(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${FO.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof gq>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=this._parent:_i(this._config.reference)?e=Ta(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const n=this._getPopperConfig();this._popper=cA(e,this._menu,n)}_isShown(){return this._menu.classList.contains($c)}_getPlacement(){const e=this._parent;if(e.classList.contains(zde))return Zde;if(e.classList.contains(qde))return Jde;if(e.classList.contains(jde))return Xde;if(e.classList.contains($de))return Qde;const n=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(Lde)?n?Wde:Gde:n?Kde:Vde}_detectNavbar(){return this._element.closest(Ude)!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(n=>Number.parseInt(n,10)):typeof e=="function"?n=>e(n,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(wi.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...typeof this._config.popperConfig=="function"?this._config.popperConfig(e):this._config.popperConfig}}_selectMenuItem({key:e,target:n}){const r=dt.find(Hde,this._menu).filter(s=>vu(s));r.length&&dA(r,n,e===kO,!r.includes(n)).focus()}static jQueryInterface(e){return this.each(function(){const n=vo.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e]()}})}static clearMenus(e){if(e.button===Fde||e.type==="keyup"&&e.key!==DO)return;const n=dt.find(Bde);for(const r of n){const s=vo.getInstance(r);if(!s||s._config.autoClose===!1)continue;const o=e.composedPath(),a=o.includes(s._menu);if(o.includes(s._element)||s._config.autoClose==="inside"&&!a||s._config.autoClose==="outside"&&a||s._menu.contains(e.target)&&(e.type==="keyup"&&e.key===DO||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const l={relatedTarget:s._element};e.type==="click"&&(l.clickEvent=e),s._completeHide(l)}}static dataApiKeydownHandler(e){const n=/input|textarea/i.test(e.target.tagName),r=e.key===Pde,s=[Ode,kO].includes(e.key);if(!s&&!r||n&&!r)return;e.preventDefault();const o=this.matches(El)?this:dt.prev(this,El)[0]||dt.next(this,El)[0]||dt.findOne(El,e.delegateTarget.parentNode),a=vo.getOrCreateInstance(o);if(s){e.stopPropagation(),a.show(),a._selectMenuItem(e);return}a._isShown()&&(e.stopPropagation(),a.hide(),o.focus())}}ge.on(document,Iq,El,vo.dataApiKeydownHandler);ge.on(document,Iq,Rg,vo.dataApiKeydownHandler);ge.on(document,Tq,vo.clearMenus);ge.on(document,Mde,vo.clearMenus);ge.on(document,Tq,El,function(t){t.preventDefault(),vo.getOrCreateInstance(this).toggle()});Os(vo);const TO=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",IO=".sticky-top",Im="padding-right",MO="margin-right";class fx{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Im,n=>n+e),this._setElementAttributes(TO,Im,n=>n+e),this._setElementAttributes(IO,MO,n=>n-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Im),this._resetElementAttributes(TO,Im),this._resetElementAttributes(IO,MO)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,n,r){const s=this.getWidth(),o=a=>{if(a!==this._element&&window.innerWidth>a.clientWidth+s)return;this._saveInitialAttribute(a,n);const l=window.getComputedStyle(a).getPropertyValue(n);a.style.setProperty(n,`${r(Number.parseFloat(l))}px`)};this._applyManipulationCallback(e,o)}_saveInitialAttribute(e,n){const r=e.style.getPropertyValue(n);r&&wi.setDataAttribute(e,n,r)}_resetElementAttributes(e,n){const r=s=>{const o=wi.getDataAttribute(s,n);if(o===null){s.style.removeProperty(n);return}wi.removeDataAttribute(s,n),s.style.setProperty(n,o)};this._applyManipulationCallback(e,r)}_applyManipulationCallback(e,n){if(_i(e)){n(e);return}for(const r of dt.find(e,this._element))n(r)}}const Mq="backdrop",nue="fade",LO="show",zO=`mousedown.bs.${Mq}`,rue={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},sue={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Lq extends Ip{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return rue}static get DefaultType(){return sue}static get NAME(){return Mq}show(e){if(!this._config.isVisible){Qo(e);return}this._append();const n=this._getElement();this._config.isAnimated&&Tp(n),n.classList.add(LO),this._emulateAnimation(()=>{Qo(e)})}hide(e){if(!this._config.isVisible){Qo(e);return}this._getElement().classList.remove(LO),this._emulateAnimation(()=>{this.dispose(),Qo(e)})}dispose(){this._isAppended&&(ge.off(this._element,zO),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(nue),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=Ta(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),ge.on(e,zO,()=>{Qo(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){xq(e,this._getElement(),this._config.isAnimated)}}const oue="focustrap",iue="bs.focustrap",Jy=`.${iue}`,aue=`focusin${Jy}`,lue=`keydown.tab${Jy}`,cue="Tab",due="forward",qO="backward",uue={autofocus:!0,trapElement:null},fue={autofocus:"boolean",trapElement:"element"};class zq extends Ip{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return uue}static get DefaultType(){return fue}static get NAME(){return oue}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),ge.off(document,Jy),ge.on(document,aue,e=>this._handleFocusin(e)),ge.on(document,lue,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,ge.off(document,Jy))}_handleFocusin(e){const{trapElement:n}=this._config;if(e.target===document||e.target===n||n.contains(e.target))return;const r=dt.focusableChildren(n);r.length===0?n.focus():this._lastTabNavDirection===qO?r[r.length-1].focus():r[0].focus()}_handleKeydown(e){e.key===cue&&(this._lastTabNavDirection=e.shiftKey?qO:due)}}const hue="modal",pue="bs.modal",oo=`.${pue}`,mue=".data-api",gue="Escape",yue=`hide${oo}`,bue=`hidePrevented${oo}`,qq=`hidden${oo}`,jq=`show${oo}`,vue=`shown${oo}`,_ue=`resize${oo}`,wue=`click.dismiss${oo}`,xue=`mousedown.dismiss${oo}`,Cue=`keydown.dismiss${oo}`,Eue=`click${oo}${mue}`,jO="modal-open",Sue="fade",$O="show",T_="modal-static",Aue=".modal.show",Nue=".modal-dialog",Rue=".modal-body",Pue='[data-bs-toggle="modal"]',Oue={backdrop:!0,focus:!0,keyboard:!0},Fue={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Vd extends so{constructor(e,n){super(e,n),this._dialog=dt.findOne(Nue,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new fx,this._addEventListeners()}static get Default(){return Oue}static get DefaultType(){return Fue}static get NAME(){return hue}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||ge.trigger(this._element,jq,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(jO),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||ge.trigger(this._element,yue).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove($O),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){for(const e of[window,this._dialog])ge.off(e,oo);this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Lq({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new zq({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const n=dt.findOne(Rue,this._dialog);n&&(n.scrollTop=0),Tp(this._element),this._element.classList.add($O);const r=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,ge.trigger(this._element,vue,{relatedTarget:e})};this._queueCallback(r,this._dialog,this._isAnimated())}_addEventListeners(){ge.on(this._element,Cue,e=>{if(e.key===gue){if(this._config.keyboard){e.preventDefault(),this.hide();return}this._triggerBackdropTransition()}}),ge.on(window,_ue,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),ge.on(this._element,xue,e=>{ge.one(this._element,wue,n=>{if(!(this._element!==e.target||this._element!==n.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(jO),this._resetAdjustments(),this._scrollBar.reset(),ge.trigger(this._element,qq)})}_isAnimated(){return this._element.classList.contains(Sue)}_triggerBackdropTransition(){if(ge.trigger(this._element,bue).defaultPrevented)return;const n=this._element.scrollHeight>document.documentElement.clientHeight,r=this._element.style.overflowY;r==="hidden"||this._element.classList.contains(T_)||(n||(this._element.style.overflowY="hidden"),this._element.classList.add(T_),this._queueCallback(()=>{this._element.classList.remove(T_),this._queueCallback(()=>{this._element.style.overflowY=r},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,n=this._scrollBar.getWidth(),r=n>0;if(r&&!e){const s=Es()?"paddingLeft":"paddingRight";this._element.style[s]=`${n}px`}if(!r&&e){const s=Es()?"paddingRight":"paddingLeft";this._element.style[s]=`${n}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,n){return this.each(function(){const r=Vd.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e](n)}})}}ge.on(document,Eue,Pue,function(t){const e=vi(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),ge.one(e,jq,s=>{s.defaultPrevented||ge.one(e,qq,()=>{vu(this)&&this.focus()})});const n=dt.findOne(Aue);n&&Vd.getInstance(n).hide(),Vd.getOrCreateInstance(e).toggle(this)});Ev(Vd);Os(Vd);const Due="offcanvas",kue="bs.offcanvas",zi=`.${kue}`,$q=".data-api",Tue=`load${zi}${$q}`,Iue="Escape",BO="show",UO="showing",YO="hiding",Mue="offcanvas-backdrop",Bq=".offcanvas.show",Lue=`show${zi}`,zue=`shown${zi}`,que=`hide${zi}`,HO=`hidePrevented${zi}`,Uq=`hidden${zi}`,jue=`resize${zi}`,$ue=`click${zi}${$q}`,Bue=`keydown.dismiss${zi}`,Uue='[data-bs-toggle="offcanvas"]',Yue={backdrop:!0,keyboard:!0,scroll:!1},Hue={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Ma extends so{constructor(e,n){super(e,n),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Yue}static get DefaultType(){return Hue}static get NAME(){return Due}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||ge.trigger(this._element,Lue,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new fx().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(UO);const r=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(BO),this._element.classList.remove(UO),ge.trigger(this._element,zue,{relatedTarget:e})};this._queueCallback(r,this._element,!0)}hide(){if(!this._isShown||ge.trigger(this._element,que).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(YO),this._backdrop.hide();const n=()=>{this._element.classList.remove(BO,YO),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new fx().reset(),ge.trigger(this._element,Uq)};this._queueCallback(n,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=()=>{if(this._config.backdrop==="static"){ge.trigger(this._element,HO);return}this.hide()},n=!!this._config.backdrop;return new Lq({className:Mue,isVisible:n,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:n?e:null})}_initializeFocusTrap(){return new zq({trapElement:this._element})}_addEventListeners(){ge.on(this._element,Bue,e=>{if(e.key===Iue){if(!this._config.keyboard){ge.trigger(this._element,HO);return}this.hide()}})}static jQueryInterface(e){return this.each(function(){const n=Ma.getOrCreateInstance(this,e);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e](this)}})}}ge.on(document,$ue,Uue,function(t){const e=vi(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Ia(this))return;ge.one(e,Uq,()=>{vu(this)&&this.focus()});const n=dt.findOne(Bq);n&&n!==e&&Ma.getInstance(n).hide(),Ma.getOrCreateInstance(e).toggle(this)});ge.on(window,Tue,()=>{for(const t of dt.find(Bq))Ma.getOrCreateInstance(t).show()});ge.on(window,jue,()=>{for(const t of dt.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(t).position!=="fixed"&&Ma.getOrCreateInstance(t).hide()});Ev(Ma);Os(Ma);const Gue=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Wue=/^aria-[\w-]*$/i,Vue=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Kue=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Zue=(t,e)=>{const n=t.nodeName.toLowerCase();return e.includes(n)?Gue.has(n)?!!(Vue.test(t.nodeValue)||Kue.test(t.nodeValue)):!0:e.filter(r=>r instanceof RegExp).some(r=>r.test(n))},Yq={"*":["class","dir","id","lang","role",Wue],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};function Jue(t,e,n){if(!t.length)return t;if(n&&typeof n=="function")return n(t);const s=new window.DOMParser().parseFromString(t,"text/html"),o=[].concat(...s.body.querySelectorAll("*"));for(const a of o){const l=a.nodeName.toLowerCase();if(!Object.keys(e).includes(l)){a.remove();continue}const c=[].concat(...a.attributes),d=[].concat(e["*"]||[],e[l]||[]);for(const u of c)Zue(u,d)||a.removeAttribute(u.nodeName)}return s.body.innerHTML}const Xue="TemplateFactory",Que={allowList:Yq,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},efe={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},tfe={entry:"(string|element|function|null)",selector:"(string|element)"};class nfe extends Ip{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return Que}static get DefaultType(){return efe}static get NAME(){return Xue}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[s,o]of Object.entries(this._config.content))this._setContent(e,o,s);const n=e.children[0],r=this._resolvePossibleFunction(this._config.extraClass);return r&&n.classList.add(...r.split(" ")),n}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[n,r]of Object.entries(e))super._typeCheckConfig({selector:n,entry:r},tfe)}_setContent(e,n,r){const s=dt.findOne(r,e);if(s){if(n=this._resolvePossibleFunction(n),!n){s.remove();return}if(_i(n)){this._putElementInTemplate(Ta(n),s);return}if(this._config.html){s.innerHTML=this._maybeSanitize(n);return}s.textContent=n}}_maybeSanitize(e){return this._config.sanitize?Jue(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return typeof e=="function"?e(this):e}_putElementInTemplate(e,n){if(this._config.html){n.innerHTML="",n.append(e);return}n.textContent=e.textContent}}const rfe="tooltip",sfe=new Set(["sanitize","allowList","sanitizeFn"]),I_="fade",ofe="modal",Mm="show",ife=".tooltip-inner",GO=`.${ofe}`,WO="hide.bs.modal",Ju="hover",M_="focus",afe="click",lfe="manual",cfe="hide",dfe="hidden",ufe="show",ffe="shown",hfe="inserted",pfe="click",mfe="focusin",gfe="focusout",yfe="mouseenter",bfe="mouseleave",vfe={AUTO:"auto",TOP:"top",RIGHT:Es()?"left":"right",BOTTOM:"bottom",LEFT:Es()?"right":"left"},_fe={allowList:Yq,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},wfe={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};let Nv=class Hq extends so{constructor(e,n){if(typeof gq>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,n),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return _fe}static get DefaultType(){return wfe}static get NAME(){return rfe}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),ge.off(this._element.closest(GO),WO,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const e=ge.trigger(this._element,this.constructor.eventName(ufe)),r=(_q(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!r)return;this._disposePopper();const s=this._getTipElement();this._element.setAttribute("aria-describedby",s.getAttribute("id"));const{container:o}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(o.append(s),ge.trigger(this._element,this.constructor.eventName(hfe))),this._popper=this._createPopper(s),s.classList.add(Mm),"ontouchstart"in document.documentElement)for(const l of[].concat(...document.body.children))ge.on(l,"mouseover",Ky);const a=()=>{ge.trigger(this._element,this.constructor.eventName(ffe)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(a,this.tip,this._isAnimated())}hide(){if(!this._isShown()||ge.trigger(this._element,this.constructor.eventName(cfe)).defaultPrevented)return;if(this._getTipElement().classList.remove(Mm),"ontouchstart"in document.documentElement)for(const s of[].concat(...document.body.children))ge.off(s,"mouseover",Ky);this._activeTrigger[afe]=!1,this._activeTrigger[M_]=!1,this._activeTrigger[Ju]=!1,this._isHovered=null;const r=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),ge.trigger(this._element,this.constructor.eventName(dfe)))};this._queueCallback(r,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const n=this._getTemplateFactory(e).toHtml();if(!n)return null;n.classList.remove(I_,Mm),n.classList.add(`bs-${this.constructor.NAME}-auto`);const r=ice(this.constructor.NAME).toString();return n.setAttribute("id",r),this._isAnimated()&&n.classList.add(I_),n}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new nfe({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[ife]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(I_)}_isShown(){return this.tip&&this.tip.classList.contains(Mm)}_createPopper(e){const n=typeof this._config.placement=="function"?this._config.placement.call(this,e,this._element):this._config.placement,r=vfe[n.toUpperCase()];return cA(this._element,e,this._getPopperConfig(r))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(n=>Number.parseInt(n,10)):typeof e=="function"?n=>e(n,this._element):e}_resolvePossibleFunction(e){return typeof e=="function"?e.call(this._element):e}_getPopperConfig(e){const n={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:r=>{this._getTipElement().setAttribute("data-popper-placement",r.state.placement)}}]};return{...n,...typeof this._config.popperConfig=="function"?this._config.popperConfig(n):this._config.popperConfig}}_setListeners(){const e=this._config.trigger.split(" ");for(const n of e)if(n==="click")ge.on(this._element,this.constructor.eventName(pfe),this._config.selector,r=>{this._initializeOnDelegatedTarget(r).toggle()});else if(n!==lfe){const r=n===Ju?this.constructor.eventName(yfe):this.constructor.eventName(mfe),s=n===Ju?this.constructor.eventName(bfe):this.constructor.eventName(gfe);ge.on(this._element,r,this._config.selector,o=>{const a=this._initializeOnDelegatedTarget(o);a._activeTrigger[o.type==="focusin"?M_:Ju]=!0,a._enter()}),ge.on(this._element,s,this._config.selector,o=>{const a=this._initializeOnDelegatedTarget(o);a._activeTrigger[o.type==="focusout"?M_:Ju]=a._element.contains(o.relatedTarget),a._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},ge.on(this._element.closest(GO),WO,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,n){clearTimeout(this._timeout),this._timeout=setTimeout(e,n)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const n=wi.getDataAttributes(this._element);for(const r of Object.keys(n))sfe.has(r)&&delete n[r];return e={...n,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:Ta(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const n in this._config)this.constructor.Default[n]!==this._config[n]&&(e[n]=this._config[n]);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const n=Hq.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e]()}})}};Os(Nv);const xfe="popover",Cfe=".popover-header",Efe=".popover-body",Sfe={...Nv.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},Afe={...Nv.DefaultType,content:"(null|string|element|function)"};class hA extends Nv{static get Default(){return Sfe}static get DefaultType(){return Afe}static get NAME(){return xfe}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Cfe]:this._getTitle(),[Efe]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const n=hA.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e]()}})}}Os(hA);const Nfe="scrollspy",Rfe="bs.scrollspy",pA=`.${Rfe}`,Pfe=".data-api",Ofe=`activate${pA}`,VO=`click${pA}`,Ffe=`load${pA}${Pfe}`,Dfe="dropdown-item",Fc="active",kfe='[data-bs-spy="scroll"]',L_="[href]",Tfe=".nav, .list-group",KO=".nav-link",Ife=".nav-item",Mfe=".list-group-item",Lfe=`${KO}, ${Ife} > ${KO}, ${Mfe}`,zfe=".dropdown",qfe=".dropdown-toggle",jfe={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},$fe={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Rv extends so{constructor(e,n){super(e,n),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return jfe}static get DefaultType(){return $fe}static get NAME(){return Nfe}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=Ta(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(n=>Number.parseFloat(n))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(ge.off(this._config.target,VO),ge.on(this._config.target,VO,L_,e=>{const n=this._observableSections.get(e.target.hash);if(n){e.preventDefault();const r=this._rootElement||window,s=n.offsetTop-this._element.offsetTop;if(r.scrollTo){r.scrollTo({top:s,behavior:"smooth"});return}r.scrollTop=s}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(n=>this._observerCallback(n),e)}_observerCallback(e){const n=a=>this._targetLinks.get(`#${a.target.id}`),r=a=>{this._previousScrollData.visibleEntryTop=a.target.offsetTop,this._process(n(a))},s=(this._rootElement||document.documentElement).scrollTop,o=s>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=s;for(const a of e){if(!a.isIntersecting){this._activeTarget=null,this._clearActiveClass(n(a));continue}const l=a.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(o&&l){if(r(a),!s)return;continue}!o&&!l&&r(a)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=dt.find(L_,this._config.target);for(const n of e){if(!n.hash||Ia(n))continue;const r=dt.findOne(n.hash,this._element);vu(r)&&(this._targetLinks.set(n.hash,n),this._observableSections.set(n.hash,r))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(Fc),this._activateParents(e),ge.trigger(this._element,Ofe,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(Dfe)){dt.findOne(qfe,e.closest(zfe)).classList.add(Fc);return}for(const n of dt.parents(e,Tfe))for(const r of dt.prev(n,Lfe))r.classList.add(Fc)}_clearActiveClass(e){e.classList.remove(Fc);const n=dt.find(`${L_}.${Fc}`,e);for(const r of n)r.classList.remove(Fc)}static jQueryInterface(e){return this.each(function(){const n=Rv.getOrCreateInstance(this,e);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e]()}})}}ge.on(window,Ffe,()=>{for(const t of dt.find(kfe))Rv.getOrCreateInstance(t)});Os(Rv);const Bfe="tab",Ufe="bs.tab",cc=`.${Ufe}`,Yfe=`hide${cc}`,Hfe=`hidden${cc}`,Gfe=`show${cc}`,Wfe=`shown${cc}`,Vfe=`click${cc}`,Kfe=`keydown${cc}`,Zfe=`load${cc}`,Jfe="ArrowLeft",ZO="ArrowRight",Xfe="ArrowUp",JO="ArrowDown",Sl="active",XO="fade",z_="show",Qfe="dropdown",ehe=".dropdown-toggle",the=".dropdown-menu",q_=":not(.dropdown-toggle)",nhe='.list-group, .nav, [role="tablist"]',rhe=".nav-item, .list-group-item",she=`.nav-link${q_}, .list-group-item${q_}, [role="tab"]${q_}`,Gq='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',j_=`${she}, ${Gq}`,ohe=`.${Sl}[data-bs-toggle="tab"], .${Sl}[data-bs-toggle="pill"], .${Sl}[data-bs-toggle="list"]`;class Kd extends so{constructor(e){super(e),this._parent=this._element.closest(nhe),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),ge.on(this._element,Kfe,n=>this._keydown(n)))}static get NAME(){return Bfe}show(){const e=this._element;if(this._elemIsActive(e))return;const n=this._getActiveElem(),r=n?ge.trigger(n,Yfe,{relatedTarget:e}):null;ge.trigger(e,Gfe,{relatedTarget:n}).defaultPrevented||r&&r.defaultPrevented||(this._deactivate(n,e),this._activate(e,n))}_activate(e,n){if(!e)return;e.classList.add(Sl),this._activate(vi(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add(z_);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),ge.trigger(e,Wfe,{relatedTarget:n})};this._queueCallback(r,e,e.classList.contains(XO))}_deactivate(e,n){if(!e)return;e.classList.remove(Sl),e.blur(),this._deactivate(vi(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(z_);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),ge.trigger(e,Hfe,{relatedTarget:n})};this._queueCallback(r,e,e.classList.contains(XO))}_keydown(e){if(![Jfe,ZO,Xfe,JO].includes(e.key))return;e.stopPropagation(),e.preventDefault();const n=[ZO,JO].includes(e.key),r=dA(this._getChildren().filter(s=>!Ia(s)),e.target,n,!0);r&&(r.focus({preventScroll:!0}),Kd.getOrCreateInstance(r).show())}_getChildren(){return dt.find(j_,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,n){this._setAttributeIfNotExists(e,"role","tablist");for(const r of n)this._setInitialAttributesOnChild(r)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const n=this._elemIsActive(e),r=this._getOuterElement(e);e.setAttribute("aria-selected",n),r!==e&&this._setAttributeIfNotExists(r,"role","presentation"),n||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const n=vi(e);n&&(this._setAttributeIfNotExists(n,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(n,"aria-labelledby",`#${e.id}`))}_toggleDropDown(e,n){const r=this._getOuterElement(e);if(!r.classList.contains(Qfe))return;const s=(o,a)=>{const l=dt.findOne(o,r);l&&l.classList.toggle(a,n)};s(ehe,Sl),s(the,z_),r.setAttribute("aria-expanded",n)}_setAttributeIfNotExists(e,n,r){e.hasAttribute(n)||e.setAttribute(n,r)}_elemIsActive(e){return e.classList.contains(Sl)}_getInnerElement(e){return e.matches(j_)?e:dt.findOne(j_,e)}_getOuterElement(e){return e.closest(rhe)||e}static jQueryInterface(e){return this.each(function(){const n=Kd.getOrCreateInstance(this);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e]()}})}}ge.on(document,Vfe,Gq,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),!Ia(this)&&Kd.getOrCreateInstance(this).show()});ge.on(window,Zfe,()=>{for(const t of dt.find(ohe))Kd.getOrCreateInstance(t)});Os(Kd);const ihe="toast",ahe="bs.toast",Za=`.${ahe}`,lhe=`mouseover${Za}`,che=`mouseout${Za}`,dhe=`focusin${Za}`,uhe=`focusout${Za}`,fhe=`hide${Za}`,hhe=`hidden${Za}`,phe=`show${Za}`,mhe=`shown${Za}`,ghe="fade",QO="hide",Lm="show",zm="showing",yhe={animation:"boolean",autohide:"boolean",delay:"number"},bhe={animation:!0,autohide:!0,delay:5e3};class Pv extends so{constructor(e,n){super(e,n),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return bhe}static get DefaultType(){return yhe}static get NAME(){return ihe}show(){if(ge.trigger(this._element,phe).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(ghe);const n=()=>{this._element.classList.remove(zm),ge.trigger(this._element,mhe),this._maybeScheduleHide()};this._element.classList.remove(QO),Tp(this._element),this._element.classList.add(Lm,zm),this._queueCallback(n,this._element,this._config.animation)}hide(){if(!this.isShown()||ge.trigger(this._element,fhe).defaultPrevented)return;const n=()=>{this._element.classList.add(QO),this._element.classList.remove(zm,Lm),ge.trigger(this._element,hhe)};this._element.classList.add(zm),this._queueCallback(n,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Lm),super.dispose()}isShown(){return this._element.classList.contains(Lm)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,n){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=n;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=n;break}}if(n){this._clearTimeout();return}const r=e.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){ge.on(this._element,lhe,e=>this._onInteraction(e,!0)),ge.on(this._element,che,e=>this._onInteraction(e,!1)),ge.on(this._element,dhe,e=>this._onInteraction(e,!0)),ge.on(this._element,uhe,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const n=Pv.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e](this)}})}}Ev(Pv);Os(Pv);function vhe({fixtures:t,escudosRef:e}){const[n,r]=C.useState([]),s=t.reduce((c,d)=>{const u=d.grupoCopas,f=d.jornada;return c[u]||(c[u]={}),c[u][f]||(c[u][f]=[]),c[u][f].push(d),c},{}),o=Object.keys(s).sort();C.useEffect(()=>{const d=e.filter(u=>u.torneo==="UEFACLASIFICACION"&&u.genero==="Masculino"&&u.organizador==="Fifa").map(u=>({escudo:u.escudos,equipo:u.nombre}));r(d)},[e]);const a=(c,d)=>{l("/videos",{state:{url:c,data:d}})},l=Rt();return i(ee,{children:i(ae,{children:o.map(c=>{const d=Object.keys(s[c]),u=[];for(let f=0;f<d.length;f+=2)u.push(d.slice(f,f+2));return u.map((f,g)=>i(V,{children:f.map(E=>i($,{md:6,xs:6,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",children:[p("thead",{style:{color:"transparent",borderColor:"transparent"},children:[p("tr",{children:[i("th",{style:{width:"20%"}}),i("th",{style:{width:"5%"}}),i("th",{style:{width:"5%"}}),i("th",{style:{width:"20%"}}),i("th",{style:{width:"10%"}})]}),i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"11px"},children:[" Fecha ",E]})})]}),i("tbody",{children:s[c][E].map(S=>{const w=n.find(k=>k.equipo===S.equipolocal),_=n.find(k=>k.equipo===S.equipovisitante),h=Re(S.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("DD/MM/YYYY"),m=S.estado==="Jugandose"?"red":"white",A=S.estado==="Jugandose"?"white":"black";return p(Fe.Fragment,{children:[i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:[" ",h!==""?h:"A confirmar"]})}),p("tr",{className:"align-middle",children:[p("td",{className:"bg-white",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px"},children:[w&&i("img",{src:w.escudo,alt:w.equipo,width:"15",height:"15"})," ",S.equipolocal.substring(0,3).toUpperCase()]}),i("td",{className:"",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:m,color:A},children:S.estado==="Finalizado"||S.estado==="Jugandose"?S.goleslocal:""}),i("td",{className:"",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:m,color:A},children:S.estado==="Finalizado"||S.estado==="Jugandose"?S.golesvisitante:""}),p("td",{className:"bg-white",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px"},children:[S.equipovisitante.substring(0,3).toUpperCase()," ",_&&i("img",{src:_.escudo,alt:_.equipo,width:"15",height:"15"})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:S.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{a(S.linkgoles,{id:S.id,estado:S.estado,equipolocal:S.equipolocal,equipovisitante:S.equipovisitante,goleslocal:S.goleslocal,penaleslocal:S.penaleslocal,penalesvisitante:S.penalesvisitante,golesvisitante:S.golesvisitante,escudoLocal:w,escudoVisitante:_,tiempodelpartido:S.tiempodelpartido,hora,goleadoresLocal:S.goleadoresLocal,goleadoresVisitante:S.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})})})]})]},S.id)})})]})},E))},g))})})})}const _he=()=>{const[t,e]=C.useState([]),[n,r]=C.useState(!0),[s,o]=C.useState([]),[a,l]=C.useState([]),c=v_(si(sd,"1xD10-tawmlMevscwue25TRJ7HL2SK-QLR7PUGUeK2k0/Tablas2023"),y_("torneo"),b_("UEFACLASIFICACION")),d=v_(si(sd,"1xD10-tawmlMevscwue25TRJ7HL2SK-QLR7PUGUeK2k0/Equipos"),y_("torneo"),b_("UEFACLASIFICACION")),u=v_(si(sd,"1xD10-tawmlMevscwue25TRJ7HL2SK-QLR7PUGUeK2k0/Fixture2023"),y_("torneo"),b_("UEFACLASIFICACION")),f=si(sd,"1xD10-tawmlMevscwue25TRJ7HL2SK-QLR7PUGUeK2k0/CanalesTv");C.useEffect(()=>{bd(u,w=>{const _=w.val(),h=Object.values(_).filter(m=>m.torneo==="UEFACLASIFICACION"&&m.ganador);l(h),ZP(u,"value")})},[]),C.useEffect(()=>(Wne(u,w=>{const _=w.val();l(h=>{const m=h.findIndex(A=>A.id===_.id);return h[m]=_,[...h]})}),()=>{ZP(u,"child_changed")}),[]),C.useEffect(()=>{bd(d,w=>{const _=w.val(),h=Object.values(_).filter(m=>m.torneo==="UEFACLASIFICACION"&&m.genero==="Masculino"&&m.organizador==="Fifa");o(h)})},[]),C.useEffect(()=>{bd(c,w=>{const _=w.val();if(_!==null)if(typeof _=="object"){const A=Object.values(_).sort((k,R)=>k.posicion-R.posicion).reduce((k,R)=>(k[R.grupo]||(k[R.grupo]=[]),k[R.grupo].push(R),k),{});e(A),r(!1)}else console.error("Data is not an object");else console.error("Data is null")})},[]);const g=[];for(const w in t)if(Object.hasOwnProperty.call(t,w)){const _=t[w].filter(h=>h.posicion===1);g.push(..._)}const E=[];for(const w in t)if(Object.hasOwnProperty.call(t,w)){const _=t[w].filter(h=>h.posicion===2);E.push(..._)}E.length>0&&(E.sort((w,_)=>w.puntos>_.puntos?-1:w.puntos===_.puntos?w.dif>_.dif?-1:w.dif===_.dif?w.gf>_.gf?-1:w.gf===_.gf?0:1:1:1),E.splice(4));const S=()=>{const w=[];let _=[];for(let h in t){const m=a.filter(k=>k.grupoCopas===h),A=p("div",{children:[p("h2",{className:"fw-bolder",style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",color:"white",fontSize:13},children:["Grupo ",h]}),i(Jle,{dataTabla:t[h],escudos:s}),i(vhe,{fixtures:m,escudosRef:s,canalesTvRef:f,dataTabla:t})]},h);_.push(A),_.length===2&&(w.push(p("div",{className:"row",children:[i("div",{className:"col",children:i("div",{className:"table-row",children:_[0]})}),i("div",{className:"col",children:i("div",{className:"table-row",children:_[1]})})]},w.length)),_=[])}return _.length===1&&w.push(p("div",{className:"row",children:[i("div",{className:" col-sm-6",children:i("div",{className:"table-row",children:_[0]})}),i("div",{className:"col-sm-2",children:i("div",{className:"table-row",children:""})})]},w.length)),w};return p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL UEFA CLASIFICACION MUNDIAL TABLAS - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA, UEFA: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Europa!"})]}),p(ae,{className:"tamañoTorneo",children:[p(ae,{children:[i(V,{className:"justify-content-center",children:i($,{md:6,className:"text-center",children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i(Ft,{style:{marginRight:3}}),"UEFA CLASIFICACION MUNDIAL 2023",i(Ft,{style:{marginLeft:3}})]})})}),i(V,{className:"justify-content-center mb-3",children:i($,{className:"text-center banner",children:i(et,{})})}),p(V,{className:"justify-content-center",children:[p($,{md:4,className:"text-center",children:[i("h2",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"12px"},children:"CLASIFICADOS AL MUNDIAL"}),i("div",{className:"mb-2",style:{backgroundColor:"#B8F7A6",display:"flex",justifyContent:"center"},children:g.map((w,_)=>i("p",{className:"text-dark fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"12px",margin:"3px"},children:w.equipo},_))})]}),p($,{md:4,className:"text-center",children:[i("h2",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"12px"},children:"CLASIFICADOS AL PLAYOFFS"}),i("div",{className:"mb-2",style:{backgroundColor:"#BAC1C0",display:"flex",justifyContent:"center"},children:E.map((w,_)=>i("p",{className:"text-dark fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"12px",margin:"3px"},children:w.equipo},_))})]})]}),i(V,{className:"justify-content-center",children:i($,{md:6,className:"text-center",children:i("h2",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"TABLA DE PUNTOS"})})})]}),i(ae,{className:"d-flex justify-content-center align-items-center flex-column mb-5",children:i(V,{className:"justify-content-center",children:i($,{md:12,className:"text-center",children:n?i(LW,{animation:"border",role:"status",children:i("span",{className:"visually-hidden",children:"Loading..."})}):S()})})})]})]})};function Wq(t){return Pt({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"12",x2:"5",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 19 5 12 12 5"},child:[]}]})(t)}function Vq(t){return Pt({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 5 19 12 12 19"},child:[]}]})(t)}function whe(t){return Pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18.2048 2.25H21.5128L14.2858 10.51L22.7878 21.75H16.1308L10.9168 14.933L4.95084 21.75H1.64084L9.37084 12.915L1.21484 2.25H8.04084L12.7538 8.481L18.2048 2.25ZM17.0438 19.77H18.8768L7.04484 4.126H5.07784L17.0438 19.77Z"},child:[]}]})(t)}function xhe(t){return Pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z"},child:[]}]})(t)}function Che(t){return Pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z"},child:[]},{tag:"path",attr:{d:"m18 13-1.41-1.41L12 16.17l-4.59-4.58L6 13l6 6z"},child:[]}]})(t)}const Ehe=()=>{var v;const[t,e]=C.useState(""),[n,r]=C.useState([]),[s,o]=C.useState({}),[a,l]=C.useState({}),[c,d]=C.useState([]),[u,f]=C.useState([]),[g,E]=C.useState(!0),S=Rt();se().startOf("day"),C.useEffect(()=>{w(),_(),h();const b=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},P=>{w(),_(),h()}).subscribe();return()=>{b.unsubscribe()}},[]);const w=async()=>{const{data:b,error:P}=await z.from("Fixture2023").select().eq("torneo","AMISTOSOINT").eq("añoTorneo","2024").order("fecha",{ascending:!1});if(!P&&(b!=null&&b.length)){const F=m(b);o(F),l(F),E(!1)}else throw new Error("No hay datos disponibles")},_=async()=>{const{data:b,error:P}=await z.from("CanalesTv").select();if(!P&&(b!=null&&b.length))d(b);else throw new Error("No hay datos disponibles")},h=async()=>{const{data:b,error:P}=await z.from("Equipos").select();if(!P&&(b!=null&&b.length))f(b);else throw new Error("No hay datos disponibles")},m=b=>{const P={};b.forEach(I=>{const T=I.torneo,q=I.fecha;P[T]||(P[T]={}),P[T][q]||(P[T][q]=[]),P[T][q].push(I)});const F={};return Object.keys(P).sort().forEach(I=>{F[I]={},Object.keys(P[I]).sort((T,q)=>new Date(q)-new Date(T)).forEach(T=>{F[I][T]=P[I][T]})}),F},A=(b,P)=>{S("/videos",{state:{url:b,data:P}})};C.useEffect(()=>{o(s)},[s]);const R=(b=>{const P=new Set;return Object.values(b).forEach(F=>{Object.values(F).forEach(I=>{I.forEach(T=>{P.add(T.equipolocal),P.add(T.equipovisitante)})})}),Array.from(P).sort()})(a),O=b=>{const P=b.target.value.toLowerCase();if(e(P),P==="all")o(a);else{const F=Object.entries(a).reduce((I,[T,q])=>{const W=Object.entries(q).reduce((G,[H,j])=>{const U=j.filter(L=>L.equipolocal.toLowerCase().includes(P)||L.equipovisitante.toLowerCase().includes(P));return U.length>0&&(G[H]=U),G},{});return Object.keys(W).length>0&&(I[T]=W),I},{});o(F)}};if(g)return i("div",{className:"d-flex justify-content-center",style:{marginTop:250},children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})});const N=["Final","3 puesto","Semi final","Cuartos de final","Octavos de final","16avos","32avos","5 puesto","7 puesto","5 a 8 puesto","9 puesto","11 puesto","2° Fase","1° Fase"];return Object.values(s).map(b=>Object.values(b).map(P=>P.filter(F=>F.ganador==="Argentina"))).flat(2).flat(1).length,Object.values(s).map(b=>Object.values(b).map(P=>P.filter(F=>F.equipolocal==="Argentina"||F.equipovisitante==="Argentina"&&F.ganador!=="Argentina"&&F.ganador!=="empate"&&F.estado==="Finalizado"))),p(ee,{children:[p(Xe,{children:[i("title",{children:" SEGUNDOPALO - Futsal INTERNACIONAL - AMISTOSOS FIFA INTERNACIONALES - Fixture completo con tabla de posiciones"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera A, B, C, D : tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{fluid:"sm",className:"anchoPruebaJugadores",children:[i("div",{className:"d-flex justify-content-center tituloPartidosDia",style:{height:"auto",backgroundColor:"#001c31",alignItems:"center"},children:i(V,{children:i($,{children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:[i(Ft,{})," AMISTOSOS INTERNACIONALES 2024 ",i(Ft,{})]})})})}),i("div",{className:"mt-3 mb-4 ",children:i(V,{children:i($,{children:i(et,{})})})}),i(V,{children:i($,{children:i("div",{className:"d-flex justify-content-center",children:p(Ae.Select,{value:t,onChange:O,size:"sm",style:{fontSize:"17px",fontFamily:"Roboto Condensed, sans-serif"},children:[i("option",{value:"",children:"Seleccionar equipo"}),i("option",{value:"all",children:"Seleccionar todos"}),R.map(b=>i("option",{value:b,children:b},b))]})})})}),i(V,{children:p($,{className:"mt-2",children:[i("h6",{className:"text-white text-center fw-bolder",style:{fontSize:"17px",fontFamily:"Roboto Condensed, sans-serif"},children:t!==""&&t!=="all"?`PARTIDOS DE ${t.toUpperCase()}`:null}),i("h1",{className:"text-white text-center fw-bolder",style:{fontSize:"17px",fontFamily:"Roboto Condensed, sans-serif"},children:t!==""&&t!=="all"?i(ee,{children:u.find(b=>b.nombre.toLowerCase()===t)?i("img",{src:(v=u.find(b=>b.nombre.toLowerCase()===t))==null?void 0:v.escudos,alt:t,style:{width:"50px",height:"50px"}}):null}):null})]})}),Object.entries(s).sort((b,P)=>{const F=b[0],I=P[0],T=N.indexOf(F),q=N.indexOf(I);return T-q}).map(([b,P])=>i(ee,{children:i(ae,{className:"mb-5 mt-1",style:{padding:"3px"},children:i($,{children:Object.entries(P).map(([F,I])=>p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{children:Array.isArray(I)&&I.map(T=>{var oe,pe,ye,Pe,Me;const q=T.equipolocal,W=T.equipovisitante,G=T.transmision,H=(oe=u.find(He=>He.nombre===q))==null?void 0:oe.escudos,j=(pe=u.find(He=>He.nombre===W))==null?void 0:pe.escudos,U=(ye=c.find(He=>He.id===G))==null?void 0:ye.logo;new Date(T.hora);const L=T.hora,K=se(L,"HH:mm:ss").format("HH:mm"),Y=n===T.id&&T.estado==="Jugandose"?"#dc3545":"white",te=n===T.id&&T.estado==="Jugandose"?"white":"black",J=se(T.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("DD/MM"),Q=se(T.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("dddd").toUpperCase();return p(Fe.Fragment,{children:[T.fecha!==""?i("tr",{children:p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[Q," ",J]})}):i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"FECHA Y HORA A CONFIRMAR"}),p("tr",{children:[T.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder",style:{fontSize:13,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):T.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",T.motivossuspension,")"]})]}):T.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:T.estado}):T.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Parc ",U&&i("img",{src:U,alt:G,style:{width:"20px",height:"20px"}})]}):T.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:[T.tiempodelpartido," ",U&&i("img",{src:U,alt:G,style:{width:"20px",height:"20px"}})]}):T.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[T.hora===""||T.hora===null?i(ee,{}):K," ",U&&i("img",{src:U,alt:G,style:{width:"20px",height:"20px"}}),p("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[T.estadio!==""?i(jK,{style:{fontSize:6}}):null," ",T.estadio]})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[H&&i("img",{src:H,alt:q,style:{width:"15px",height:"15px"}})," ",i("span",{style:{height:"auto"},children:q!==""?q:"A conf"})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:15,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:Y,color:te,width:"auto"},children:[T.estado!=="Pendiente"?T.goleslocal:null,T.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+T.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:15,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:Y,color:te},children:[T.estado!=="Pendiente"?T.golesvisitante:null,T.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+T.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[H&&i("img",{src:j,alt:W,style:{width:"15px",height:"15px"}})," ",p("span",{style:{height:"auto"},children:[" ",W!==""?W:"A conf"]})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[T.linkgoles===null||T.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{A(T.linkgoles,{id:T.id,estado:T.estado,equipolocal:T.equipolocal,equipovisitante:T.equipovisitante,goleslocal:T.goleslocal,penaleslocal:T.penaleslocal,penalesvisitante:T.penalesvisitante,golesvisitante:T.golesvisitante,escudoLocal:H,escudoVisitante:j,tiempodelpartido:T.tiempodelpartido,hora:K,goleadoresLocal:T.goleadoresLocal,goleadoresVisitante:T.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"19px",color:"black"}})}),T.linkvivo===null||T.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{A(T.linkvivo,{id:T.id,estado:T.estado,equipolocal:T.equipolocal,equipovisitante:T.equipovisitante,goleslocal:T.goleslocal,penaleslocal:T.penaleslocal,penalesvisitante:T.penalesvisitante,golesvisitante:T.golesvisitante,escudoLocal:H,escudoVisitante:j,tiempodelpartido:T.tiempodelpartido,hora:K,goleadoresLocal:T.goleadoresLocal,goleadoresVisitante:T.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Ns,{style:{fontSize:"19px"}})})]})})]},T.id),(T.goleadoresLocal||T.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(Pe=T.goleadoresLocal)==null?void 0:Pe.split(",").map((He,ie)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[ie>0&&"-",He.trim().slice(0,-1)]},ie))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(Me=T.goleadoresVisitante)==null?void 0:Me.split(",").map((He,ie)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[ie>0&&"-",He.trim().slice(0,-1)]},ie))})})]})]},T.id)})})]}))},b)})})),i(V,{})]})]})};function mA({tiempodelpartido:t,partidoId:e,crono:n}){const[r,s]=C.useState(localStorage.getItem(`tiempoRestante_${e}`)||20),[o,a]=C.useState(localStorage.getItem(`tiempoRestante2_${e}`)||20);return C.useEffect(()=>{let l;return t==="1T"&&n==="Si"?l=setInterval(()=>{s(c=>c>1?c-1:(clearInterval(l),s(1),1))},105e3):t==="2T"&&n==="Si"&&(l=setInterval(()=>{a(c=>c>1?c-1:(clearInterval(l),a(1),1))},105e3)),()=>{clearInterval(l)}},[t,e]),C.useEffect(()=>{localStorage.setItem(`tiempoRestante_${e}`,r),localStorage.setItem(`tiempoRestante2_${e}`,o)},[r,o,e]),p("div",{style:{fontSize:"11px"},children:["(",t==="1T"?r:o,"')"]})}function gA({tiempoInicial:t}){const[e,n]=C.useState(t);return C.useEffect(()=>{let r;return t>1&&(n(t),r=setInterval(()=>{n(s=>s>1?s-1:(clearInterval(r),1))},105e3)),()=>{clearInterval(r)}},[t]),p("div",{style:{fontSize:"11px"},children:["(",e,"')"]})}const She=({equipos:t})=>{const[e,n]=C.useState([]),r=se().format("DD-MM"),s=se().format("YYYY"),o=async()=>{let{data:a,error:l}=await z.from("listaJugadores").select("*");l?console.log("Error",l):n(a)};return C.useEffect(()=>{o()},[]),i(ae,{children:(t.some(a=>se(a.fundado).format("DD-MM")===r)||Object.values(e).some(a=>se(a.fechaNacimiento).format("DD-MM")===r))&&p(Ie,{className:"border border-dark",children:[i("thead",{children:p("tr",{className:"text-center text-white border border-dark fw-bolder",colSpan:10,style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:["HOY ",se().format("dddd D [de] MMMM [de] YYYY").toUpperCase()]})}),p("tbody",{className:"",children:[t.some(a=>se(a.fundado).format("DD-MM")===r)&&p(ee,{children:[i("tr",{className:"text-center text-white border border-dark fw-bolder",colSpan:10,style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:13},children:"UN DÍA COMO HOY SE FUNDÓ"}),t.map(a=>{const l=se(a.fundado).format("DD-MM"),c=se(a.fundado).format("YYYY"),d=s-c;return l===r?i("tr",{children:p("td",{className:"fw-bolder text-center text-dark",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:[i("img",{src:a.escudos,alt:a.nombre,style:{width:"15px",height:"15px"}}),a.nombre," cumple hoy ",d," años desde su fundación."]})},a.id):null})]}),Object.values(e).some(a=>se(a.fechaNacimiento).format("DD-MM")===r)&&p(ee,{children:[i("tr",{className:"text-center text-white border border-dark fw-bolder",colSpan:10,style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:13},children:"CUMPLEAÑOS"}),Object.values(e).map(a=>{const l=se(a.fechaNacimiento).format("DD-MM"),c=se(a.fechaNacimiento).format("YYYY"),d=s-c;return l===r?i("tr",{children:p("td",{className:"fw-bolder text-center text-dark",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:[a.nombre," ",a.apellido," (",a.clubActual,") cumple hoy ",d," años"]})},a.id):null})]})]})]})})},Ahe="/assets/gifSumate2-85ec44bf.gif";function Nhe(t){return Pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm75.31 260.69a16 16 0 1 1-22.62 22.62L256 278.63l-52.69 52.68a16 16 0 0 1-22.62-22.62L233.37 256l-52.68-52.69a16 16 0 0 1 22.62-22.62L256 233.37l52.69-52.68a16 16 0 0 1 22.62 22.62L278.63 256z"},child:[]}]})(t)}function Rhe(t){return Pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"48",d:"M88 152h336M88 256h336M88 360h336"},child:[]}]})(t)}const Phe=({nombreEquipo:t})=>{const[e,n]=C.useState([]),[r,s]=C.useState(!0),[o,a]=C.useState(null);C.useEffect(()=>{(async()=>{try{const{data:u,error:f}=await z.from("historial_campeones").select("*").eq("equipo",t).order("año_torneo",{ascending:!1});if(f)throw f;n(u)}catch(u){a(u.message)}finally{s(!1)}})()},[t]);const l=d=>{const u=d.reduce((g,E)=>(g[E.genero]||(g[E.genero]=[]),g[E.genero].push(E),g),{});for(const g in u)u[g]=u[g].reduce((E,S)=>{let w="";return["regular","clausura","apertura","anual","nacional"].includes(S.tipo_torneo)?w=S.tipo_torneo:S.tipo_torneo==="Copa"?w="Copa":S.tipo_torneo==="Copa Internacional"&&(w="Copa Internacional"),E[w]||(E[w]=[]),E[w].push(S),E},{});const f={};if(u.masculino){f.masculino={},u.masculino.Copa&&(f.masculino.Copa=u.masculino.Copa),u.masculino["Copa Internacional"]&&(f.masculino["Copa Internacional"]=u.masculino["Copa Internacional"]);for(const g of["regular","clausura","apertura","anual","nacional"])u.masculino[g]&&(f.masculino[g]=u.masculino[g])}if(u.femenino){f.femenino={},u.femenino.Copa&&(f.femenino.Copa=u.femenino.Copa),u.femenino["Copa Internacional"]&&(f.femenino["Copa Internacional"]=u.femenino["Copa Internacional"]);for(const g of["regular","clausura","apertura","anual","nacional"])u.femenino[g]&&(f.femenino[g]=u.femenino[g])}return f};if(r)return i("div",{children:"Cargando..."});if(o)return p("div",{children:["Error: ",o]});const c=l(e);return p("div",{className:"accordion",id:"historialCampeonesAccordion",children:[i("h4",{className:"text-center mt-3",children:"Historial de Campeones"}),Object.keys(c).length>0?Object.entries(c).map(([d,u])=>p("div",{className:"accordion-item",children:[i("h2",{className:"accordion-header",id:`heading${d}`,children:i("button",{className:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":`#collapse${d}`,"aria-expanded":"true","aria-controls":`collapse${d}`,children:d==="masculino"?"Masculino":"Femenino"})}),i("div",{id:`collapse${d}`,className:"accordion-collapse collapse","aria-labelledby":`heading${d}`,"data-bs-parent":"#historialCampeonesAccordion",children:i("div",{className:"accordion-body",children:Object.entries(u).map(([f,g])=>p("div",{className:"mb-3",children:[i("h6",{children:`${f==="Copa"?"Copas:":`Torneo ${f.charAt(0).toUpperCase()+f.slice(1)}:`} ${g.length}`}),i("ul",{className:"list-unstyled",children:g.map((E,S)=>p("li",{children:[i("strong",{children:E.año_torneo})," - ",E.torneo]},S))})]},f))})})]},d)):i("p",{className:"mt-3",children:"No hay datos históricos disponibles para este equipo."})]})};/*! * @kurkle/color v0.3.2 * https://github.com/kurkle/color#readme * (c) 2023 Jukka Kurkela * Released under the MIT License */function zp(t){return t+.5|0}const la=(t,e,n)=>Math.max(Math.min(t,n),e);function mf(t){return la(zp(t*2.55),0,255)}function Sa(t){return la(zp(t*255),0,255)}function Zo(t){return la(zp(t/2.55)/100,0,1)}function eF(t){return la(zp(t*100),0,100)}const fs={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},hx=[..."0123456789ABCDEF"],Ohe=t=>hx[t&15],Fhe=t=>hx[(t&240)>>4]+hx[t&15],qm=t=>(t&240)>>4===(t&15),Dhe=t=>qm(t.r)&&qm(t.g)&&qm(t.b)&&qm(t.a);function khe(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&fs[t[1]]*17,g:255&fs[t[2]]*17,b:255&fs[t[3]]*17,a:e===5?fs[t[4]]*17:255}:(e===7||e===9)&&(n={r:fs[t[1]]<<4|fs[t[2]],g:fs[t[3]]<<4|fs[t[4]],b:fs[t[5]]<<4|fs[t[6]],a:e===9?fs[t[7]]<<4|fs[t[8]]:255})),n}const The=(t,e)=>t<255?e(t):"";function Ihe(t){var e=Dhe(t)?Ohe:Fhe;return t?"#"+e(t.r)+e(t.g)+e(t.b)+The(t.a,e):void 0}const Mhe=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Kq(t,e,n){const r=e*Math.min(n,1-n),s=(o,a=(o+t/30)%12)=>n-r*Math.max(Math.min(a-3,9-a,1),-1);return[s(0),s(8),s(4)]}function Lhe(t,e,n){const r=(s,o=(s+t/60)%6)=>n-n*e*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function zhe(t,e,n){const r=Kq(t,1,.5);let s;for(e+n>1&&(s=1/(e+n),e*=s,n*=s),s=0;s<3;s++)r[s]*=1-e-n,r[s]+=e;return r}function qhe(t,e,n,r,s){return t===s?(e-n)/r+(e<n?6:0):e===s?(n-t)/r+2:(t-e)/r+4}function yA(t){const n=t.r/255,r=t.g/255,s=t.b/255,o=Math.max(n,r,s),a=Math.min(n,r,s),l=(o+a)/2;let c,d,u;return o!==a&&(u=o-a,d=l>.5?u/(2-o-a):u/(o+a),c=qhe(n,r,s,u,o),c=c*60+.5),[c|0,d||0,l]}function bA(t,e,n,r){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(Sa)}function vA(t,e,n){return bA(Kq,t,e,n)}function jhe(t,e,n){return bA(zhe,t,e,n)}function $he(t,e,n){return bA(Lhe,t,e,n)}function Zq(t){return(t%360+360)%360}function Bhe(t){const e=Mhe.exec(t);let n=255,r;if(!e)return;e[5]!==r&&(n=e[6]?mf(+e[5]):Sa(+e[5]));const s=Zq(+e[2]),o=+e[3]/100,a=+e[4]/100;return e[1]==="hwb"?r=jhe(s,o,a):e[1]==="hsv"?r=$he(s,o,a):r=vA(s,o,a),{r:r[0],g:r[1],b:r[2],a:n}}function Uhe(t,e){var n=yA(t);n[0]=Zq(n[0]+e),n=vA(n),t.r=n[0],t.g=n[1],t.b=n[2]}function Yhe(t){if(!t)return;const e=yA(t),n=e[0],r=eF(e[1]),s=eF(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${s}%, ${Zo(t.a)})`:`hsl(${n}, ${r}%, ${s}%)`}const tF={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},nF={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Hhe(){const t={},e=Object.keys(nF),n=Object.keys(tF);let r,s,o,a,l;for(r=0;r<e.length;r++){for(a=l=e[r],s=0;s<n.length;s++)o=n[s],l=l.replace(o,tF[o]);o=parseInt(nF[a],16),t[l]=[o>>16&255,o>>8&255,o&255]}return t}let jm;function Ghe(t){jm||(jm=Hhe(),jm.transparent=[0,0,0,0]);const e=jm[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const Whe=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Vhe(t){const e=Whe.exec(t);let n=255,r,s,o;if(e){if(e[7]!==r){const a=+e[7];n=e[8]?mf(a):la(a*255,0,255)}return r=+e[1],s=+e[3],o=+e[5],r=255&(e[2]?mf(r):la(r,0,255)),s=255&(e[4]?mf(s):la(s,0,255)),o=255&(e[6]?mf(o):la(o,0,255)),{r,g:s,b:o,a:n}}}function Khe(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Zo(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const $_=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Dc=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Zhe(t,e,n){const r=Dc(Zo(t.r)),s=Dc(Zo(t.g)),o=Dc(Zo(t.b));return{r:Sa($_(r+n*(Dc(Zo(e.r))-r))),g:Sa($_(s+n*(Dc(Zo(e.g))-s))),b:Sa($_(o+n*(Dc(Zo(e.b))-o))),a:t.a+n*(e.a-t.a)}}function $m(t,e,n){if(t){let r=yA(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,e===0?360:1)),r=vA(r),t.r=r[0],t.g=r[1],t.b=r[2]}}function Jq(t,e){return t&&Object.assign(e||{},t)}function rF(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Sa(t[3]))):(e=Jq(t,{r:0,g:0,b:0,a:1}),e.a=Sa(e.a)),e}function Jhe(t){return t.charAt(0)==="r"?Vhe(t):Bhe(t)}class Hh{constructor(e){if(e instanceof Hh)return e;const n=typeof e;let r;n==="object"?r=rF(e):n==="string"&&(r=khe(e)||Ghe(e)||Jhe(e)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=Jq(this._rgb);return e&&(e.a=Zo(e.a)),e}set rgb(e){this._rgb=rF(e)}rgbString(){return this._valid?Khe(this._rgb):void 0}hexString(){return this._valid?Ihe(this._rgb):void 0}hslString(){return this._valid?Yhe(this._rgb):void 0}mix(e,n){if(e){const r=this.rgb,s=e.rgb;let o;const a=n===o?.5:n,l=2*a-1,c=r.a-s.a,d=((l*c===-1?l:(l+c)/(1+l*c))+1)/2;o=1-d,r.r=255&d*r.r+o*s.r+.5,r.g=255&d*r.g+o*s.g+.5,r.b=255&d*r.b+o*s.b+.5,r.a=a*r.a+(1-a)*s.a,this.rgb=r}return this}interpolate(e,n){return e&&(this._rgb=Zhe(this._rgb,e._rgb,n)),this}clone(){return new Hh(this.rgb)}alpha(e){return this._rgb.a=Sa(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=zp(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return $m(this._rgb,2,e),this}darken(e){return $m(this._rgb,2,-e),this}saturate(e){return $m(this._rgb,1,e),this}desaturate(e){return $m(this._rgb,1,-e),this}rotate(e){return Uhe(this._rgb,e),this}}/*! * Chart.js v4.4.3 * https://www.chartjs.org * (c) 2024 Chart.js Contributors * Released under the MIT License */function Bo(){}const Xhe=(()=>{let t=0;return()=>t++})();function pt(t){return t===null||typeof t>"u"}function rn(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function gt(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function En(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Kr(t,e){return En(t)?t:e}function st(t,e){return typeof t>"u"?e:t}const Qhe=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,Xq=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function zt(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Dt(t,e,n,r){let s,o,a;if(rn(t))if(o=t.length,r)for(s=o-1;s>=0;s--)e.call(n,t[s],s);else for(s=0;s<o;s++)e.call(n,t[s],s);else if(gt(t))for(a=Object.keys(t),o=a.length,s=0;s<o;s++)e.call(n,t[a[s]],a[s])}function Xy(t,e){let n,r,s,o;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(s=t[n],o=e[n],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function Qy(t){if(rn(t))return t.map(Qy);if(gt(t)){const e=Object.create(null),n=Object.keys(t),r=n.length;let s=0;for(;s<r;++s)e[n[s]]=Qy(t[n[s]]);return e}return t}function Qq(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function epe(t,e,n,r){if(!Qq(t))return;const s=e[t],o=n[t];gt(s)&>(o)?So(s,o,r):e[t]=Qy(o)}function So(t,e,n){const r=rn(e)?e:[e],s=r.length;if(!gt(t))return t;n=n||{};const o=n.merger||epe;let a;for(let l=0;l<s;++l){if(a=r[l],!gt(a))continue;const c=Object.keys(a);for(let d=0,u=c.length;d<u;++d)o(c[d],t,a,n)}return t}function Yf(t,e){return So(t,e,{merger:tpe})}function tpe(t,e,n){if(!Qq(t))return;const r=e[t],s=n[t];gt(r)&>(s)?Yf(r,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Qy(s))}const sF={"":t=>t,x:t=>t.x,y:t=>t.y};function npe(t){const e=t.split("."),n=[];let r="";for(const s of e)r+=s,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function rpe(t){const e=npe(t);return n=>{for(const r of e){if(r==="")break;n=n&&n[r]}return n}}function La(t,e){return(sF[e]||(sF[e]=rpe(e)))(t)}function _A(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Gh=t=>typeof t<"u",za=t=>typeof t=="function",oF=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function spe(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const an=Math.PI,on=2*an,ope=on+an,eb=Number.POSITIVE_INFINITY,ipe=an/180,Pn=an/2,ol=an/4,iF=an*2/3,ca=Math.log10,_o=Math.sign;function Hf(t,e,n){return Math.abs(t-e)<n}function aF(t){const e=Math.round(t);t=Hf(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(ca(t))),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function ape(t){const e=[],n=Math.sqrt(t);let r;for(r=1;r<n;r++)t%r===0&&(e.push(r),e.push(t/r));return n===(n|0)&&e.push(n),e.sort((s,o)=>s-o).pop(),e}function Zd(t){return!isNaN(parseFloat(t))&&isFinite(t)}function lpe(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function e4(t,e,n){let r,s,o;for(r=0,s=t.length;r<s;r++)o=t[r][n],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function Ws(t){return t*(an/180)}function wA(t){return t*(180/an)}function lF(t){if(!En(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function t4(t,e){const n=e.x-t.x,r=e.y-t.y,s=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*an&&(o+=on),{angle:o,distance:s}}function px(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function cpe(t,e){return(t-e+ope)%on-an}function Jr(t){return(t%on+on)%on}function Wh(t,e,n,r){const s=Jr(t),o=Jr(e),a=Jr(n),l=Jr(o-s),c=Jr(a-s),d=Jr(s-o),u=Jr(s-a);return s===o||s===a||r&&o===a||l>c&&d<u}function Kn(t,e,n){return Math.max(e,Math.min(n,t))}function dpe(t){return Kn(t,-32768,32767)}function ci(t,e,n,r=1e-6){return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function xA(t,e,n){n=n||(a=>t[a]<e);let r=t.length-1,s=0,o;for(;r-s>1;)o=s+r>>1,n(o)?s=o:r=o;return{lo:s,hi:r}}const di=(t,e,n,r)=>xA(t,n,r?s=>{const o=t[s][e];return o<n||o===n&&t[s+1][e]===n}:s=>t[s][e]<n),upe=(t,e,n)=>xA(t,n,r=>t[r][e]>=n);function fpe(t,e,n){let r=0,s=t.length;for(;r<s&&t[r]<e;)r++;for(;s>r&&t[s-1]>n;)s--;return r>0||s<t.length?t.slice(r,s):t}const n4=["push","pop","shift","splice","unshift"];function hpe(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),n4.forEach(n=>{const r="_onData"+_A(n),s=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...o){const a=s.apply(this,o);return t._chartjs.listeners.forEach(l=>{typeof l[r]=="function"&&l[r](...o)}),a}})})}function cF(t,e){const n=t._chartjs;if(!n)return;const r=n.listeners,s=r.indexOf(e);s!==-1&&r.splice(s,1),!(r.length>0)&&(n4.forEach(o=>{delete t[o]}),delete t._chartjs)}function r4(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const s4=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function o4(t,e){let n=[],r=!1;return function(...s){n=s,r||(r=!0,s4.call(window,()=>{r=!1,t.apply(e,n)}))}}function ppe(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}const CA=t=>t==="start"?"left":t==="end"?"right":"center",lr=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,mpe=(t,e,n,r)=>t===(r?"left":"right")?n:t==="center"?(e+n)/2:e;function i4(t,e,n){const r=e.length;let s=0,o=r;if(t._sorted){const{iScale:a,_parsed:l}=t,c=a.axis,{min:d,max:u,minDefined:f,maxDefined:g}=a.getUserBounds();f&&(s=Kn(Math.min(di(l,c,d).lo,n?r:di(e,c,a.getPixelForValue(d)).lo),0,r-1)),g?o=Kn(Math.max(di(l,a.axis,u,!0).hi+1,n?0:di(e,c,a.getPixelForValue(u),!0).hi+1),s,r)-s:o=r-s}return{start:s,count:o}}function a4(t){const{xScale:e,yScale:n,_scaleRanges:r}=t,s={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=s,!0;const o=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,s),o}const Bm=t=>t===0||t===1,dF=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*on/n)),uF=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*on/n)+1,Gf={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Pn)+1,easeOutSine:t=>Math.sin(t*Pn),easeInOutSine:t=>-.5*(Math.cos(an*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Bm(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Bm(t)?t:dF(t,.075,.3),easeOutElastic:t=>Bm(t)?t:uF(t,.075,.3),easeInOutElastic(t){return Bm(t)?t:t<.5?.5*dF(t*2,.1125,.45):.5+.5*uF(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-Gf.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Gf.easeInBounce(t*2)*.5:Gf.easeOutBounce(t*2-1)*.5+.5};function EA(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function fF(t){return EA(t)?t:new Hh(t)}function B_(t){return EA(t)?t:new Hh(t).saturate(.5).darken(.1).hexString()}const gpe=["x","y","borderWidth","radius","tension"],ype=["color","borderColor","backgroundColor"];function bpe(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:ype},numbers:{type:"number",properties:gpe}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function vpe(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const hF=new Map;function _pe(t,e){e=e||{};const n=t+JSON.stringify(e);let r=hF.get(n);return r||(r=new Intl.NumberFormat(t,e),hF.set(n,r)),r}function qp(t,e,n){return _pe(e,n).format(t)}const l4={values(t){return rn(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const r=this.chart.options.locale;let s,o=t;if(n.length>1){const d=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(d<1e-4||d>1e15)&&(s="scientific"),o=wpe(t,n)}const a=ca(Math.abs(o)),l=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),c={notation:s,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(c,this.options.ticks.format),qp(t,r,c)},logarithmic(t,e,n){if(t===0)return"0";const r=n[e].significand||t/Math.pow(10,Math.floor(ca(t)));return[1,2,3,5,10,15].includes(r)||e>.8*n.length?l4.numeric.call(this,t,e,n):""}};function wpe(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var Ov={formatters:l4};function xpe(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ov.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Xl=Object.create(null),mx=Object.create(null);function Wf(t,e){if(!e)return t;const n=e.split(".");for(let r=0,s=n.length;r<s;++r){const o=n[r];t=t[o]||(t[o]=Object.create(null))}return t}function U_(t,e,n){return typeof e=="string"?So(Wf(t,e),n):So(Wf(t,""),e)}class Cpe{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,s)=>B_(s.backgroundColor),this.hoverBorderColor=(r,s)=>B_(s.borderColor),this.hoverColor=(r,s)=>B_(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return U_(this,e,n)}get(e){return Wf(this,e)}describe(e,n){return U_(mx,e,n)}override(e,n){return U_(Xl,e,n)}route(e,n,r,s){const o=Wf(this,e),a=Wf(this,r),l="_"+n;Object.defineProperties(o,{[l]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const c=this[l],d=a[s];return gt(c)?Object.assign({},d,c):st(c,d)},set(c){this[l]=c}}})}apply(e){e.forEach(n=>n(this))}}var gn=new Cpe({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[bpe,vpe,xpe]);function Epe(t){return!t||pt(t.size)||pt(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function tb(t,e,n,r,s){let o=e[s];return o||(o=e[s]=t.measureText(s).width,n.push(s)),o>r&&(r=o),r}function Spe(t,e,n,r){r=r||{};let s=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(s=r.data={},o=r.garbageCollect=[],r.font=e),t.save(),t.font=e;let a=0;const l=n.length;let c,d,u,f,g;for(c=0;c<l;c++)if(f=n[c],f!=null&&!rn(f))a=tb(t,s,o,a,f);else if(rn(f))for(d=0,u=f.length;d<u;d++)g=f[d],g!=null&&!rn(g)&&(a=tb(t,s,o,a,g));t.restore();const E=o.length/2;if(E>n.length){for(c=0;c<E;c++)delete s[o[c]];o.splice(0,E)}return a}function il(t,e,n){const r=t.currentDevicePixelRatio,s=n!==0?Math.max(n/2,.5):0;return Math.round((e-s)*r)/r+s}function pF(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function gx(t,e,n,r){c4(t,e,n,r,null)}function c4(t,e,n,r,s){let o,a,l,c,d,u,f,g;const E=e.pointStyle,S=e.rotation,w=e.radius;let _=(S||0)*ipe;if(E&&typeof E=="object"&&(o=E.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){t.save(),t.translate(n,r),t.rotate(_),t.drawImage(E,-E.width/2,-E.height/2,E.width,E.height),t.restore();return}if(!(isNaN(w)||w<=0)){switch(t.beginPath(),E){default:s?t.ellipse(n,r,s/2,w,0,0,on):t.arc(n,r,w,0,on),t.closePath();break;case"triangle":u=s?s/2:w,t.moveTo(n+Math.sin(_)*u,r-Math.cos(_)*w),_+=iF,t.lineTo(n+Math.sin(_)*u,r-Math.cos(_)*w),_+=iF,t.lineTo(n+Math.sin(_)*u,r-Math.cos(_)*w),t.closePath();break;case"rectRounded":d=w*.516,c=w-d,a=Math.cos(_+ol)*c,f=Math.cos(_+ol)*(s?s/2-d:c),l=Math.sin(_+ol)*c,g=Math.sin(_+ol)*(s?s/2-d:c),t.arc(n-f,r-l,d,_-an,_-Pn),t.arc(n+g,r-a,d,_-Pn,_),t.arc(n+f,r+l,d,_,_+Pn),t.arc(n-g,r+a,d,_+Pn,_+an),t.closePath();break;case"rect":if(!S){c=Math.SQRT1_2*w,u=s?s/2:c,t.rect(n-u,r-c,2*u,2*c);break}_+=ol;case"rectRot":f=Math.cos(_)*(s?s/2:w),a=Math.cos(_)*w,l=Math.sin(_)*w,g=Math.sin(_)*(s?s/2:w),t.moveTo(n-f,r-l),t.lineTo(n+g,r-a),t.lineTo(n+f,r+l),t.lineTo(n-g,r+a),t.closePath();break;case"crossRot":_+=ol;case"cross":f=Math.cos(_)*(s?s/2:w),a=Math.cos(_)*w,l=Math.sin(_)*w,g=Math.sin(_)*(s?s/2:w),t.moveTo(n-f,r-l),t.lineTo(n+f,r+l),t.moveTo(n+g,r-a),t.lineTo(n-g,r+a);break;case"star":f=Math.cos(_)*(s?s/2:w),a=Math.cos(_)*w,l=Math.sin(_)*w,g=Math.sin(_)*(s?s/2:w),t.moveTo(n-f,r-l),t.lineTo(n+f,r+l),t.moveTo(n+g,r-a),t.lineTo(n-g,r+a),_+=ol,f=Math.cos(_)*(s?s/2:w),a=Math.cos(_)*w,l=Math.sin(_)*w,g=Math.sin(_)*(s?s/2:w),t.moveTo(n-f,r-l),t.lineTo(n+f,r+l),t.moveTo(n+g,r-a),t.lineTo(n-g,r+a);break;case"line":a=s?s/2:Math.cos(_)*w,l=Math.sin(_)*w,t.moveTo(n-a,r-l),t.lineTo(n+a,r+l);break;case"dash":t.moveTo(n,r),t.lineTo(n+Math.cos(_)*(s?s/2:w),r+Math.sin(_)*w);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function ui(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function Fv(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Dv(t){t.restore()}function Ape(t,e,n,r,s){if(!e)return t.lineTo(n.x,n.y);if(s==="middle"){const o=(e.x+n.x)/2;t.lineTo(o,e.y),t.lineTo(o,n.y)}else s==="after"!=!!r?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function Npe(t,e,n,r){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(r?e.cp1x:e.cp2x,r?e.cp1y:e.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function Rpe(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),pt(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function Ppe(t,e,n,r,s){if(s.strikethrough||s.underline){const o=t.measureText(r),a=e-o.actualBoundingBoxLeft,l=e+o.actualBoundingBoxRight,c=n-o.actualBoundingBoxAscent,d=n+o.actualBoundingBoxDescent,u=s.strikethrough?(c+d)/2:d;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(a,u),t.lineTo(l,u),t.stroke()}}function Ope(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Ql(t,e,n,r,s,o={}){const a=rn(e)?e:[e],l=o.strokeWidth>0&&o.strokeColor!=="";let c,d;for(t.save(),t.font=s.string,Rpe(t,o),c=0;c<a.length;++c)d=a[c],o.backdrop&&Ope(t,o.backdrop),l&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),pt(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(d,n,r,o.maxWidth)),t.fillText(d,n,r,o.maxWidth),Ppe(t,n,r,d,o),r+=Number(s.lineHeight);t.restore()}function Vh(t,e){const{x:n,y:r,w:s,h:o,radius:a}=e;t.arc(n+a.topLeft,r+a.topLeft,a.topLeft,1.5*an,an,!0),t.lineTo(n,r+o-a.bottomLeft),t.arc(n+a.bottomLeft,r+o-a.bottomLeft,a.bottomLeft,an,Pn,!0),t.lineTo(n+s-a.bottomRight,r+o),t.arc(n+s-a.bottomRight,r+o-a.bottomRight,a.bottomRight,Pn,0,!0),t.lineTo(n+s,r+a.topRight),t.arc(n+s-a.topRight,r+a.topRight,a.topRight,0,-Pn,!0),t.lineTo(n+a.topLeft,r)}const Fpe=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Dpe=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function kpe(t,e){const n=(""+t).match(Fpe);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const Tpe=t=>+t||0;function SA(t,e){const n={},r=gt(e),s=r?Object.keys(e):e,o=gt(t)?r?a=>st(t[a],t[e[a]]):a=>t[a]:()=>t;for(const a of s)n[a]=Tpe(o(a));return n}function d4(t){return SA(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Il(t){return SA(t,["topLeft","topRight","bottomLeft","bottomRight"])}function tr(t){const e=d4(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function kn(t,e){t=t||{},e=e||gn.font;let n=st(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let r=st(t.style,e.style);r&&!(""+r).match(Dpe)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const s={family:st(t.family,e.family),lineHeight:kpe(st(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:st(t.weight,e.weight),string:""};return s.string=Epe(s),s}function en(t,e,n,r){let s=!0,o,a,l;for(o=0,a=t.length;o<a;++o)if(l=t[o],l!==void 0&&(e!==void 0&&typeof l=="function"&&(l=l(e),s=!1),n!==void 0&&rn(l)&&(l=l[n%l.length],s=!1),l!==void 0))return r&&!s&&(r.cacheable=!1),l}function Ipe(t,e,n){const{min:r,max:s}=t,o=Xq(e,(s-r)/2),a=(l,c)=>n&&l===0?0:l+c;return{min:a(r,-Math.abs(o)),max:a(s,o)}}function Ja(t,e){return Object.assign(Object.create(t),e)}function AA(t,e=[""],n,r,s=()=>t[0]){const o=n||t;typeof r>"u"&&(r=p4("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:r,_getTarget:s,override:l=>AA([l,...t],e,o,r)};return new Proxy(a,{deleteProperty(l,c){return delete l[c],delete l._keys,delete t[0][c],!0},get(l,c){return f4(l,c,()=>Upe(c,e,t,l))},getOwnPropertyDescriptor(l,c){return Reflect.getOwnPropertyDescriptor(l._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(l,c){return gF(l).includes(c)},ownKeys(l){return gF(l)},set(l,c,d){const u=l._storage||(l._storage=s());return l[c]=u[c]=d,delete l._keys,!0}})}function Jd(t,e,n,r){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:u4(t,r),setContext:o=>Jd(t,o,n,r),override:o=>Jd(t.override(o),e,n,r)};return new Proxy(s,{deleteProperty(o,a){return delete o[a],delete t[a],!0},get(o,a,l){return f4(o,a,()=>Lpe(o,a,l))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(t,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,a)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(o,a){return Reflect.has(t,a)},ownKeys(){return Reflect.ownKeys(t)},set(o,a,l){return t[a]=l,delete o[a],!0}})}function u4(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:n,indexable:r,isScriptable:za(n)?n:()=>n,isIndexable:za(r)?r:()=>r}}const Mpe=(t,e)=>t?t+_A(e):e,NA=(t,e)=>gt(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function f4(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const r=n();return t[e]=r,r}function Lpe(t,e,n){const{_proxy:r,_context:s,_subProxy:o,_descriptors:a}=t;let l=r[e];return za(l)&&a.isScriptable(e)&&(l=zpe(e,l,t,n)),rn(l)&&l.length&&(l=qpe(e,l,t,a.isIndexable)),NA(e,l)&&(l=Jd(l,s,o&&o[e],a)),l}function zpe(t,e,n,r){const{_proxy:s,_context:o,_subProxy:a,_stack:l}=n;if(l.has(t))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+t);l.add(t);let c=e(o,a||r);return l.delete(t),NA(t,c)&&(c=RA(s._scopes,s,t,c)),c}function qpe(t,e,n,r){const{_proxy:s,_context:o,_subProxy:a,_descriptors:l}=n;if(typeof o.index<"u"&&r(t))return e[o.index%e.length];if(gt(e[0])){const c=e,d=s._scopes.filter(u=>u!==c);e=[];for(const u of c){const f=RA(d,s,t,u);e.push(Jd(f,o,a&&a[t],l))}}return e}function h4(t,e,n){return za(t)?t(e,n):t}const jpe=(t,e)=>t===!0?e:typeof t=="string"?La(e,t):void 0;function $pe(t,e,n,r,s){for(const o of e){const a=jpe(n,o);if(a){t.add(a);const l=h4(a._fallback,n,s);if(typeof l<"u"&&l!==n&&l!==r)return l}else if(a===!1&&typeof r<"u"&&n!==r)return null}return!1}function RA(t,e,n,r){const s=e._rootScopes,o=h4(e._fallback,n,r),a=[...t,...s],l=new Set;l.add(r);let c=mF(l,a,n,o||n,r);return c===null||typeof o<"u"&&o!==n&&(c=mF(l,a,o,c,r),c===null)?!1:AA(Array.from(l),[""],s,o,()=>Bpe(e,n,r))}function mF(t,e,n,r,s){for(;n;)n=$pe(t,e,n,r,s);return n}function Bpe(t,e,n){const r=t._getTarget();e in r||(r[e]={});const s=r[e];return rn(s)&>(n)?n:s||{}}function Upe(t,e,n,r){let s;for(const o of e)if(s=p4(Mpe(o,t),n),typeof s<"u")return NA(t,s)?RA(n,r,t,s):s}function p4(t,e){for(const n of e){if(!n)continue;const r=n[t];if(typeof r<"u")return r}}function gF(t){let e=t._keys;return e||(e=t._keys=Ype(t._scopes)),e}function Ype(t){const e=new Set;for(const n of t)for(const r of Object.keys(n).filter(s=>!s.startsWith("_")))e.add(r);return Array.from(e)}function m4(t,e,n,r){const{iScale:s}=t,{key:o="r"}=this._parsing,a=new Array(r);let l,c,d,u;for(l=0,c=r;l<c;++l)d=l+n,u=e[d],a[l]={r:s.parse(La(u,o),d)};return a}const Hpe=Number.EPSILON||1e-14,Xd=(t,e)=>e<t.length&&!t[e].skip&&t[e],g4=t=>t==="x"?"y":"x";function Gpe(t,e,n,r){const s=t.skip?e:t,o=e,a=n.skip?e:n,l=px(o,s),c=px(a,o);let d=l/(l+c),u=c/(l+c);d=isNaN(d)?0:d,u=isNaN(u)?0:u;const f=r*d,g=r*u;return{previous:{x:o.x-f*(a.x-s.x),y:o.y-f*(a.y-s.y)},next:{x:o.x+g*(a.x-s.x),y:o.y+g*(a.y-s.y)}}}function Wpe(t,e,n){const r=t.length;let s,o,a,l,c,d=Xd(t,0);for(let u=0;u<r-1;++u)if(c=d,d=Xd(t,u+1),!(!c||!d)){if(Hf(e[u],0,Hpe)){n[u]=n[u+1]=0;continue}s=n[u]/e[u],o=n[u+1]/e[u],l=Math.pow(s,2)+Math.pow(o,2),!(l<=9)&&(a=3/Math.sqrt(l),n[u]=s*a*e[u],n[u+1]=o*a*e[u])}}function Vpe(t,e,n="x"){const r=g4(n),s=t.length;let o,a,l,c=Xd(t,0);for(let d=0;d<s;++d){if(a=l,l=c,c=Xd(t,d+1),!l)continue;const u=l[n],f=l[r];a&&(o=(u-a[n])/3,l[`cp1${n}`]=u-o,l[`cp1${r}`]=f-o*e[d]),c&&(o=(c[n]-u)/3,l[`cp2${n}`]=u+o,l[`cp2${r}`]=f+o*e[d])}}function Kpe(t,e="x"){const n=g4(e),r=t.length,s=Array(r).fill(0),o=Array(r);let a,l,c,d=Xd(t,0);for(a=0;a<r;++a)if(l=c,c=d,d=Xd(t,a+1),!!c){if(d){const u=d[e]-c[e];s[a]=u!==0?(d[n]-c[n])/u:0}o[a]=l?d?_o(s[a-1])!==_o(s[a])?0:(s[a-1]+s[a])/2:s[a-1]:s[a]}Wpe(t,s,o),Vpe(t,o,e)}function Um(t,e,n){return Math.max(Math.min(t,n),e)}function Zpe(t,e){let n,r,s,o,a,l=ui(t[0],e);for(n=0,r=t.length;n<r;++n)a=o,o=l,l=n<r-1&&ui(t[n+1],e),o&&(s=t[n],a&&(s.cp1x=Um(s.cp1x,e.left,e.right),s.cp1y=Um(s.cp1y,e.top,e.bottom)),l&&(s.cp2x=Um(s.cp2x,e.left,e.right),s.cp2y=Um(s.cp2y,e.top,e.bottom)))}function Jpe(t,e,n,r,s){let o,a,l,c;if(e.spanGaps&&(t=t.filter(d=>!d.skip)),e.cubicInterpolationMode==="monotone")Kpe(t,s);else{let d=r?t[t.length-1]:t[0];for(o=0,a=t.length;o<a;++o)l=t[o],c=Gpe(d,l,t[Math.min(o+1,a-(r?0:1))%a],e.tension),l.cp1x=c.previous.x,l.cp1y=c.previous.y,l.cp2x=c.next.x,l.cp2y=c.next.y,d=l}e.capBezierPoints&&Zpe(t,n)}function PA(){return typeof window<"u"&&typeof document<"u"}function OA(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function nb(t,e,n){let r;return typeof t=="string"?(r=parseInt(t,10),t.indexOf("%")!==-1&&(r=r/100*e.parentNode[n])):r=t,r}const kv=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function Xpe(t,e){return kv(t).getPropertyValue(e)}const Qpe=["top","right","bottom","left"];function Ml(t,e,n){const r={};n=n?"-"+n:"";for(let s=0;s<4;s++){const o=Qpe[s];r[o]=parseFloat(t[e+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const eme=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function tme(t,e){const n=t.touches,r=n&&n.length?n[0]:t,{offsetX:s,offsetY:o}=r;let a=!1,l,c;if(eme(s,o,t.target))l=s,c=o;else{const d=e.getBoundingClientRect();l=r.clientX-d.left,c=r.clientY-d.top,a=!0}return{x:l,y:c,box:a}}function pl(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:r}=e,s=kv(n),o=s.boxSizing==="border-box",a=Ml(s,"padding"),l=Ml(s,"border","width"),{x:c,y:d,box:u}=tme(t,n),f=a.left+(u&&l.left),g=a.top+(u&&l.top);let{width:E,height:S}=e;return o&&(E-=a.width+l.width,S-=a.height+l.height),{x:Math.round((c-f)/E*n.width/r),y:Math.round((d-g)/S*n.height/r)}}function nme(t,e,n){let r,s;if(e===void 0||n===void 0){const o=t&&OA(t);if(!o)e=t.clientWidth,n=t.clientHeight;else{const a=o.getBoundingClientRect(),l=kv(o),c=Ml(l,"border","width"),d=Ml(l,"padding");e=a.width-d.width-c.width,n=a.height-d.height-c.height,r=nb(l.maxWidth,o,"clientWidth"),s=nb(l.maxHeight,o,"clientHeight")}}return{width:e,height:n,maxWidth:r||eb,maxHeight:s||eb}}const Ym=t=>Math.round(t*10)/10;function rme(t,e,n,r){const s=kv(t),o=Ml(s,"margin"),a=nb(s.maxWidth,t,"clientWidth")||eb,l=nb(s.maxHeight,t,"clientHeight")||eb,c=nme(t,e,n);let{width:d,height:u}=c;if(s.boxSizing==="content-box"){const g=Ml(s,"border","width"),E=Ml(s,"padding");d-=E.width+g.width,u-=E.height+g.height}return d=Math.max(0,d-o.width),u=Math.max(0,r?d/r:u-o.height),d=Ym(Math.min(d,a,c.maxWidth)),u=Ym(Math.min(u,l,c.maxHeight)),d&&!u&&(u=Ym(d/2)),(e!==void 0||n!==void 0)&&r&&c.height&&u>c.height&&(u=c.height,d=Ym(Math.floor(u*r))),{width:d,height:u}}function yF(t,e,n){const r=e||1,s=Math.floor(t.height*r),o=Math.floor(t.width*r);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const a=t.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),t.currentDevicePixelRatio!==r||a.height!==s||a.width!==o?(t.currentDevicePixelRatio=r,a.height=s,a.width=o,t.ctx.setTransform(r,0,0,r,0,0),!0):!1}const sme=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};PA()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function bF(t,e){const n=Xpe(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function ml(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function ome(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:r==="middle"?n<.5?t.y:e.y:r==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function ime(t,e,n,r){const s={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},a=ml(t,s,n),l=ml(s,o,n),c=ml(o,e,n),d=ml(a,l,n),u=ml(l,c,n);return ml(d,u,n)}const ame=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},lme=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Ed(t,e,n){return t?ame(e,n):lme()}function y4(t,e){let n,r;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)}function b4(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function v4(t){return t==="angle"?{between:Wh,compare:cpe,normalize:Jr}:{between:ci,compare:(e,n)=>e-n,normalize:e=>e}}function vF({start:t,end:e,count:n,loop:r,style:s}){return{start:t%n,end:e%n,loop:r&&(e-t+1)%n===0,style:s}}function cme(t,e,n){const{property:r,start:s,end:o}=n,{between:a,normalize:l}=v4(r),c=e.length;let{start:d,end:u,loop:f}=t,g,E;if(f){for(d+=c,u+=c,g=0,E=c;g<E&&a(l(e[d%c][r]),s,o);++g)d--,u--;d%=c,u%=c}return u<d&&(u+=c),{start:d,end:u,loop:f,style:t.style}}function _4(t,e,n){if(!n)return[t];const{property:r,start:s,end:o}=n,a=e.length,{compare:l,between:c,normalize:d}=v4(r),{start:u,end:f,loop:g,style:E}=cme(t,e,n),S=[];let w=!1,_=null,h,m,A;const k=()=>c(s,A,h)&&l(s,A)!==0,R=()=>l(o,h)===0||c(o,A,h),O=()=>w||k(),N=()=>!w||R();for(let y=u,v=u;y<=f;++y)m=e[y%a],!m.skip&&(h=d(m[r]),h!==A&&(w=c(h,s,o),_===null&&O()&&(_=l(h,s)===0?y:v),_!==null&&N()&&(S.push(vF({start:_,end:y,loop:g,count:a,style:E})),_=null),v=y,A=h));return _!==null&&S.push(vF({start:_,end:f,loop:g,count:a,style:E})),S}function w4(t,e){const n=[],r=t.segments;for(let s=0;s<r.length;s++){const o=_4(r[s],t.points,e);o.length&&n.push(...o)}return n}function dme(t,e,n,r){let s=0,o=e-1;if(n&&!r)for(;s<e&&!t[s].skip;)s++;for(;s<e&&t[s].skip;)s++;for(s%=e,n&&(o+=s);o>s&&t[o%e].skip;)o--;return o%=e,{start:s,end:o}}function ume(t,e,n,r){const s=t.length,o=[];let a=e,l=t[e],c;for(c=e+1;c<=n;++c){const d=t[c%s];d.skip||d.stop?l.skip||(r=!1,o.push({start:e%s,end:(c-1)%s,loop:r}),e=a=d.stop?c:null):(a=c,l.skip&&(e=c)),l=d}return a!==null&&o.push({start:e%s,end:a%s,loop:r}),o}function fme(t,e){const n=t.points,r=t.options.spanGaps,s=n.length;if(!s)return[];const o=!!t._loop,{start:a,end:l}=dme(n,s,o,r);if(r===!0)return _F(t,[{start:a,end:l,loop:o}],n,e);const c=l<a?l+s:l,d=!!t._fullLoop&&a===0&&l===s-1;return _F(t,ume(n,a,c,d),n,e)}function _F(t,e,n,r){return!r||!r.setContext||!n?e:hme(t,e,n,r)}function hme(t,e,n,r){const s=t._chart.getContext(),o=wF(t.options),{_datasetIndex:a,options:{spanGaps:l}}=t,c=n.length,d=[];let u=o,f=e[0].start,g=f;function E(S,w,_,h){const m=l?-1:1;if(S!==w){for(S+=c;n[S%c].skip;)S-=m;for(;n[w%c].skip;)w+=m;S%c!==w%c&&(d.push({start:S%c,end:w%c,loop:_,style:h}),u=h,f=w%c)}}for(const S of e){f=l?f:S.start;let w=n[f%c],_;for(g=f+1;g<=S.end;g++){const h=n[g%c];_=wF(r.setContext(Ja(s,{type:"segment",p0:w,p1:h,p0DataIndex:(g-1)%c,p1DataIndex:g%c,datasetIndex:a}))),pme(_,u)&&E(f,g-1,S.loop,u),w=h,u=_}f<g-1&&E(f,g-1,S.loop,u)}return d}function wF(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function pme(t,e){if(!e)return!1;const n=[],r=function(s,o){return EA(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(t,r)!==JSON.stringify(e,r)}/*! * Chart.js v4.4.3 * https://www.chartjs.org * (c) 2024 Chart.js Contributors * Released under the MIT License */class mme{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,r,s){const o=n.listeners[s],a=n.duration;o.forEach(l=>l({chart:e,initial:n.initial,numSteps:a,currentStep:Math.min(r-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=s4.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((r,s)=>{if(!r.running||!r.items.length)return;const o=r.items;let a=o.length-1,l=!1,c;for(;a>=0;--a)c=o[a],c._active?(c._total>r.duration&&(r.duration=c._total),c.tick(e),l=!0):(o[a]=o[o.length-1],o.pop());l&&(s.draw(),this._notify(s,r,e,"progress")),o.length||(r.running=!1,this._notify(s,r,e,"complete"),r.initial=!1),n+=o.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let r=n.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,r)),r}listen(e,n,r){this._getAnims(e).listeners[n].push(r)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,s)=>Math.max(r,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const r=n.items;let s=r.length-1;for(;s>=0;--s)r[s].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Uo=new mme;const xF="transparent",gme={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const r=fF(t||xF),s=r.valid&&fF(e||xF);return s&&s.valid?s.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class yme{constructor(e,n,r,s){const o=n[r];s=en([e.to,s,o,e.from]);const a=en([e.from,o,s]);this._active=!0,this._fn=e.fn||gme[e.type||typeof a],this._easing=Gf[e.easing]||Gf.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=a,this._to=s,this._promises=void 0}active(){return this._active}update(e,n,r){if(this._active){this._notify(!1);const s=this._target[this._prop],o=r-this._start,a=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=en([e.to,n,s,e.from]),this._from=en([e.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,r=this._duration,s=this._prop,o=this._from,a=this._loop,l=this._to;let c;if(this._active=o!==l&&(a||n<r),!this._active){this._target[s]=l,this._notify(!0);return}if(n<0){this._target[s]=o;return}c=n/r%2,c=a&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[s]=this._fn(o,l,c)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,r)=>{e.push({res:n,rej:r})})}_notify(e){const n=e?"res":"rej",r=this._promises||[];for(let s=0;s<r.length;s++)r[s][n]()}}class x4{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!gt(e))return;const n=Object.keys(gn.animation),r=this._properties;Object.getOwnPropertyNames(e).forEach(s=>{const o=e[s];if(!gt(o))return;const a={};for(const l of n)a[l]=o[l];(rn(o.properties)&&o.properties||[s]).forEach(l=>{(l===s||!r.has(l))&&r.set(l,a)})})}_animateOptions(e,n){const r=n.options,s=vme(e,r);if(!s)return[];const o=this._createAnimations(s,r);return r.$shared&&bme(e.options.$animations,r).then(()=>{e.options=r},()=>{}),o}_createAnimations(e,n){const r=this._properties,s=[],o=e.$animations||(e.$animations={}),a=Object.keys(n),l=Date.now();let c;for(c=a.length-1;c>=0;--c){const d=a[c];if(d.charAt(0)==="$")continue;if(d==="options"){s.push(...this._animateOptions(e,n));continue}const u=n[d];let f=o[d];const g=r.get(d);if(f)if(g&&f.active()){f.update(g,u,l);continue}else f.cancel();if(!g||!g.duration){e[d]=u;continue}o[d]=f=new yme(g,e,d,u),s.push(f)}return s}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const r=this._createAnimations(e,n);if(r.length)return Uo.add(this._chart,r),!0}}function bme(t,e){const n=[],r=Object.keys(e);for(let s=0;s<r.length;s++){const o=t[r[s]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function vme(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function CF(t,e){const n=t&&t.options||{},r=n.reverse,s=n.min===void 0?e:0,o=n.max===void 0?e:0;return{start:r?o:s,end:r?s:o}}function _me(t,e,n){if(n===!1)return!1;const r=CF(t,n),s=CF(e,n);return{top:s.end,right:r.end,bottom:s.start,left:r.start}}function wme(t){let e,n,r,s;return gt(t)?(e=t.top,n=t.right,r=t.bottom,s=t.left):e=n=r=s=t,{top:e,right:n,bottom:r,left:s,disabled:t===!1}}function C4(t,e){const n=[],r=t._getSortedDatasetMetas(e);let s,o;for(s=0,o=r.length;s<o;++s)n.push(r[s].index);return n}function EF(t,e,n,r={}){const s=t.keys,o=r.mode==="single";let a,l,c,d;if(e!==null){for(a=0,l=s.length;a<l;++a){if(c=+s[a],c===n){if(r.all)continue;break}d=t.values[c],En(d)&&(o||e===0||_o(e)===_o(d))&&(e+=d)}return e}}function xme(t,e){const{iScale:n,vScale:r}=e,s=n.axis==="x"?"x":"y",o=r.axis==="x"?"x":"y",a=Object.keys(t),l=new Array(a.length);let c,d,u;for(c=0,d=a.length;c<d;++c)u=a[c],l[c]={[s]:u,[o]:t[u]};return l}function SF(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function Cme(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function Eme(t){const{min:e,max:n,minDefined:r,maxDefined:s}=t.getUserBounds();return{min:r?e:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}function Sme(t,e,n){const r=t[e]||(t[e]={});return r[n]||(r[n]={})}function AF(t,e,n,r){for(const s of e.getMatchingVisibleMetas(r).reverse()){const o=t[s.index];if(n&&o>0||!n&&o<0)return s.index}return null}function NF(t,e){const{chart:n,_cachedMeta:r}=t,s=n._stacks||(n._stacks={}),{iScale:o,vScale:a,index:l}=r,c=o.axis,d=a.axis,u=Cme(o,a,r),f=e.length;let g;for(let E=0;E<f;++E){const S=e[E],{[c]:w,[d]:_}=S,h=S._stacks||(S._stacks={});g=h[d]=Sme(s,u,w),g[l]=_,g._top=AF(g,a,!0,r.type),g._bottom=AF(g,a,!1,r.type);const m=g._visualValues||(g._visualValues={});m[l]=_}}function Y_(t,e){const n=t.scales;return Object.keys(n).filter(r=>n[r].axis===e).shift()}function Ame(t,e){return Ja(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Nme(t,e,n){return Ja(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Xu(t,e){const n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(const s of e){const o=s._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const H_=t=>t==="reset"||t==="none",RF=(t,e)=>e?t:Object.assign({},t),Rme=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:C4(n,!0),values:null};class Js{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=SF(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Xu(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,r=this.getDataset(),s=(f,g,E,S)=>f==="x"?g:f==="r"?S:E,o=n.xAxisID=st(r.xAxisID,Y_(e,"x")),a=n.yAxisID=st(r.yAxisID,Y_(e,"y")),l=n.rAxisID=st(r.rAxisID,Y_(e,"r")),c=n.indexAxis,d=n.iAxisID=s(c,o,a,l),u=n.vAxisID=s(c,a,o,l);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(d),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&cF(this._data,this),e._stacked&&Xu(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),r=this._data;if(gt(n)){const s=this._cachedMeta;this._data=xme(n,s)}else if(r!==n){if(r){cF(r,this);const s=this._cachedMeta;Xu(s),s._parsed=[]}n&&Object.isExtensible(n)&&hpe(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,r=this.getDataset();let s=!1;this._dataCheck();const o=n._stacked;n._stacked=SF(n.vScale,n),n.stack!==r.stack&&(s=!0,Xu(n),n.stack=r.stack),this._resyncElements(e),(s||o!==n._stacked)&&NF(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:r,_data:s}=this,{iScale:o,_stacked:a}=r,l=o.axis;let c=e===0&&n===s.length?!0:r._sorted,d=e>0&&r._parsed[e-1],u,f,g;if(this._parsing===!1)r._parsed=s,r._sorted=!0,g=s;else{rn(s[e])?g=this.parseArrayData(r,s,e,n):gt(s[e])?g=this.parseObjectData(r,s,e,n):g=this.parsePrimitiveData(r,s,e,n);const E=()=>f[l]===null||d&&f[l]<d[l];for(u=0;u<n;++u)r._parsed[u+e]=f=g[u],c&&(E()&&(c=!1),d=f);r._sorted=c}a&&NF(this,g)}parsePrimitiveData(e,n,r,s){const{iScale:o,vScale:a}=e,l=o.axis,c=a.axis,d=o.getLabels(),u=o===a,f=new Array(s);let g,E,S;for(g=0,E=s;g<E;++g)S=g+r,f[g]={[l]:u||o.parse(d[S],S),[c]:a.parse(n[S],S)};return f}parseArrayData(e,n,r,s){const{xScale:o,yScale:a}=e,l=new Array(s);let c,d,u,f;for(c=0,d=s;c<d;++c)u=c+r,f=n[u],l[c]={x:o.parse(f[0],u),y:a.parse(f[1],u)};return l}parseObjectData(e,n,r,s){const{xScale:o,yScale:a}=e,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=new Array(s);let u,f,g,E;for(u=0,f=s;u<f;++u)g=u+r,E=n[g],d[u]={x:o.parse(La(E,l),g),y:a.parse(La(E,c),g)};return d}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,r){const s=this.chart,o=this._cachedMeta,a=n[e.axis],l={keys:C4(s,!0),values:n._stacks[e.axis]._visualValues};return EF(l,a,o.index,{mode:r})}updateRangeFromParsed(e,n,r,s){const o=r[n.axis];let a=o===null?NaN:o;const l=s&&r._stacks[n.axis];s&&l&&(s.values=l,a=EF(s,o,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,n){const r=this._cachedMeta,s=r._parsed,o=r._sorted&&e===r.iScale,a=s.length,l=this._getOtherScale(e),c=Rme(n,r,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=Eme(l);let g,E;function S(){E=s[g];const w=E[l.axis];return!En(E[e.axis])||u>w||f<w}for(g=0;g<a&&!(!S()&&(this.updateRangeFromParsed(d,e,E,c),o));++g);if(o){for(g=a-1;g>=0;--g)if(!S()){this.updateRangeFromParsed(d,e,E,c);break}}return d}getAllParsedValues(e){const n=this._cachedMeta._parsed,r=[];let s,o,a;for(s=0,o=n.length;s<o;++s)a=n[s][e.axis],En(a)&&r.push(a);return r}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,r=n.iScale,s=n.vScale,o=this.getParsed(e);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=wme(st(this.options.clip,_me(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,r=this._cachedMeta,s=r.data||[],o=n.chartArea,a=[],l=this._drawStart||0,c=this._drawCount||s.length-l,d=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(e,o,l,c),u=l;u<l+c;++u){const f=s[u];f.hidden||(f.active&&d?a.push(f):f.draw(e,o))}for(u=0;u<a.length;++u)a[u].draw(e,o)}getStyle(e,n){const r=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(e||0,r)}getContext(e,n,r){const s=this.getDataset();let o;if(e>=0&&e<this._cachedMeta.data.length){const a=this._cachedMeta.data[e];o=a.$context||(a.$context=Nme(this.getContext(),e,a)),o.parsed=this.getParsed(e),o.raw=s.data[e],o.index=o.dataIndex=e}else o=this.$context||(this.$context=Ame(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=r,o}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",r){const s=n==="active",o=this._cachedDataOpts,a=e+"-"+n,l=o[a],c=this.enableOptionSharing&&Gh(r);if(l)return RF(l,c);const d=this.chart.config,u=d.datasetElementScopeKeys(this._type,e),f=s?[`${e}Hover`,"hover",e,""]:[e,""],g=d.getOptionScopes(this.getDataset(),u),E=Object.keys(gn.elements[e]),S=()=>this.getContext(r,s,n),w=d.resolveNamedOptions(g,E,S,f);return w.$shared&&(w.$shared=c,o[a]=Object.freeze(RF(w,c))),w}_resolveAnimations(e,n,r){const s=this.chart,o=this._cachedDataOpts,a=`animation-${n}`,l=o[a];if(l)return l;let c;if(s.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,n),g=u.getOptionScopes(this.getDataset(),f);c=u.createResolver(g,this.getContext(e,r,n))}const d=new x4(s,c&&c.animations);return c&&c._cacheable&&(o[a]=Object.freeze(d)),d}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||H_(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const r=this.resolveDataElementOptions(e,n),s=this._sharedOptions,o=this.getSharedOptions(r),a=this.includeOptions(n,o)||o!==s;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:a}}updateElement(e,n,r,s){H_(s)?Object.assign(e,r):this._resolveAnimations(n,s).update(e,r)}updateSharedOptions(e,n,r){e&&!H_(n)&&this._resolveAnimations(void 0,n).update(e,r)}_setStyle(e,n,r,s){e.active=s;const o=this.getStyle(n,s);this._resolveAnimations(n,r,s).update(e,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(e,n,r){this._setStyle(e,r,"active",!1)}setHoverStyle(e,n,r){this._setStyle(e,r,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,r=this._cachedMeta.data;for(const[l,c,d]of this._syncList)this[l](c,d);this._syncList=[];const s=r.length,o=n.length,a=Math.min(o,s);a&&this.parse(0,a),o>s?this._insertElements(s,o-s,e):o<s&&this._removeElements(o,s-o)}_insertElements(e,n,r=!0){const s=this._cachedMeta,o=s.data,a=e+n;let l;const c=d=>{for(d.length+=n,l=d.length-1;l>=a;l--)d[l]=d[l-n]};for(c(o),l=e;l<a;++l)o[l]=new this.dataElementType;this._parsing&&c(s._parsed),this.parse(e,n),r&&this.updateElements(o,e,n,"reset")}updateElements(e,n,r,s){}_removeElements(e,n){const r=this._cachedMeta;if(this._parsing){const s=r._parsed.splice(e,n);r._stacked&&Xu(r,s)}r.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,r,s]=e;this[n](r,s)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",e,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Ne(Js,"defaults",{}),Ne(Js,"datasetElementType",null),Ne(Js,"dataElementType",null);function Pme(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let r=[];for(let s=0,o=n.length;s<o;s++)r=r.concat(n[s].controller.getAllParsedValues(t));t._cache.$bar=r4(r.sort((s,o)=>s-o))}return t._cache.$bar}function Ome(t){const e=t.iScale,n=Pme(e,t.type);let r=e._length,s,o,a,l;const c=()=>{a===32767||a===-32768||(Gh(l)&&(r=Math.min(r,Math.abs(a-l)||r)),l=a)};for(s=0,o=n.length;s<o;++s)a=e.getPixelForValue(n[s]),c();for(l=void 0,s=0,o=e.ticks.length;s<o;++s)a=e.getPixelForTick(s),c();return r}function Fme(t,e,n,r){const s=n.barThickness;let o,a;return pt(s)?(o=e.min*n.categoryPercentage,a=n.barPercentage):(o=s*r,a=1),{chunk:o/r,ratio:a,start:e.pixels[t]-o/2}}function Dme(t,e,n,r){const s=e.pixels,o=s[t];let a=t>0?s[t-1]:null,l=t<s.length-1?s[t+1]:null;const c=n.categoryPercentage;a===null&&(a=o-(l===null?e.end-e.start:l-o)),l===null&&(l=o+o-a);const d=o-(o-Math.min(a,l))/2*c;return{chunk:Math.abs(l-a)/2*c/r,ratio:n.barPercentage,start:d}}function kme(t,e,n,r){const s=n.parse(t[0],r),o=n.parse(t[1],r),a=Math.min(s,o),l=Math.max(s,o);let c=a,d=l;Math.abs(a)>Math.abs(l)&&(c=l,d=a),e[n.axis]=d,e._custom={barStart:c,barEnd:d,start:s,end:o,min:a,max:l}}function E4(t,e,n,r){return rn(t)?kme(t,e,n,r):e[n.axis]=n.parse(t,r),e}function PF(t,e,n,r){const s=t.iScale,o=t.vScale,a=s.getLabels(),l=s===o,c=[];let d,u,f,g;for(d=n,u=n+r;d<u;++d)g=e[d],f={},f[s.axis]=l||s.parse(a[d],d),c.push(E4(g,f,o,d));return c}function G_(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function Tme(t,e,n){return t!==0?_o(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function Ime(t){let e,n,r,s,o;return t.horizontal?(e=t.base>t.x,n="left",r="right"):(e=t.base<t.y,n="bottom",r="top"),e?(s="end",o="start"):(s="start",o="end"),{start:n,end:r,reverse:e,top:s,bottom:o}}function Mme(t,e,n,r){let s=e.borderSkipped;const o={};if(!s){t.borderSkipped=o;return}if(s===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:l,reverse:c,top:d,bottom:u}=Ime(t);s==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===r?s=d:(n._bottom||0)===r?s=u:(o[OF(u,a,l,c)]=!0,s=d)),o[OF(s,a,l,c)]=!0,t.borderSkipped=o}function OF(t,e,n,r){return r?(t=Lme(t,e,n),t=FF(t,n,e)):t=FF(t,e,n),t}function Lme(t,e,n){return t===e?n:t===n?e:t}function FF(t,e,n){return t==="start"?e:t==="end"?n:t}function zme(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class Pg extends Js{parsePrimitiveData(e,n,r,s){return PF(e,n,r,s)}parseArrayData(e,n,r,s){return PF(e,n,r,s)}parseObjectData(e,n,r,s){const{iScale:o,vScale:a}=e,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=o.axis==="x"?l:c,u=a.axis==="x"?l:c,f=[];let g,E,S,w;for(g=r,E=r+s;g<E;++g)w=n[g],S={},S[o.axis]=o.parse(La(w,d),g),f.push(E4(La(w,u),S,a,g));return f}updateRangeFromParsed(e,n,r,s){super.updateRangeFromParsed(e,n,r,s);const o=r._custom;o&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:r,vScale:s}=n,o=this.getParsed(e),a=o._custom,l=G_(a)?"["+a.start+", "+a.end+"]":""+s.getLabelForValue(o[s.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,r,s){const o=s==="reset",{index:a,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),d=l.isHorizontal(),u=this._getRuler(),{sharedOptions:f,includeOptions:g}=this._getSharedOptions(n,s);for(let E=n;E<n+r;E++){const S=this.getParsed(E),w=o||pt(S[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(E),_=this._calculateBarIndexPixels(E,u),h=(S._stacks||{})[l.axis],m={horizontal:d,base:w.base,enableBorderRadius:!h||G_(S._custom)||a===h._top||a===h._bottom,x:d?w.head:_.center,y:d?_.center:w.head,height:d?_.size:Math.abs(w.size),width:d?Math.abs(w.size):_.size};g&&(m.options=f||this.resolveDataElementOptions(E,e[E].active?"active":s));const A=m.options||e[E].options;Mme(m,A,h,a),zme(m,A,u.ratio),this.updateElement(e[E],E,m,s)}}_getStacks(e,n){const{iScale:r}=this._cachedMeta,s=r.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),o=r.options.stacked,a=[],l=c=>{const d=c.controller.getParsed(n),u=d&&d[c.vScale.axis];if(pt(u)||isNaN(u))return!0};for(const c of s)if(!(n!==void 0&&l(c))&&((o===!1||a.indexOf(c.stack)===-1||o===void 0&&c.stack===void 0)&&a.push(c.stack),c.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,r){const s=this._getStacks(e,r),o=n!==void 0?s.indexOf(n):-1;return o===-1?s.length-1:o}_getRuler(){const e=this.options,n=this._cachedMeta,r=n.iScale,s=[];let o,a;for(o=0,a=n.data.length;o<a;++o)s.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));const l=e.barThickness;return{min:l||Ome(n),pixels:s,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:e.grouped,ratio:l?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:r,index:s},options:{base:o,minBarLength:a}}=this,l=o||0,c=this.getParsed(e),d=c._custom,u=G_(d);let f=c[n.axis],g=0,E=r?this.applyStack(n,c,r):f,S,w;E!==f&&(g=E-f,E=f),u&&(f=d.barStart,E=d.barEnd-d.barStart,f!==0&&_o(f)!==_o(d.barEnd)&&(g=0),g+=f);const _=!pt(o)&&!u?o:g;let h=n.getPixelForValue(_);if(this.chart.getDataVisibility(e)?S=n.getPixelForValue(g+E):S=h,w=S-h,Math.abs(w)<a){w=Tme(w,n,l)*a,f===l&&(h-=w/2);const m=n.getPixelForDecimal(0),A=n.getPixelForDecimal(1),k=Math.min(m,A),R=Math.max(m,A);h=Math.max(Math.min(h,R),k),S=h+w,r&&!u&&(c._stacks[n.axis]._visualValues[s]=n.getValueForPixel(S)-n.getValueForPixel(h))}if(h===n.getPixelForValue(l)){const m=_o(w)*n.getLineWidthForValue(l)/2;h+=m,w-=m}return{size:w,base:h,head:S,center:S+w/2}}_calculateBarIndexPixels(e,n){const r=n.scale,s=this.options,o=s.skipNull,a=st(s.maxBarThickness,1/0);let l,c;if(n.grouped){const d=o?this._getStackCount(e):n.stackCount,u=s.barThickness==="flex"?Dme(e,n,s,d):Fme(e,n,s,d),f=this._getStackIndex(this.index,this._cachedMeta.stack,o?e:void 0);l=u.start+u.chunk*f+u.chunk/2,c=Math.min(a,u.chunk*u.ratio)}else l=r.getPixelForValue(this.getParsed(e)[r.axis],e),c=Math.min(a,n.min*n.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){const e=this._cachedMeta,n=e.vScale,r=e.data,s=r.length;let o=0;for(;o<s;++o)this.getParsed(o)[n.axis]!==null&&!r[o].hidden&&r[o].draw(this._ctx)}}Ne(Pg,"id","bar"),Ne(Pg,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),Ne(Pg,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Og extends Js{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,r,s){const o=super.parsePrimitiveData(e,n,r,s);for(let a=0;a<o.length;a++)o[a]._custom=this.resolveDataElementOptions(a+r).radius;return o}parseArrayData(e,n,r,s){const o=super.parseArrayData(e,n,r,s);for(let a=0;a<o.length;a++){const l=n[r+a];o[a]._custom=st(l[2],this.resolveDataElementOptions(a+r).radius)}return o}parseObjectData(e,n,r,s){const o=super.parseObjectData(e,n,r,s);for(let a=0;a<o.length;a++){const l=n[r+a];o[a]._custom=st(l&&l.r&&+l.r,this.resolveDataElementOptions(a+r).radius)}return o}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let r=e.length-1;r>=0;--r)n=Math.max(n,e[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:s,yScale:o}=n,a=this.getParsed(e),l=s.getLabelForValue(a.x),c=o.getLabelForValue(a.y),d=a._custom;return{label:r[e]||"",value:"("+l+", "+c+(d?", "+d:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,r,s){const o=s==="reset",{iScale:a,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(n,s),u=a.axis,f=l.axis;for(let g=n;g<n+r;g++){const E=e[g],S=!o&&this.getParsed(g),w={},_=w[u]=o?a.getPixelForDecimal(.5):a.getPixelForValue(S[u]),h=w[f]=o?l.getBasePixel():l.getPixelForValue(S[f]);w.skip=isNaN(_)||isNaN(h),d&&(w.options=c||this.resolveDataElementOptions(g,E.active?"active":s),o&&(w.options.radius=0)),this.updateElement(E,g,w,s)}}resolveDataElementOptions(e,n){const r=this.getParsed(e);let s=super.resolveDataElementOptions(e,n);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const o=s.radius;return n!=="active"&&(s.radius=0),s.radius+=st(r&&r._custom,o),s}}Ne(Og,"id","bubble"),Ne(Og,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),Ne(Og,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function qme(t,e,n){let r=1,s=1,o=0,a=0;if(e<on){const l=t,c=l+e,d=Math.cos(l),u=Math.sin(l),f=Math.cos(c),g=Math.sin(c),E=(A,k,R)=>Wh(A,l,c,!0)?1:Math.max(k,k*n,R,R*n),S=(A,k,R)=>Wh(A,l,c,!0)?-1:Math.min(k,k*n,R,R*n),w=E(0,d,f),_=E(Pn,u,g),h=S(an,d,f),m=S(an+Pn,u,g);r=(w-h)/2,s=(_-m)/2,o=-(w+h)/2,a=-(_+m)/2}return{ratioX:r,ratioY:s,offsetX:o,offsetY:a}}class Al extends Js{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const r=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=r;else{let o=c=>+r[c];if(gt(r[e])){const{key:c="value"}=this._parsing;o=d=>+La(r[d],c)}let a,l;for(a=e,l=e+n;a<l;++a)s._parsed[a]=o(a)}}_getRotation(){return Ws(this.options.rotation-90)}_getCircumference(){return Ws(this.options.circumference)}_getRotationExtents(){let e=on,n=-on;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const s=this.chart.getDatasetMeta(r).controller,o=s._getRotation(),a=s._getCircumference();e=Math.min(e,o),n=Math.max(n,o+a)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:r}=n,s=this._cachedMeta,o=s.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,l=Math.max((Math.min(r.width,r.height)-a)/2,0),c=Math.min(Qhe(this.options.cutout,l),1),d=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:g,ratioY:E,offsetX:S,offsetY:w}=qme(f,u,c),_=(r.width-a)/g,h=(r.height-a)/E,m=Math.max(Math.min(_,h)/2,0),A=Xq(this.options.radius,m),k=Math.max(A*c,0),R=(A-k)/this._getVisibleDatasetWeightTotal();this.offsetX=S*A,this.offsetY=w*A,s.total=this.calculateTotal(),this.outerRadius=A-R*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-R*d,0),this.updateElements(o,0,o.length,e)}_circumference(e,n){const r=this.options,s=this._cachedMeta,o=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(e)||s._parsed[e]===null||s.data[e].hidden?0:this.calculateCircumference(s._parsed[e]*o/on)}updateElements(e,n,r,s){const o=s==="reset",a=this.chart,l=a.chartArea,d=a.options.animation,u=(l.left+l.right)/2,f=(l.top+l.bottom)/2,g=o&&d.animateScale,E=g?0:this.innerRadius,S=g?0:this.outerRadius,{sharedOptions:w,includeOptions:_}=this._getSharedOptions(n,s);let h=this._getRotation(),m;for(m=0;m<n;++m)h+=this._circumference(m,o);for(m=n;m<n+r;++m){const A=this._circumference(m,o),k=e[m],R={x:u+this.offsetX,y:f+this.offsetY,startAngle:h,endAngle:h+A,circumference:A,outerRadius:S,innerRadius:E};_&&(R.options=w||this.resolveDataElementOptions(m,k.active?"active":s)),h+=A,this.updateElement(k,m,R,s)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let r=0,s;for(s=0;s<n.length;s++){const o=e._parsed[s];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(s)&&!n[s].hidden&&(r+=Math.abs(o))}return r}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?on*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart,s=r.data.labels||[],o=qp(n._parsed[e],r.options.locale);return{label:s[e]||"",value:o}}getMaxBorderWidth(e){let n=0;const r=this.chart;let s,o,a,l,c;if(!e){for(s=0,o=r.data.datasets.length;s<o;++s)if(r.isDatasetVisible(s)){a=r.getDatasetMeta(s),e=a.data,l=a.controller;break}}if(!e)return 0;for(s=0,o=e.length;s<o;++s)c=l.resolveDataElementOptions(s),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let r=0,s=e.length;r<s;++r){const o=this.resolveDataElementOptions(r);n=Math.max(n,o.offset||0,o.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let r=0;r<e;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(e){return Math.max(st(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Ne(Al,"id","doughnut"),Ne(Al,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),Ne(Al,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),Ne(Al,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:s}}=e.legend.options;return n.labels.map((o,a)=>{const c=e.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:s,lineWidth:c.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(a),index:a}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class Fg extends Js{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:r,data:s=[],_dataset:o}=n,a=this.chart._animationsDisabled;let{start:l,count:c}=i4(n,s,a);this._drawStart=l,this._drawCount=c,a4(n)&&(l=0,c=s.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=s;const d=this.resolveDatasetElementOptions(e);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(r,void 0,{animated:!a,options:d},e),this.updateElements(s,l,c,e)}updateElements(e,n,r,s){const o=s==="reset",{iScale:a,vScale:l,_stacked:c,_dataset:d}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(n,s),g=a.axis,E=l.axis,{spanGaps:S,segment:w}=this.options,_=Zd(S)?S:Number.POSITIVE_INFINITY,h=this.chart._animationsDisabled||o||s==="none",m=n+r,A=e.length;let k=n>0&&this.getParsed(n-1);for(let R=0;R<A;++R){const O=e[R],N=h?O:{};if(R<n||R>=m){N.skip=!0;continue}const y=this.getParsed(R),v=pt(y[E]),b=N[g]=a.getPixelForValue(y[g],R),P=N[E]=o||v?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,y,c):y[E],R);N.skip=isNaN(b)||isNaN(P)||v,N.stop=R>0&&Math.abs(y[g]-k[g])>_,w&&(N.parsed=y,N.raw=d.data[R]),f&&(N.options=u||this.resolveDataElementOptions(R,O.active?"active":s)),h||this.updateElement(O,R,N,s),k=y}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,r=n.options&&n.options.borderWidth||0,s=e.data||[];if(!s.length)return r;const o=s[0].size(this.resolveDataElementOptions(0)),a=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(r,o,a)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Ne(Fg,"id","line"),Ne(Fg,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Ne(Fg,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Vf extends Js{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart,s=r.data.labels||[],o=qp(n._parsed[e].r,r.options.locale);return{label:s[e]||"",value:o}}parseObjectData(e,n,r,s){return m4.bind(this)(e,n,r,s)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((r,s)=>{const o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(o<n.min&&(n.min=o),o>n.max&&(n.max=o))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,r=e.options,s=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(s/2,0),a=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),l=(o-a)/e.getVisibleDatasetCount();this.outerRadius=o-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(e,n,r,s){const o=s==="reset",a=this.chart,c=a.options.animation,d=this._cachedMeta.rScale,u=d.xCenter,f=d.yCenter,g=d.getIndexAngle(0)-.5*an;let E=g,S;const w=360/this.countVisibleElements();for(S=0;S<n;++S)E+=this._computeAngle(S,s,w);for(S=n;S<n+r;S++){const _=e[S];let h=E,m=E+this._computeAngle(S,s,w),A=a.getDataVisibility(S)?d.getDistanceFromCenterForValue(this.getParsed(S).r):0;E=m,o&&(c.animateScale&&(A=0),c.animateRotate&&(h=m=g));const k={x:u,y:f,innerRadius:0,outerRadius:A,startAngle:h,endAngle:m,options:this.resolveDataElementOptions(S,_.active?"active":s)};this.updateElement(_,S,k,s)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((r,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&n++}),n}_computeAngle(e,n,r){return this.chart.getDataVisibility(e)?Ws(this.resolveDataElementOptions(e,n).angle||r):0}}Ne(Vf,"id","polarArea"),Ne(Vf,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),Ne(Vf,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:s}}=e.legend.options;return n.labels.map((o,a)=>{const c=e.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:s,lineWidth:c.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(a),index:a}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class yx extends Al{}Ne(yx,"id","pie"),Ne(yx,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Dg extends Js{getLabelAndValue(e){const n=this._cachedMeta.vScale,r=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(e,n,r,s){return m4.bind(this)(e,n,r,s)}update(e){const n=this._cachedMeta,r=n.dataset,s=n.data||[],o=n.iScale.getLabels();if(r.points=s,e!=="resize"){const a=this.resolveDatasetElementOptions(e);this.options.showLine||(a.borderWidth=0);const l={_loop:!0,_fullLoop:o.length===s.length,options:a};this.updateElement(r,void 0,l,e)}this.updateElements(s,0,s.length,e)}updateElements(e,n,r,s){const o=this._cachedMeta.rScale,a=s==="reset";for(let l=n;l<n+r;l++){const c=e[l],d=this.resolveDataElementOptions(l,c.active?"active":s),u=o.getPointPositionForValue(l,this.getParsed(l).r),f=a?o.xCenter:u.x,g=a?o.yCenter:u.y,E={x:f,y:g,angle:u.angle,skip:isNaN(f)||isNaN(g),options:d};this.updateElement(c,l,E,s)}}}Ne(Dg,"id","radar"),Ne(Dg,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),Ne(Dg,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class kg extends Js{getLabelAndValue(e){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:s,yScale:o}=n,a=this.getParsed(e),l=s.getLabelForValue(a.x),c=o.getLabelForValue(a.y);return{label:r[e]||"",value:"("+l+", "+c+")"}}update(e){const n=this._cachedMeta,{data:r=[]}=n,s=this.chart._animationsDisabled;let{start:o,count:a}=i4(n,r,s);if(this._drawStart=o,this._drawCount=a,a4(n)&&(o=0,a=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:l,_dataset:c}=n;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=r;const d=this.resolveDatasetElementOptions(e);d.segment=this.options.segment,this.updateElement(l,void 0,{animated:!s,options:d},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(r,o,a,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,r,s){const o=s==="reset",{iScale:a,vScale:l,_stacked:c,_dataset:d}=this._cachedMeta,u=this.resolveDataElementOptions(n,s),f=this.getSharedOptions(u),g=this.includeOptions(s,f),E=a.axis,S=l.axis,{spanGaps:w,segment:_}=this.options,h=Zd(w)?w:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||o||s==="none";let A=n>0&&this.getParsed(n-1);for(let k=n;k<n+r;++k){const R=e[k],O=this.getParsed(k),N=m?R:{},y=pt(O[S]),v=N[E]=a.getPixelForValue(O[E],k),b=N[S]=o||y?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,O,c):O[S],k);N.skip=isNaN(v)||isNaN(b)||y,N.stop=k>0&&Math.abs(O[E]-A[E])>h,_&&(N.parsed=O,N.raw=d.data[k]),g&&(N.options=f||this.resolveDataElementOptions(k,R.active?"active":s)),m||this.updateElement(R,k,N,s),A=O}this.updateSharedOptions(f,s,u)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let l=0;for(let c=n.length-1;c>=0;--c)l=Math.max(l,n[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}const r=e.dataset,s=r.options&&r.options.borderWidth||0;if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,a)/2}}Ne(kg,"id","scatter"),Ne(kg,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),Ne(kg,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var jme=Object.freeze({__proto__:null,BarController:Pg,BubbleController:Og,DoughnutController:Al,LineController:Fg,PieController:yx,PolarAreaController:Vf,RadarController:Dg,ScatterController:kg});function al(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class FA{constructor(e){Ne(this,"options");this.options=e||{}}static override(e){Object.assign(FA.prototype,e)}init(){}formats(){return al()}parse(){return al()}format(){return al()}add(){return al()}diff(){return al()}startOf(){return al()}endOf(){return al()}}var $me={_date:FA};function Bme(t,e,n,r){const{controller:s,data:o,_sorted:a}=t,l=s._cachedMeta.iScale;if(l&&e===l.axis&&e!=="r"&&a&&o.length){const c=l._reversePixels?upe:di;if(r){if(s._sharedOptions){const d=o[0],u=typeof d.getRange=="function"&&d.getRange(e);if(u){const f=c(o,e,n-u),g=c(o,e,n+u);return{lo:f.lo,hi:g.hi}}}}else return c(o,e,n)}return{lo:0,hi:o.length-1}}function jp(t,e,n,r,s){const o=t.getSortedVisibleDatasetMetas(),a=n[e];for(let l=0,c=o.length;l<c;++l){const{index:d,data:u}=o[l],{lo:f,hi:g}=Bme(o[l],e,a,s);for(let E=f;E<=g;++E){const S=u[E];S.skip||r(S,d,E)}}}function Ume(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(r,s){const o=e?Math.abs(r.x-s.x):0,a=n?Math.abs(r.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function W_(t,e,n,r,s){const o=[];return!s&&!t.isPointInArea(e)||jp(t,n,e,function(l,c,d){!s&&!ui(l,t.chartArea,0)||l.inRange(e.x,e.y,r)&&o.push({element:l,datasetIndex:c,index:d})},!0),o}function Yme(t,e,n,r){let s=[];function o(a,l,c){const{startAngle:d,endAngle:u}=a.getProps(["startAngle","endAngle"],r),{angle:f}=t4(a,{x:e.x,y:e.y});Wh(f,d,u)&&s.push({element:a,datasetIndex:l,index:c})}return jp(t,n,e,o),s}function Hme(t,e,n,r,s,o){let a=[];const l=Ume(n);let c=Number.POSITIVE_INFINITY;function d(u,f,g){const E=u.inRange(e.x,e.y,s);if(r&&!E)return;const S=u.getCenterPoint(s);if(!(!!o||t.isPointInArea(S))&&!E)return;const _=l(e,S);_<c?(a=[{element:u,datasetIndex:f,index:g}],c=_):_===c&&a.push({element:u,datasetIndex:f,index:g})}return jp(t,n,e,d),a}function V_(t,e,n,r,s,o){return!o&&!t.isPointInArea(e)?[]:n==="r"&&!r?Yme(t,e,n,s):Hme(t,e,n,r,s,o)}function DF(t,e,n,r,s){const o=[],a=n==="x"?"inXRange":"inYRange";let l=!1;return jp(t,n,e,(c,d,u)=>{c[a](e[n],s)&&(o.push({element:c,datasetIndex:d,index:u}),l=l||c.inRange(e.x,e.y,s))}),r&&!l?[]:o}var Gme={evaluateInteractionItems:jp,modes:{index(t,e,n,r){const s=pl(e,t),o=n.axis||"x",a=n.includeInvisible||!1,l=n.intersect?W_(t,s,o,r,a):V_(t,s,o,!1,r,a),c=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach(d=>{const u=l[0].index,f=d.data[u];f&&!f.skip&&c.push({element:f,datasetIndex:d.index,index:u})}),c):[]},dataset(t,e,n,r){const s=pl(e,t),o=n.axis||"xy",a=n.includeInvisible||!1;let l=n.intersect?W_(t,s,o,r,a):V_(t,s,o,!1,r,a);if(l.length>0){const c=l[0].datasetIndex,d=t.getDatasetMeta(c).data;l=[];for(let u=0;u<d.length;++u)l.push({element:d[u],datasetIndex:c,index:u})}return l},point(t,e,n,r){const s=pl(e,t),o=n.axis||"xy",a=n.includeInvisible||!1;return W_(t,s,o,r,a)},nearest(t,e,n,r){const s=pl(e,t),o=n.axis||"xy",a=n.includeInvisible||!1;return V_(t,s,o,n.intersect,r,a)},x(t,e,n,r){const s=pl(e,t);return DF(t,s,"x",n.intersect,r)},y(t,e,n,r){const s=pl(e,t);return DF(t,s,"y",n.intersect,r)}}};const S4=["left","top","right","bottom"];function Qu(t,e){return t.filter(n=>n.pos===e)}function kF(t,e){return t.filter(n=>S4.indexOf(n.pos)===-1&&n.box.axis===e)}function ef(t,e){return t.sort((n,r)=>{const s=e?r:n,o=e?n:r;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function Wme(t){const e=[];let n,r,s,o,a,l;for(n=0,r=(t||[]).length;n<r;++n)s=t[n],{position:o,options:{stack:a,stackWeight:l=1}}=s,e.push({index:n,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:a&&o+a,stackWeight:l});return e}function Vme(t){const e={};for(const n of t){const{stack:r,pos:s,stackWeight:o}=n;if(!r||!S4.includes(s))continue;const a=e[r]||(e[r]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return e}function Kme(t,e){const n=Vme(t),{vBoxMaxWidth:r,hBoxMaxHeight:s}=e;let o,a,l;for(o=0,a=t.length;o<a;++o){l=t[o];const{fullSize:c}=l.box,d=n[l.stack],u=d&&l.stackWeight/d.weight;l.horizontal?(l.width=u?u*r:c&&e.availableWidth,l.height=s):(l.width=r,l.height=u?u*s:c&&e.availableHeight)}return n}function Zme(t){const e=Wme(t),n=ef(e.filter(d=>d.box.fullSize),!0),r=ef(Qu(e,"left"),!0),s=ef(Qu(e,"right")),o=ef(Qu(e,"top"),!0),a=ef(Qu(e,"bottom")),l=kF(e,"x"),c=kF(e,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:s.concat(c).concat(a).concat(l),chartArea:Qu(e,"chartArea"),vertical:r.concat(s).concat(c),horizontal:o.concat(a).concat(l)}}function TF(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function A4(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Jme(t,e,n,r){const{pos:s,box:o}=n,a=t.maxPadding;if(!gt(s)){n.size&&(t[s]-=n.size);const f=r[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?o.height:o.width),n.size=f.size/f.count,t[s]+=n.size}o.getPadding&&A4(a,o.getPadding());const l=Math.max(0,e.outerWidth-TF(a,t,"left","right")),c=Math.max(0,e.outerHeight-TF(a,t,"top","bottom")),d=l!==t.w,u=c!==t.h;return t.w=l,t.h=c,n.horizontal?{same:d,other:u}:{same:u,other:d}}function Xme(t){const e=t.maxPadding;function n(r){const s=Math.max(e[r]-t[r],0);return t[r]+=s,s}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function Qme(t,e){const n=e.maxPadding;function r(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(a=>{o[a]=Math.max(e[a],n[a])}),o}return r(t?["left","right"]:["top","bottom"])}function gf(t,e,n,r){const s=[];let o,a,l,c,d,u;for(o=0,a=t.length,d=0;o<a;++o){l=t[o],c=l.box,c.update(l.width||e.w,l.height||e.h,Qme(l.horizontal,e));const{same:f,other:g}=Jme(e,n,l,r);d|=f&&s.length,u=u||g,c.fullSize||s.push(l)}return d&&gf(s,e,n,r)||u}function Hm(t,e,n,r,s){t.top=n,t.left=e,t.right=e+r,t.bottom=n+s,t.width=r,t.height=s}function IF(t,e,n,r){const s=n.padding;let{x:o,y:a}=e;for(const l of t){const c=l.box,d=r[l.stack]||{count:1,placed:0,weight:1},u=l.stackWeight/d.weight||1;if(l.horizontal){const f=e.w*u,g=d.size||c.height;Gh(d.start)&&(a=d.start),c.fullSize?Hm(c,s.left,a,n.outerWidth-s.right-s.left,g):Hm(c,e.left+d.placed,a,f,g),d.start=a,d.placed+=f,a=c.bottom}else{const f=e.h*u,g=d.size||c.width;Gh(d.start)&&(o=d.start),c.fullSize?Hm(c,o,s.top,g,n.outerHeight-s.bottom-s.top):Hm(c,o,e.top+d.placed,g,f),d.start=o,d.placed+=f,o=c.right}}e.x=o,e.y=a}var fr={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,r){if(!t)return;const s=tr(t.options.layout.padding),o=Math.max(e-s.width,0),a=Math.max(n-s.height,0),l=Zme(t.boxes),c=l.vertical,d=l.horizontal;Dt(t.boxes,w=>{typeof w.beforeLayout=="function"&&w.beforeLayout()});const u=c.reduce((w,_)=>_.box.options&&_.box.options.display===!1?w:w+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:n,padding:s,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/u,hBoxMaxHeight:a/2}),g=Object.assign({},s);A4(g,tr(r));const E=Object.assign({maxPadding:g,w:o,h:a,x:s.left,y:s.top},s),S=Kme(c.concat(d),f);gf(l.fullSize,E,f,S),gf(c,E,f,S),gf(d,E,f,S)&&gf(c,E,f,S),Xme(E),IF(l.leftAndTop,E,f,S),E.x+=E.w,E.y+=E.h,IF(l.rightAndBottom,E,f,S),t.chartArea={left:E.left,top:E.top,right:E.left+E.w,bottom:E.top+E.h,height:E.h,width:E.w},Dt(l.chartArea,w=>{const _=w.box;Object.assign(_,t.chartArea),_.update(E.w,E.h,{left:0,top:0,right:0,bottom:0})})}};class N4{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,r){}removeEventListener(e,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,r,s){return n=Math.max(0,n||e.width),r=r||e.height,{width:n,height:Math.max(0,s?Math.floor(n/s):r)}}isAttached(e){return!0}updateConfig(e){}}class ege extends N4{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Tg="$chartjs",tge={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},MF=t=>t===null||t==="";function nge(t,e){const n=t.style,r=t.getAttribute("height"),s=t.getAttribute("width");if(t[Tg]={initial:{height:r,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",MF(s)){const o=bF(t,"width");o!==void 0&&(t.width=o)}if(MF(r))if(t.style.height==="")t.height=t.width/(e||2);else{const o=bF(t,"height");o!==void 0&&(t.height=o)}return t}const R4=sme?{passive:!0}:!1;function rge(t,e,n){t&&t.addEventListener(e,n,R4)}function sge(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,R4)}function oge(t,e){const n=tge[t.type]||t.type,{x:r,y:s}=pl(t,e);return{type:n,chart:e,native:t,x:r!==void 0?r:null,y:s!==void 0?s:null}}function rb(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function ige(t,e,n){const r=t.canvas,s=new MutationObserver(o=>{let a=!1;for(const l of o)a=a||rb(l.addedNodes,r),a=a&&!rb(l.removedNodes,r);a&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function age(t,e,n){const r=t.canvas,s=new MutationObserver(o=>{let a=!1;for(const l of o)a=a||rb(l.removedNodes,r),a=a&&!rb(l.addedNodes,r);a&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const Kh=new Map;let LF=0;function P4(){const t=window.devicePixelRatio;t!==LF&&(LF=t,Kh.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function lge(t,e){Kh.size||window.addEventListener("resize",P4),Kh.set(t,e)}function cge(t){Kh.delete(t),Kh.size||window.removeEventListener("resize",P4)}function dge(t,e,n){const r=t.canvas,s=r&&OA(r);if(!s)return;const o=o4((l,c)=>{const d=s.clientWidth;n(l,c),d<s.clientWidth&&n()},window),a=new ResizeObserver(l=>{const c=l[0],d=c.contentRect.width,u=c.contentRect.height;d===0&&u===0||o(d,u)});return a.observe(s),lge(t,o),a}function K_(t,e,n){n&&n.disconnect(),e==="resize"&&cge(t)}function uge(t,e,n){const r=t.canvas,s=o4(o=>{t.ctx!==null&&n(oge(o,t))},t);return rge(r,e,s),s}class fge extends N4{acquireContext(e,n){const r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(nge(e,n),r):null}releaseContext(e){const n=e.canvas;if(!n[Tg])return!1;const r=n[Tg].initial;["height","width"].forEach(o=>{const a=r[o];pt(a)?n.removeAttribute(o):n.setAttribute(o,a)});const s=r.style||{};return Object.keys(s).forEach(o=>{n.style[o]=s[o]}),n.width=n.width,delete n[Tg],!0}addEventListener(e,n,r){this.removeEventListener(e,n);const s=e.$proxies||(e.$proxies={}),a={attach:ige,detach:age,resize:dge}[n]||uge;s[n]=a(e,n,r)}removeEventListener(e,n){const r=e.$proxies||(e.$proxies={}),s=r[n];if(!s)return;({attach:K_,detach:K_,resize:K_}[n]||sge)(e,n,s),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,r,s){return rme(e,n,r,s)}isAttached(e){const n=e&&OA(e);return!!(n&&n.isConnected)}}function hge(t){return!PA()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?ege:fge}var sg;let qi=(sg=class{constructor(){Ne(this,"x");Ne(this,"y");Ne(this,"active",!1);Ne(this,"options");Ne(this,"$animations")}tooltipPosition(e){const{x:n,y:r}=this.getProps(["x","y"],e);return{x:n,y:r}}hasValue(){return Zd(this.x)&&Zd(this.y)}getProps(e,n){const r=this.$animations;if(!n||!r)return this;const s={};return e.forEach(o=>{s[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),s}},Ne(sg,"defaults",{}),Ne(sg,"defaultRoutes"),sg);function pge(t,e){const n=t.options.ticks,r=mge(t),s=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?yge(e):[],a=o.length,l=o[0],c=o[a-1],d=[];if(a>s)return bge(e,d,o,a/s),d;const u=gge(o,e,s);if(a>0){let f,g;const E=a>1?Math.round((c-l)/(a-1)):null;for(Gm(e,d,u,pt(E)?0:l-E,l),f=0,g=a-1;f<g;f++)Gm(e,d,u,o[f],o[f+1]);return Gm(e,d,u,c,pt(E)?e.length:c+E),d}return Gm(e,d,u),d}function mge(t){const e=t.options.offset,n=t._tickSize(),r=t._length/n+(e?0:1),s=t._maxLength/n;return Math.floor(Math.min(r,s))}function gge(t,e,n){const r=vge(t),s=e.length/n;if(!r)return Math.max(s,1);const o=ape(r);for(let a=0,l=o.length-1;a<l;a++){const c=o[a];if(c>s)return c}return Math.max(s,1)}function yge(t){const e=[];let n,r;for(n=0,r=t.length;n<r;n++)t[n].major&&e.push(n);return e}function bge(t,e,n,r){let s=0,o=n[0],a;for(r=Math.ceil(r),a=0;a<t.length;a++)a===o&&(e.push(t[a]),s++,o=n[s*r])}function Gm(t,e,n,r,s){const o=st(r,0),a=Math.min(st(s,t.length),t.length);let l=0,c,d,u;for(n=Math.ceil(n),s&&(c=s-r,n=c/Math.floor(c/n)),u=o;u<0;)l++,u=Math.round(o+l*n);for(d=Math.max(o,0);d<a;d++)d===u&&(e.push(t[d]),l++,u=Math.round(o+l*n))}function vge(t){const e=t.length;let n,r;if(e<2)return!1;for(r=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==r)return!1;return r}const _ge=t=>t==="left"?"right":t==="right"?"left":t,zF=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,qF=(t,e)=>Math.min(e||t,t);function jF(t,e){const n=[],r=t.length/e,s=t.length;let o=0;for(;o<s;o+=r)n.push(t[Math.floor(o)]);return n}function wge(t,e,n){const r=t.ticks.length,s=Math.min(e,r-1),o=t._startPixel,a=t._endPixel,l=1e-6;let c=t.getPixelForTick(s),d;if(!(n&&(r===1?d=Math.max(c-o,a-c):e===0?d=(t.getPixelForTick(1)-c)/2:d=(c-t.getPixelForTick(s-1))/2,c+=s<e?d:-d,c<o-l||c>a+l)))return c}function xge(t,e){Dt(t,n=>{const r=n.gc,s=r.length/2;let o;if(s>e){for(o=0;o<s;++o)delete n.data[r[o]];r.splice(0,s)}})}function tf(t){return t.drawTicks?t.tickLength:0}function $F(t,e){if(!t.display)return 0;const n=kn(t.font,e),r=tr(t.padding);return(rn(t.text)?t.text.length:1)*n.lineHeight+r.height}function Cge(t,e){return Ja(t,{scale:e,type:"scale"})}function Ege(t,e,n){return Ja(t,{tick:n,index:e,type:"tick"})}function Sge(t,e,n){let r=CA(t);return(n&&e!=="right"||!n&&e==="right")&&(r=_ge(r)),r}function Age(t,e,n,r){const{top:s,left:o,bottom:a,right:l,chart:c}=t,{chartArea:d,scales:u}=c;let f=0,g,E,S;const w=a-s,_=l-o;if(t.isHorizontal()){if(E=lr(r,o,l),gt(n)){const h=Object.keys(n)[0],m=n[h];S=u[h].getPixelForValue(m)+w-e}else n==="center"?S=(d.bottom+d.top)/2+w-e:S=zF(t,n,e);g=l-o}else{if(gt(n)){const h=Object.keys(n)[0],m=n[h];E=u[h].getPixelForValue(m)-_+e}else n==="center"?E=(d.left+d.right)/2-_+e:E=zF(t,n,e);S=lr(r,a,s),f=n==="left"?-Pn:Pn}return{titleX:E,titleY:S,maxWidth:g,rotation:f}}class dc extends qi{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:r,_suggestedMax:s}=this;return e=Kr(e,Number.POSITIVE_INFINITY),n=Kr(n,Number.NEGATIVE_INFINITY),r=Kr(r,Number.POSITIVE_INFINITY),s=Kr(s,Number.NEGATIVE_INFINITY),{min:Kr(e,r),max:Kr(n,s),minDefined:En(e),maxDefined:En(n)}}getMinMax(e){let{min:n,max:r,minDefined:s,maxDefined:o}=this.getUserBounds(),a;if(s&&o)return{min:n,max:r};const l=this.getMatchingVisibleMetas();for(let c=0,d=l.length;c<d;++c)a=l[c].controller.getMinMax(this,e),s||(n=Math.min(n,a.min)),o||(r=Math.max(r,a.max));return n=o&&n>r?r:n,r=s&&n>r?n:r,{min:Kr(n,Kr(r,n)),max:Kr(r,Kr(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){zt(this.options.beforeUpdate,[this])}update(e,n,r){const{beginAtZero:s,grace:o,ticks:a}=this.options,l=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Ipe(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l<this.ticks.length;this._convertTicksToLabels(c?jF(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=pge(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,e=!e),this._startPixel=n,this._endPixel=r,this._reversePixels=e,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){zt(this.options.afterUpdate,[this])}beforeSetDimensions(){zt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){zt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),zt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){zt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let r,s,o;for(r=0,s=e.length;r<s;r++)o=e[r],o.label=zt(n.callback,[o.value,r,e],this)}afterTickToLabelConversion(){zt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){zt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,r=qF(this.ticks.length,e.ticks.maxTicksLimit),s=n.minRotation||0,o=n.maxRotation;let a=s,l,c,d;if(!this._isVisible()||!n.display||s>=o||r<=1||!this.isHorizontal()){this.labelRotation=s;return}const u=this._getLabelSizes(),f=u.widest.width,g=u.highest.height,E=Kn(this.chart.width-f,0,this.maxWidth);l=e.offset?this.maxWidth/r:E/(r-1),f+6>l&&(l=E/(r-(e.offset?.5:1)),c=this.maxHeight-tf(e.grid)-n.padding-$F(e.title,this.chart.options.font),d=Math.sqrt(f*f+g*g),a=wA(Math.min(Math.asin(Kn((u.highest.height+6)/l,-1,1)),Math.asin(Kn(c/d,-1,1))-Math.asin(Kn(g/d,-1,1)))),a=Math.max(s,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){zt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){zt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:r,title:s,grid:o}}=this,a=this._isVisible(),l=this.isHorizontal();if(a){const c=$F(s,n.options.font);if(l?(e.width=this.maxWidth,e.height=tf(o)+c):(e.height=this.maxHeight,e.width=tf(o)+c),r.display&&this.ticks.length){const{first:d,last:u,widest:f,highest:g}=this._getLabelSizes(),E=r.padding*2,S=Ws(this.labelRotation),w=Math.cos(S),_=Math.sin(S);if(l){const h=r.mirror?0:_*f.width+w*g.height;e.height=Math.min(this.maxHeight,e.height+h+E)}else{const h=r.mirror?0:w*f.width+_*g.height;e.width=Math.min(this.maxWidth,e.width+h+E)}this._calculatePadding(d,u,_,w)}}this._handleMargins(),l?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,r,s){const{ticks:{align:o,padding:a},position:l}=this.options,c=this.labelRotation!==0,d=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let g=0,E=0;c?d?(g=s*e.width,E=r*n.height):(g=r*e.height,E=s*n.width):o==="start"?E=n.width:o==="end"?g=e.width:o!=="inner"&&(g=e.width/2,E=n.width/2),this.paddingLeft=Math.max((g-u+a)*this.width/(this.width-u),0),this.paddingRight=Math.max((E-f+a)*this.width/(this.width-f),0)}else{let u=n.height/2,f=e.height/2;o==="start"?(u=0,f=e.height):o==="end"&&(u=n.height,f=0),this.paddingTop=u+a,this.paddingBottom=f+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){zt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,r;for(n=0,r=e.length;n<r;n++)pt(e[n].label)&&(e.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=jF(r,n)),this._labelSizes=e=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,r){const{ctx:s,_longestTextCache:o}=this,a=[],l=[],c=Math.floor(n/qF(n,r));let d=0,u=0,f,g,E,S,w,_,h,m,A,k,R;for(f=0;f<n;f+=c){if(S=e[f].label,w=this._resolveTickFontOptions(f),s.font=_=w.string,h=o[_]=o[_]||{data:{},gc:[]},m=w.lineHeight,A=k=0,!pt(S)&&!rn(S))A=tb(s,h.data,h.gc,A,S),k=m;else if(rn(S))for(g=0,E=S.length;g<E;++g)R=S[g],!pt(R)&&!rn(R)&&(A=tb(s,h.data,h.gc,A,R),k+=m);a.push(A),l.push(k),d=Math.max(A,d),u=Math.max(k,u)}xge(o,n);const O=a.indexOf(d),N=l.indexOf(u),y=v=>({width:a[v]||0,height:l[v]||0});return{first:y(0),last:y(n-1),widest:y(O),highest:y(N),widths:a,heights:l}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return dpe(this._alignToPixels?il(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const r=n[e];return r.$context||(r.$context=Ege(this.getContext(),e,r))}return this.$context||(this.$context=Cge(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Ws(this.labelRotation),r=Math.abs(Math.cos(n)),s=Math.abs(Math.sin(n)),o=this._getLabelSizes(),a=e.autoSkipPadding||0,l=o?o.widest.width+a:0,c=o?o.highest.height+a:0;return this.isHorizontal()?c*r>l*s?l/r:c/s:c*s<l*r?c/r:l/s}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,r=this.chart,s=this.options,{grid:o,position:a,border:l}=s,c=o.offset,d=this.isHorizontal(),f=this.ticks.length+(c?1:0),g=tf(o),E=[],S=l.setContext(this.getContext()),w=S.display?S.width:0,_=w/2,h=function(W){return il(r,W,w)};let m,A,k,R,O,N,y,v,b,P,F,I;if(a==="top")m=h(this.bottom),N=this.bottom-g,v=m-_,P=h(e.top)+_,I=e.bottom;else if(a==="bottom")m=h(this.top),P=e.top,I=h(e.bottom)-_,N=m+_,v=this.top+g;else if(a==="left")m=h(this.right),O=this.right-g,y=m-_,b=h(e.left)+_,F=e.right;else if(a==="right")m=h(this.left),b=e.left,F=h(e.right)-_,O=m+_,y=this.left+g;else if(n==="x"){if(a==="center")m=h((e.top+e.bottom)/2+.5);else if(gt(a)){const W=Object.keys(a)[0],G=a[W];m=h(this.chart.scales[W].getPixelForValue(G))}P=e.top,I=e.bottom,N=m+_,v=N+g}else if(n==="y"){if(a==="center")m=h((e.left+e.right)/2);else if(gt(a)){const W=Object.keys(a)[0],G=a[W];m=h(this.chart.scales[W].getPixelForValue(G))}O=m-_,y=O-g,b=e.left,F=e.right}const T=st(s.ticks.maxTicksLimit,f),q=Math.max(1,Math.ceil(f/T));for(A=0;A<f;A+=q){const W=this.getContext(A),G=o.setContext(W),H=l.setContext(W),j=G.lineWidth,U=G.color,L=H.dash||[],K=H.dashOffset,Y=G.tickWidth,te=G.tickColor,J=G.tickBorderDash||[],Q=G.tickBorderDashOffset;k=wge(this,A,c),k!==void 0&&(R=il(r,k,j),d?O=y=b=F=R:N=v=P=I=R,E.push({tx1:O,ty1:N,tx2:y,ty2:v,x1:b,y1:P,x2:F,y2:I,width:j,color:U,borderDash:L,borderDashOffset:K,tickWidth:Y,tickColor:te,tickBorderDash:J,tickBorderDashOffset:Q}))}return this._ticksLength=f,this._borderValue=m,E}_computeLabelItems(e){const n=this.axis,r=this.options,{position:s,ticks:o}=r,a=this.isHorizontal(),l=this.ticks,{align:c,crossAlign:d,padding:u,mirror:f}=o,g=tf(r.grid),E=g+u,S=f?-u:E,w=-Ws(this.labelRotation),_=[];let h,m,A,k,R,O,N,y,v,b,P,F,I="middle";if(s==="top")O=this.bottom-S,N=this._getXAxisLabelAlignment();else if(s==="bottom")O=this.top+S,N=this._getXAxisLabelAlignment();else if(s==="left"){const q=this._getYAxisLabelAlignment(g);N=q.textAlign,R=q.x}else if(s==="right"){const q=this._getYAxisLabelAlignment(g);N=q.textAlign,R=q.x}else if(n==="x"){if(s==="center")O=(e.top+e.bottom)/2+E;else if(gt(s)){const q=Object.keys(s)[0],W=s[q];O=this.chart.scales[q].getPixelForValue(W)+E}N=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")R=(e.left+e.right)/2-E;else if(gt(s)){const q=Object.keys(s)[0],W=s[q];R=this.chart.scales[q].getPixelForValue(W)}N=this._getYAxisLabelAlignment(g).textAlign}n==="y"&&(c==="start"?I="top":c==="end"&&(I="bottom"));const T=this._getLabelSizes();for(h=0,m=l.length;h<m;++h){A=l[h],k=A.label;const q=o.setContext(this.getContext(h));y=this.getPixelForTick(h)+o.labelOffset,v=this._resolveTickFontOptions(h),b=v.lineHeight,P=rn(k)?k.length:1;const W=P/2,G=q.color,H=q.textStrokeColor,j=q.textStrokeWidth;let U=N;a?(R=y,N==="inner"&&(h===m-1?U=this.options.reverse?"left":"right":h===0?U=this.options.reverse?"right":"left":U="center"),s==="top"?d==="near"||w!==0?F=-P*b+b/2:d==="center"?F=-T.highest.height/2-W*b+b:F=-T.highest.height+b/2:d==="near"||w!==0?F=b/2:d==="center"?F=T.highest.height/2-W*b:F=T.highest.height-P*b,f&&(F*=-1),w!==0&&!q.showLabelBackdrop&&(R+=b/2*Math.sin(w))):(O=y,F=(1-P)*b/2);let L;if(q.showLabelBackdrop){const K=tr(q.backdropPadding),Y=T.heights[h],te=T.widths[h];let J=F-K.top,Q=0-K.left;switch(I){case"middle":J-=Y/2;break;case"bottom":J-=Y;break}switch(N){case"center":Q-=te/2;break;case"right":Q-=te;break;case"inner":h===m-1?Q-=te:h>0&&(Q-=te/2);break}L={left:Q,top:J,width:te+K.width,height:Y+K.height,color:q.backdropColor}}_.push({label:k,font:v,textOffset:F,options:{rotation:w,color:G,strokeColor:H,strokeWidth:j,textAlign:U,textBaseline:I,translation:[R,O],backdrop:L}})}return _}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Ws(this.labelRotation))return e==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:r,mirror:s,padding:o}}=this.options,a=this._getLabelSizes(),l=e+o,c=a.widest.width;let d,u;return n==="left"?s?(u=this.right+o,r==="near"?d="left":r==="center"?(d="center",u+=c/2):(d="right",u+=c)):(u=this.right-l,r==="near"?d="right":r==="center"?(d="center",u-=c/2):(d="left",u=this.left)):n==="right"?s?(u=this.left+o,r==="near"?d="right":r==="center"?(d="center",u-=c/2):(d="left",u-=c)):(u=this.left+l,r==="near"?d="left":r==="center"?(d="center",u+=c/2):(d="right",u=this.right)):d="right",{textAlign:d,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:r,top:s,width:o,height:a}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(r,s,o,a),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(o=>o.value===e);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const n=this.options.grid,r=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,a;const l=(c,d,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(c.x,c.y),r.lineTo(d.x,d.y),r.stroke(),r.restore())};if(n.display)for(o=0,a=s.length;o<a;++o){const c=s[o];n.drawOnChartArea&&l({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),n.drawTicks&&l({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:r,grid:s}}=this,o=r.setContext(this.getContext()),a=r.display?o.width:0;if(!a)return;const l=s.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let d,u,f,g;this.isHorizontal()?(d=il(e,this.left,a)-a/2,u=il(e,this.right,l)+l/2,f=g=c):(f=il(e,this.top,a)-a/2,g=il(e,this.bottom,l)+l/2,d=u=c),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(d,f),n.lineTo(u,g),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const r=this.ctx,s=this._computeLabelArea();s&&Fv(r,s);const o=this.getLabelItems(e);for(const a of o){const l=a.options,c=a.font,d=a.label,u=a.textOffset;Ql(r,d,0,u,c,l)}s&&Dv(r)}drawTitle(){const{ctx:e,options:{position:n,title:r,reverse:s}}=this;if(!r.display)return;const o=kn(r.font),a=tr(r.padding),l=r.align;let c=o.lineHeight/2;n==="bottom"||n==="center"||gt(n)?(c+=a.bottom,rn(r.text)&&(c+=o.lineHeight*(r.text.length-1))):c+=a.top;const{titleX:d,titleY:u,maxWidth:f,rotation:g}=Age(this,c,n,l);Ql(e,r.text,0,0,o,{color:r.color,maxWidth:f,rotation:g,textAlign:Sge(l,n,s),textBaseline:"middle",translation:[d,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,r=st(e.grid&&e.grid.z,-1),s=st(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==dc.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",s=[];let o,a;for(o=0,a=n.length;o<a;++o){const l=n[o];l[r]===this.id&&(!e||l.type===e)&&s.push(l)}return s}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return kn(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Wm{constructor(e,n,r){this.type=e,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let r;Pge(n)&&(r=this.register(n));const s=this.items,o=e.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in s||(s[o]=e,Nge(e,a,r),this.override&&gn.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){const n=this.items,r=e.id,s=this.scope;r in n&&delete n[r],s&&r in gn[s]&&(delete gn[s][r],this.override&&delete Xl[r])}}function Nge(t,e,n){const r=So(Object.create(null),[n?gn.get(n):{},gn.get(e),t.defaults]);gn.set(e,r),t.defaultRoutes&&Rge(e,t.defaultRoutes),t.descriptors&&gn.describe(e,t.descriptors)}function Rge(t,e){Object.keys(e).forEach(n=>{const r=n.split("."),s=r.pop(),o=[t].concat(r).join("."),a=e[n].split("."),l=a.pop(),c=a.join(".");gn.route(o,s,c,l)})}function Pge(t){return"id"in t&&"defaults"in t}class Oge{constructor(){this.controllers=new Wm(Js,"datasets",!0),this.elements=new Wm(qi,"elements"),this.plugins=new Wm(Object,"plugins"),this.scales=new Wm(dc,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,r){[...n].forEach(s=>{const o=r||this._getRegistryForType(s);r||o.isForType(s)||o===this.plugins&&s.id?this._exec(e,o,s):Dt(s,a=>{const l=r||this._getRegistryForType(a);this._exec(e,l,a)})})}_exec(e,n,r){const s=_A(e);zt(r["before"+s],[],r),n[e](r),zt(r["after"+s],[],r)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(e))return r}return this.plugins}_get(e,n,r){const s=n.get(e);if(s===void 0)throw new Error('"'+e+'" is not a registered '+r+".");return s}}var fo=new Oge;class Fge{constructor(){this._init=[]}notify(e,n,r,s){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const o=s?this._descriptors(e).filter(s):this._descriptors(e),a=this._notify(o,e,n,r);return n==="afterDestroy"&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall")),a}_notify(e,n,r,s){s=s||{};for(const o of e){const a=o.plugin,l=a[r],c=[n,s,o.options];if(zt(l,c,a)===!1&&s.cancelable)return!1}return!0}invalidate(){pt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const r=e&&e.config,s=st(r.options&&r.options.plugins,{}),o=Dge(r);return s===!1&&!n?[]:Tge(e,o,s,n)}_notifyStateChanges(e){const n=this._oldCache||[],r=this._cache,s=(o,a)=>o.filter(l=>!a.some(c=>l.plugin.id===c.plugin.id));this._notify(s(n,r),e,"stop"),this._notify(s(r,n),e,"start")}}function Dge(t){const e={},n=[],r=Object.keys(fo.plugins.items);for(let o=0;o<r.length;o++)n.push(fo.getPlugin(r[o]));const s=t.plugins||[];for(let o=0;o<s.length;o++){const a=s[o];n.indexOf(a)===-1&&(n.push(a),e[a.id]=!0)}return{plugins:n,localIds:e}}function kge(t,e){return!e&&t===!1?null:t===!0?{}:t}function Tge(t,{plugins:e,localIds:n},r,s){const o=[],a=t.getContext();for(const l of e){const c=l.id,d=kge(r[c],s);d!==null&&o.push({plugin:l,options:Ige(t.config,{plugin:l,local:n[c]},d,a)})}return o}function Ige(t,{plugin:e,local:n},r,s){const o=t.pluginScopeKeys(e),a=t.getOptionScopes(r,o);return n&&e.defaults&&a.push(e.defaults),t.createResolver(a,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function bx(t,e){const n=gn.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function Mge(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function Lge(t,e){return t===e?"_index_":"_value_"}function BF(t){if(t==="x"||t==="y"||t==="r")return t}function zge(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function vx(t,...e){if(BF(t))return t;for(const n of e){const r=n.axis||zge(n.position)||t.length>1&&BF(t[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function UF(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function qge(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(r=>r.xAxisID===t||r.yAxisID===t);if(n.length)return UF(t,"x",n[0])||UF(t,"y",n[0])}return{}}function jge(t,e){const n=Xl[t.type]||{scales:{}},r=e.scales||{},s=bx(t.type,e),o=Object.create(null);return Object.keys(r).forEach(a=>{const l=r[a];if(!gt(l))return console.error(`Invalid scale configuration for scale: ${a}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const c=vx(a,l,qge(a,t),gn.scales[l.type]),d=Lge(c,s),u=n.scales||{};o[a]=Yf(Object.create(null),[{axis:c},l,u[c],u[d]])}),t.data.datasets.forEach(a=>{const l=a.type||t.type,c=a.indexAxis||bx(l,e),u=(Xl[l]||{}).scales||{};Object.keys(u).forEach(f=>{const g=Mge(f,c),E=a[g+"AxisID"]||g;o[E]=o[E]||Object.create(null),Yf(o[E],[{axis:g},r[E],u[f]])})}),Object.keys(o).forEach(a=>{const l=o[a];Yf(l,[gn.scales[l.type],gn.scale])}),o}function O4(t){const e=t.options||(t.options={});e.plugins=st(e.plugins,{}),e.scales=jge(t,e)}function F4(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function $ge(t){return t=t||{},t.data=F4(t.data),O4(t),t}const YF=new Map,D4=new Set;function Vm(t,e){let n=YF.get(t);return n||(n=e(),YF.set(t,n),D4.add(n)),n}const nf=(t,e,n)=>{const r=La(e,n);r!==void 0&&t.add(r)};class Bge{constructor(e){this._config=$ge(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=F4(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),O4(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Vm(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Vm(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Vm(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,r=this.type;return Vm(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const r=this._scopeCache;let s=r.get(e);return(!s||n)&&(s=new Map,r.set(e,s)),s}getOptionScopes(e,n,r){const{options:s,type:o}=this,a=this._cachedScopes(e,r),l=a.get(n);if(l)return l;const c=new Set;n.forEach(u=>{e&&(c.add(e),u.forEach(f=>nf(c,e,f))),u.forEach(f=>nf(c,s,f)),u.forEach(f=>nf(c,Xl[o]||{},f)),u.forEach(f=>nf(c,gn,f)),u.forEach(f=>nf(c,mx,f))});const d=Array.from(c);return d.length===0&&d.push(Object.create(null)),D4.has(n)&&a.set(n,d),d}chartOptionScopes(){const{options:e,type:n}=this;return[e,Xl[n]||{},gn.datasets[n]||{},{type:n},gn,mx]}resolveNamedOptions(e,n,r,s=[""]){const o={$shared:!0},{resolver:a,subPrefixes:l}=HF(this._resolverCache,e,s);let c=a;if(Yge(a,n)){o.$shared=!1,r=za(r)?r():r;const d=this.createResolver(e,r,l);c=Jd(a,r,d)}for(const d of n)o[d]=c[d];return o}createResolver(e,n,r=[""],s){const{resolver:o}=HF(this._resolverCache,e,r);return gt(n)?Jd(o,n,void 0,s):o}}function HF(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const s=n.join();let o=r.get(s);return o||(o={resolver:AA(e,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},r.set(s,o)),o}const Uge=t=>gt(t)&&Object.getOwnPropertyNames(t).some(e=>za(t[e]));function Yge(t,e){const{isScriptable:n,isIndexable:r}=u4(t);for(const s of e){const o=n(s),a=r(s),l=(a||o)&&t[s];if(o&&(za(l)||Uge(l))||a&&rn(l))return!0}return!1}var Hge="4.4.3";const Gge=["top","bottom","left","right","chartArea"];function GF(t,e){return t==="top"||t==="bottom"||Gge.indexOf(t)===-1&&e==="x"}function WF(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function VF(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),zt(n&&n.onComplete,[t],e)}function Wge(t){const e=t.chart,n=e.options.animation;zt(n&&n.onProgress,[t],e)}function k4(t){return PA()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Ig={},KF=t=>{const e=k4(t);return Object.values(Ig).filter(n=>n.canvas===e).pop()};function Vge(t,e,n){const r=Object.keys(t);for(const s of r){const o=+s;if(o>=e){const a=t[s];delete t[s],(n>0||o>e)&&(t[o+n]=a)}}}function Kge(t,e,n,r){return!n||t.type==="mouseout"?null:r?e:t}function Km(t,e,n){return t.options.clip?t[n]:e[n]}function Zge(t,e){const{xScale:n,yScale:r}=t;return n&&r?{left:Km(n,e,"left"),right:Km(n,e,"right"),top:Km(r,e,"top"),bottom:Km(r,e,"bottom")}:e}class Jo{static register(...e){fo.add(...e),ZF()}static unregister(...e){fo.remove(...e),ZF()}constructor(e,n){const r=this.config=new Bge(n),s=k4(e),o=KF(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||hge(s)),this.platform.updateConfig(r);const l=this.platform.acquireContext(s,a.aspectRatio),c=l&&l.canvas,d=c&&c.height,u=c&&c.width;if(this.id=Xhe(),this.ctx=l,this.canvas=c,this.width=u,this.height=d,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Fge,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=ppe(f=>this.update(f),a.resizeDelay||0),this._dataChanges=[],Ig[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}Uo.listen(this,"complete",VF),Uo.listen(this,"progress",Wge),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:r,height:s,_aspectRatio:o}=this;return pt(e)?n&&o?o:s?r/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return fo}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():yF(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return pF(this.canvas,this.ctx),this}stop(){return Uo.stop(this),this}resize(e,n){Uo.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const r=this.options,s=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(s,e,n,o),l=r.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,yF(this,l,!0)&&(this.notifyPlugins("resize",{size:a}),zt(r.onResize,[this,a],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Dt(n,(r,s)=>{r.id=s})}buildOrUpdateScales(){const e=this.options,n=e.scales,r=this.scales,s=Object.keys(r).reduce((a,l)=>(a[l]=!1,a),{});let o=[];n&&(o=o.concat(Object.keys(n).map(a=>{const l=n[a],c=vx(a,l),d=c==="r",u=c==="x";return{options:l,dposition:d?"chartArea":u?"bottom":"left",dtype:d?"radialLinear":u?"category":"linear"}}))),Dt(o,a=>{const l=a.options,c=l.id,d=vx(c,l),u=st(l.type,a.dtype);(l.position===void 0||GF(l.position,d)!==GF(a.dposition))&&(l.position=a.dposition),s[c]=!0;let f=null;if(c in r&&r[c].type===u)f=r[c];else{const g=fo.getScale(u);f=new g({id:c,type:u,ctx:this.ctx,chart:this}),r[f.id]=f}f.init(l,e)}),Dt(s,(a,l)=>{a||delete r[l]}),Dt(r,a=>{fr.configure(this,a,a.options),fr.addBox(this,a)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,r=e.length;if(e.sort((s,o)=>s.index-o.index),r>n){for(let s=n;s<r;++s)this._destroyDatasetMeta(s);e.splice(n,r-n)}this._sortedMetasets=e.slice(0).sort(WF("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((r,s)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let r,s;for(this._removeUnreferencedMetasets(),r=0,s=n.length;r<s;r++){const o=n[r];let a=this.getDatasetMeta(r);const l=o.type||this.config.type;if(a.type&&a.type!==l&&(this._destroyDatasetMeta(r),a=this.getDatasetMeta(r)),a.type=l,a.indexAxis=o.indexAxis||bx(l,this.options),a.order=o.order||0,a.index=r,a.label=""+o.label,a.visible=this.isDatasetVisible(r),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{const c=fo.getController(l),{datasetElementType:d,dataElementType:u}=gn.datasets[l];Object.assign(c,{dataElementType:fo.getElement(u),datasetElementType:d&&fo.getElement(d)}),a.controller=new c(this,r),e.push(a.controller)}}return this._updateMetasets(),e}_resetElements(){Dt(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let d=0,u=this.data.datasets.length;d<u;d++){const{controller:f}=this.getDatasetMeta(d),g=!s&&o.indexOf(f)===-1;f.buildOrUpdateElements(g),a=Math.max(+f.getMaxOverflow(),a)}a=this._minPadding=r.layout.autoPadding?a:0,this._updateLayout(a),s||Dt(o,d=>{d.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(WF("z","_idx"));const{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){Dt(this.scales,e=>{fr.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(e.events);(!oF(n,r)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:s,count:o}of n){const a=r==="_removeElements"?-o:o;Vge(e,s,a)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(e.filter(a=>a[0]===o).map((a,l)=>l+","+a.splice(1).join(","))),s=r(0);for(let o=1;o<n;o++)if(!oF(s,r(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;fr.update(this,this.width,this.height,e);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Dt(this.boxes,s=>{r&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,za(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const r=this.getDatasetMeta(e),s={meta:r,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(r.controller._update(n),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Uo.has(this)?this.attached&&!Uo.running(this)&&Uo.start(this):(this.draw(),VF({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:r,height:s}=this._resizeBeforeDraw;this._resize(r,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,r=[];let s,o;for(s=0,o=n.length;s<o;++s){const a=n[s];(!e||a.visible)&&r.push(a)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,r=e._clip,s=!r.disabled,o=Zge(e,this.chartArea),a={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(s&&Fv(n,{left:r.left===!1?0:o.left-r.left,right:r.right===!1?this.width:o.right+r.right,top:r.top===!1?0:o.top-r.top,bottom:r.bottom===!1?this.height:o.bottom+r.bottom}),e.controller.draw(),s&&Dv(n),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(e){return ui(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,r,s){const o=Gme.modes[n];return typeof o=="function"?o(this,e,r,s):[]}getDatasetMeta(e){const n=this.data.datasets[e],r=this._metasets;let s=r.filter(o=>o&&o._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},r.push(s)),s}getContext(){return this.$context||(this.$context=Ja(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const r=this.getDatasetMeta(e);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(e,n){const r=this.getDatasetMeta(e);r.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,r){const s=r?"show":"hide",o=this.getDatasetMeta(e),a=o.controller._resolveAnimations(void 0,s);Gh(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),a.update(o,{visible:r}),this.update(l=>l.datasetIndex===e?s:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Uo.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),pF(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Ig[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,r=(o,a)=>{n.addEventListener(this,o,a),e[o]=a},s=(o,a,l)=>{o.offsetX=a,o.offsetY=l,this._eventHandler(o)};Dt(this.options.events,o=>r(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,r=(c,d)=>{n.addEventListener(this,c,d),e[c]=d},s=(c,d)=>{e[c]&&(n.removeEventListener(this,c,d),delete e[c])},o=(c,d)=>{this.canvas&&this.resize(c,d)};let a;const l=()=>{s("attach",l),this.attached=!0,this.resize(),r("resize",o),r("detach",a)};a=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),r("attach",l)},n.isAttached(this.canvas)?l():a()}unbindEvents(){Dt(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Dt(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,r){const s=r?"set":"remove";let o,a,l,c;for(n==="dataset"&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),l=0,c=e.length;l<c;++l){a=e[l];const d=a&&this.getDatasetMeta(a.datasetIndex).controller;d&&d[s+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],r=e.map(({datasetIndex:o,index:a})=>{const l=this.getDatasetMeta(o);if(!l)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:l.data[a],index:a}});!Xy(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(e,n,r){return this._plugins.notify(this,e,n,r)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,r){const s=this.options.hover,o=(c,d)=>c.filter(u=>!d.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),a=o(n,e),l=r?e:o(e,n);a.length&&this.updateHoverStyle(a,s.mode,!1),l.length&&s.mode&&this.updateHoverStyle(l,s.mode,!0)}_eventHandler(e,n){const r={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},s=a=>(a.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",r,s)===!1)return;const o=this._handleEvent(e,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,s),(o||r.changed)&&this.render(),this}_handleEvent(e,n,r){const{_active:s=[],options:o}=this,a=n,l=this._getActiveElements(e,s,r,a),c=spe(e),d=Kge(e,this._lastEvent,r,c);r&&(this._lastEvent=null,zt(o.onHover,[e,l,this],this),c&&zt(o.onClick,[e,l,this],this));const u=!Xy(l,s);return(u||n)&&(this._active=l,this._updateHoverStyles(l,s,n)),this._lastEvent=d,u}_getActiveElements(e,n,r,s){if(e.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,s)}}Ne(Jo,"defaults",gn),Ne(Jo,"instances",Ig),Ne(Jo,"overrides",Xl),Ne(Jo,"registry",fo),Ne(Jo,"version",Hge),Ne(Jo,"getChart",KF);function ZF(){return Dt(Jo.instances,t=>t._plugins.invalidate())}function Jge(t,e,n){const{startAngle:r,pixelMargin:s,x:o,y:a,outerRadius:l,innerRadius:c}=e;let d=s/l;t.beginPath(),t.arc(o,a,l,r-d,n+d),c>s?(d=s/c,t.arc(o,a,c,n+d,r-d,!0)):t.arc(o,a,s,n+Pn,r-Pn),t.closePath(),t.clip()}function Xge(t){return SA(t,["outerStart","outerEnd","innerStart","innerEnd"])}function Qge(t,e,n,r){const s=Xge(t.options.borderRadius),o=(n-e)/2,a=Math.min(o,r*e/2),l=c=>{const d=(n-Math.min(o,c))*r/2;return Kn(c,0,Math.min(o,d))};return{outerStart:l(s.outerStart),outerEnd:l(s.outerEnd),innerStart:Kn(s.innerStart,0,a),innerEnd:Kn(s.innerEnd,0,a)}}function kc(t,e,n,r){return{x:n+t*Math.cos(e),y:r+t*Math.sin(e)}}function sb(t,e,n,r,s,o){const{x:a,y:l,startAngle:c,pixelMargin:d,innerRadius:u}=e,f=Math.max(e.outerRadius+r+n-d,0),g=u>0?u+r+n+d:0;let E=0;const S=s-c;if(r){const q=u>0?u-r:0,W=f>0?f-r:0,G=(q+W)/2,H=G!==0?S*G/(G+r):S;E=(S-H)/2}const w=Math.max(.001,S*f-n/an)/f,_=(S-w)/2,h=c+_+E,m=s-_-E,{outerStart:A,outerEnd:k,innerStart:R,innerEnd:O}=Qge(e,g,f,m-h),N=f-A,y=f-k,v=h+A/N,b=m-k/y,P=g+R,F=g+O,I=h+R/P,T=m-O/F;if(t.beginPath(),o){const q=(v+b)/2;if(t.arc(a,l,f,v,q),t.arc(a,l,f,q,b),k>0){const j=kc(y,b,a,l);t.arc(j.x,j.y,k,b,m+Pn)}const W=kc(F,m,a,l);if(t.lineTo(W.x,W.y),O>0){const j=kc(F,T,a,l);t.arc(j.x,j.y,O,m+Pn,T+Math.PI)}const G=(m-O/g+(h+R/g))/2;if(t.arc(a,l,g,m-O/g,G,!0),t.arc(a,l,g,G,h+R/g,!0),R>0){const j=kc(P,I,a,l);t.arc(j.x,j.y,R,I+Math.PI,h-Pn)}const H=kc(N,h,a,l);if(t.lineTo(H.x,H.y),A>0){const j=kc(N,v,a,l);t.arc(j.x,j.y,A,h-Pn,v)}}else{t.moveTo(a,l);const q=Math.cos(v)*f+a,W=Math.sin(v)*f+l;t.lineTo(q,W);const G=Math.cos(b)*f+a,H=Math.sin(b)*f+l;t.lineTo(G,H)}t.closePath()}function eye(t,e,n,r,s){const{fullCircles:o,startAngle:a,circumference:l}=e;let c=e.endAngle;if(o){sb(t,e,n,r,c,s);for(let d=0;d<o;++d)t.fill();isNaN(l)||(c=a+(l%on||on))}return sb(t,e,n,r,c,s),t.fill(),c}function tye(t,e,n,r,s){const{fullCircles:o,startAngle:a,circumference:l,options:c}=e,{borderWidth:d,borderJoinStyle:u,borderDash:f,borderDashOffset:g}=c,E=c.borderAlign==="inner";if(!d)return;t.setLineDash(f||[]),t.lineDashOffset=g,E?(t.lineWidth=d*2,t.lineJoin=u||"round"):(t.lineWidth=d,t.lineJoin=u||"bevel");let S=e.endAngle;if(o){sb(t,e,n,r,S,s);for(let w=0;w<o;++w)t.stroke();isNaN(l)||(S=a+(l%on||on))}E&&Jge(t,e,S),o||(sb(t,e,n,r,S,s),t.stroke())}class id extends qi{constructor(n){super();Ne(this,"circumference");Ne(this,"endAngle");Ne(this,"fullCircles");Ne(this,"innerRadius");Ne(this,"outerRadius");Ne(this,"pixelMargin");Ne(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,r,s){const o=this.getProps(["x","y"],s),{angle:a,distance:l}=t4(o,{x:n,y:r}),{startAngle:c,endAngle:d,innerRadius:u,outerRadius:f,circumference:g}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),E=(this.options.spacing+this.options.borderWidth)/2,w=st(g,d-c)>=on||Wh(a,c,d),_=ci(l,u+E,f+E);return w&&_}getCenterPoint(n){const{x:r,y:s,startAngle:o,endAngle:a,innerRadius:l,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:d,spacing:u}=this.options,f=(o+a)/2,g=(l+c+u+d)/2;return{x:r+Math.cos(f)*g,y:s+Math.sin(f)*g}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:s}=this,o=(r.offset||0)/4,a=(r.spacing||0)/2,l=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=s>on?Math.floor(s/on):0,s===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const c=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(c)*o,Math.sin(c)*o);const d=1-Math.sin(Math.min(an,s||0)),u=o*d;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,eye(n,this,u,a,l),tye(n,this,u,a,l),n.restore()}}Ne(id,"id","arc"),Ne(id,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),Ne(id,"defaultRoutes",{backgroundColor:"backgroundColor"}),Ne(id,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function T4(t,e,n=e){t.lineCap=st(n.borderCapStyle,e.borderCapStyle),t.setLineDash(st(n.borderDash,e.borderDash)),t.lineDashOffset=st(n.borderDashOffset,e.borderDashOffset),t.lineJoin=st(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=st(n.borderWidth,e.borderWidth),t.strokeStyle=st(n.borderColor,e.borderColor)}function nye(t,e,n){t.lineTo(n.x,n.y)}function rye(t){return t.stepped?Ape:t.tension||t.cubicInterpolationMode==="monotone"?Npe:nye}function I4(t,e,n={}){const r=t.length,{start:s=0,end:o=r-1}=n,{start:a,end:l}=e,c=Math.max(s,a),d=Math.min(o,l),u=s<a&&o<a||s>l&&o>l;return{count:r,start:c,loop:e.loop,ilen:d<c&&!u?r+d-c:d-c}}function sye(t,e,n,r){const{points:s,options:o}=e,{count:a,start:l,loop:c,ilen:d}=I4(s,n,r),u=rye(o);let{move:f=!0,reverse:g}=r||{},E,S,w;for(E=0;E<=d;++E)S=s[(l+(g?d-E:E))%a],!S.skip&&(f?(t.moveTo(S.x,S.y),f=!1):u(t,w,S,g,o.stepped),w=S);return c&&(S=s[(l+(g?d:0))%a],u(t,w,S,g,o.stepped)),!!c}function oye(t,e,n,r){const s=e.points,{count:o,start:a,ilen:l}=I4(s,n,r),{move:c=!0,reverse:d}=r||{};let u=0,f=0,g,E,S,w,_,h;const m=k=>(a+(d?l-k:k))%o,A=()=>{w!==_&&(t.lineTo(u,_),t.lineTo(u,w),t.lineTo(u,h))};for(c&&(E=s[m(0)],t.moveTo(E.x,E.y)),g=0;g<=l;++g){if(E=s[m(g)],E.skip)continue;const k=E.x,R=E.y,O=k|0;O===S?(R<w?w=R:R>_&&(_=R),u=(f*u+k)/++f):(A(),t.lineTo(k,R),S=O,f=0,w=_=R),h=R}A()}function _x(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?oye:sye}function iye(t){return t.stepped?ome:t.tension||t.cubicInterpolationMode==="monotone"?ime:ml}function aye(t,e,n,r){let s=e._path;s||(s=e._path=new Path2D,e.path(s,n,r)&&s.closePath()),T4(t,e.options),t.stroke(s)}function lye(t,e,n,r){const{segments:s,options:o}=e,a=_x(e);for(const l of s)T4(t,o,l.style),t.beginPath(),a(t,e,l,{start:n,end:n+r-1})&&t.closePath(),t.stroke()}const cye=typeof Path2D=="function";function dye(t,e,n,r){cye&&!e.options.segment?aye(t,e,n,r):lye(t,e,n,r)}class fi extends qi{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const s=r.spanGaps?this._loop:this._fullLoop;Jpe(this._points,r,e,s,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=fme(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,r=e.length;return r&&n[e[r-1].end]}interpolate(e,n){const r=this.options,s=e[n],o=this.points,a=w4(this,{property:n,start:s,end:s});if(!a.length)return;const l=[],c=iye(r);let d,u;for(d=0,u=a.length;d<u;++d){const{start:f,end:g}=a[d],E=o[f],S=o[g];if(E===S){l.push(E);continue}const w=Math.abs((s-E[n])/(S[n]-E[n])),_=c(E,S,w,r.stepped);_[n]=e[n],l.push(_)}return l.length===1?l[0]:l}pathSegment(e,n,r){return _x(this)(e,this,n,r)}path(e,n,r){const s=this.segments,o=_x(this);let a=this._loop;n=n||0,r=r||this.points.length-n;for(const l of s)a&=o(e,this,l,{start:n,end:n+r-1});return!!a}draw(e,n,r,s){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(e.save(),dye(e,this,r,s),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Ne(fi,"id","line"),Ne(fi,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),Ne(fi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),Ne(fi,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function JF(t,e,n,r){const s=t.options,{[n]:o}=t.getProps([n],r);return Math.abs(e-o)<s.radius+s.hitRadius}class Sd extends qi{constructor(n){super();Ne(this,"parsed");Ne(this,"skip");Ne(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,s){const o=this.options,{x:a,y:l}=this.getProps(["x","y"],s);return Math.pow(n-a,2)+Math.pow(r-l,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(n,r){return JF(this,n,"x",r)}inYRange(n,r){return JF(this,n,"y",r)}getCenterPoint(n){const{x:r,y:s}=this.getProps(["x","y"],n);return{x:r,y:s}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const s=r&&n.borderWidth||0;return(r+s)*2}draw(n,r){const s=this.options;this.skip||s.radius<.1||!ui(this,r,this.size(s)/2)||(n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.fillStyle=s.backgroundColor,gx(n,s,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}Ne(Sd,"id","point"),Ne(Sd,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),Ne(Sd,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function M4(t,e){const{x:n,y:r,base:s,width:o,height:a}=t.getProps(["x","y","base","width","height"],e);let l,c,d,u,f;return t.horizontal?(f=a/2,l=Math.min(n,s),c=Math.max(n,s),d=r-f,u=r+f):(f=o/2,l=n-f,c=n+f,d=Math.min(r,s),u=Math.max(r,s)),{left:l,top:d,right:c,bottom:u}}function da(t,e,n,r){return t?0:Kn(e,n,r)}function uye(t,e,n){const r=t.options.borderWidth,s=t.borderSkipped,o=d4(r);return{t:da(s.top,o.top,0,n),r:da(s.right,o.right,0,e),b:da(s.bottom,o.bottom,0,n),l:da(s.left,o.left,0,e)}}function fye(t,e,n){const{enableBorderRadius:r}=t.getProps(["enableBorderRadius"]),s=t.options.borderRadius,o=Il(s),a=Math.min(e,n),l=t.borderSkipped,c=r||gt(s);return{topLeft:da(!c||l.top||l.left,o.topLeft,0,a),topRight:da(!c||l.top||l.right,o.topRight,0,a),bottomLeft:da(!c||l.bottom||l.left,o.bottomLeft,0,a),bottomRight:da(!c||l.bottom||l.right,o.bottomRight,0,a)}}function hye(t){const e=M4(t),n=e.right-e.left,r=e.bottom-e.top,s=uye(t,n/2,r/2),o=fye(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r,radius:o},inner:{x:e.left+s.l,y:e.top+s.t,w:n-s.l-s.r,h:r-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function Z_(t,e,n,r){const s=e===null,o=n===null,l=t&&!(s&&o)&&M4(t,r);return l&&(s||ci(e,l.left,l.right))&&(o||ci(n,l.top,l.bottom))}function pye(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function mye(t,e){t.rect(e.x,e.y,e.w,e.h)}function J_(t,e,n={}){const r=t.x!==n.x?-e:0,s=t.y!==n.y?-e:0,o=(t.x+t.w!==n.x+n.w?e:0)-r,a=(t.y+t.h!==n.y+n.h?e:0)-s;return{x:t.x+r,y:t.y+s,w:t.w+o,h:t.h+a,radius:t.radius}}class Kf extends qi{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:r,backgroundColor:s}}=this,{inner:o,outer:a}=hye(this),l=pye(a.radius)?Vh:mye;e.save(),(a.w!==o.w||a.h!==o.h)&&(e.beginPath(),l(e,J_(a,n,o)),e.clip(),l(e,J_(o,-n,a)),e.fillStyle=r,e.fill("evenodd")),e.beginPath(),l(e,J_(o,n)),e.fillStyle=s,e.fill(),e.restore()}inRange(e,n,r){return Z_(this,e,n,r)}inXRange(e,n){return Z_(this,e,null,n)}inYRange(e,n){return Z_(this,null,e,n)}getCenterPoint(e){const{x:n,y:r,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],e);return{x:o?(n+s)/2:n,y:o?r:(r+s)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}Ne(Kf,"id","bar"),Ne(Kf,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),Ne(Kf,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var gye=Object.freeze({__proto__:null,ArcElement:id,BarElement:Kf,LineElement:fi,PointElement:Sd});const wx=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],XF=wx.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function L4(t){return wx[t%wx.length]}function z4(t){return XF[t%XF.length]}function yye(t,e){return t.borderColor=L4(e),t.backgroundColor=z4(e),++e}function bye(t,e){return t.backgroundColor=t.data.map(()=>L4(e++)),e}function vye(t,e){return t.backgroundColor=t.data.map(()=>z4(e++)),e}function _ye(t){let e=0;return(n,r)=>{const s=t.getDatasetMeta(r).controller;s instanceof Al?e=bye(n,e):s instanceof Vf?e=vye(n,e):s&&(e=yye(n,e))}}function QF(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function wye(t){return t&&(t.borderColor||t.backgroundColor)}var xye={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:r},options:s}=t.config,{elements:o}=s;if(!n.forceOverride&&(QF(r)||wye(s)||o&&QF(o)))return;const a=_ye(t);r.forEach(a)}};function Cye(t,e,n,r,s){const o=s.samples||r;if(o>=n)return t.slice(e,e+n);const a=[],l=(n-2)/(o-2);let c=0;const d=e+n-1;let u=e,f,g,E,S,w;for(a[c++]=t[u],f=0;f<o-2;f++){let _=0,h=0,m;const A=Math.floor((f+1)*l)+1+e,k=Math.min(Math.floor((f+2)*l)+1,n)+e,R=k-A;for(m=A;m<k;m++)_+=t[m].x,h+=t[m].y;_/=R,h/=R;const O=Math.floor(f*l)+1+e,N=Math.min(Math.floor((f+1)*l)+1,n)+e,{x:y,y:v}=t[u];for(E=S=-1,m=O;m<N;m++)S=.5*Math.abs((y-_)*(t[m].y-v)-(y-t[m].x)*(h-v)),S>E&&(E=S,g=t[m],w=m);a[c++]=g,u=w}return a[c++]=t[d],a}function Eye(t,e,n,r){let s=0,o=0,a,l,c,d,u,f,g,E,S,w;const _=[],h=e+n-1,m=t[e].x,k=t[h].x-m;for(a=e;a<e+n;++a){l=t[a],c=(l.x-m)/k*r,d=l.y;const R=c|0;if(R===u)d<S?(S=d,f=a):d>w&&(w=d,g=a),s=(o*s+l.x)/++o;else{const O=a-1;if(!pt(f)&&!pt(g)){const N=Math.min(f,g),y=Math.max(f,g);N!==E&&N!==O&&_.push({...t[N],x:s}),y!==E&&y!==O&&_.push({...t[y],x:s})}a>0&&O!==E&&_.push(t[O]),_.push(l),u=R,o=0,S=w=d,f=g=E=a}}return _}function q4(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function eD(t){t.data.datasets.forEach(e=>{q4(e)})}function Sye(t,e){const n=e.length;let r=0,s;const{iScale:o}=t,{min:a,max:l,minDefined:c,maxDefined:d}=o.getUserBounds();return c&&(r=Kn(di(e,o.axis,a).lo,0,n-1)),d?s=Kn(di(e,o.axis,l).hi+1,r,n)-r:s=n-r,{start:r,count:s}}var Aye={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){eD(t);return}const r=t.width;t.data.datasets.forEach((s,o)=>{const{_data:a,indexAxis:l}=s,c=t.getDatasetMeta(o),d=a||s.data;if(en([l,t.options.indexAxis])==="y"||!c.controller.supportsDecimation)return;const u=t.scales[c.xAxisID];if(u.type!=="linear"&&u.type!=="time"||t.options.parsing)return;let{start:f,count:g}=Sye(c,d);const E=n.threshold||4*r;if(g<=E){q4(s);return}pt(a)&&(s._data=d,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(w){this._data=w}}));let S;switch(n.algorithm){case"lttb":S=Cye(d,f,g,r,n);break;case"min-max":S=Eye(d,f,g,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}s._decimated=S})},destroy(t){eD(t)}};function Nye(t,e,n){const r=t.segments,s=t.points,o=e.points,a=[];for(const l of r){let{start:c,end:d}=l;d=DA(c,d,s);const u=xx(n,s[c],s[d],l.loop);if(!e.segments){a.push({source:l,target:u,start:s[c],end:s[d]});continue}const f=w4(e,u);for(const g of f){const E=xx(n,o[g.start],o[g.end],g.loop),S=_4(l,s,E);for(const w of S)a.push({source:w,target:g,start:{[n]:tD(u,E,"start",Math.max)},end:{[n]:tD(u,E,"end",Math.min)}})}}return a}function xx(t,e,n,r){if(r)return;let s=e[t],o=n[t];return t==="angle"&&(s=Jr(s),o=Jr(o)),{property:t,start:s,end:o}}function Rye(t,e){const{x:n=null,y:r=null}=t||{},s=e.points,o=[];return e.segments.forEach(({start:a,end:l})=>{l=DA(a,l,s);const c=s[a],d=s[l];r!==null?(o.push({x:c.x,y:r}),o.push({x:d.x,y:r})):n!==null&&(o.push({x:n,y:c.y}),o.push({x:n,y:d.y}))}),o}function DA(t,e,n){for(;e>t;e--){const r=n[e];if(!isNaN(r.x)&&!isNaN(r.y))break}return e}function tD(t,e,n,r){return t&&e?r(t[n],e[n]):t?t[n]:e?e[n]:0}function j4(t,e){let n=[],r=!1;return rn(t)?(r=!0,n=t):n=Rye(t,e),n.length?new fi({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function nD(t){return t&&t.fill!==!1}function Pye(t,e,n){let s=t[e].fill;const o=[e];let a;if(!n)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!En(s))return s;if(a=t[s],!a)return!1;if(a.visible)return s;o.push(s),s=a.fill}return!1}function Oye(t,e,n){const r=Tye(t);if(gt(r))return isNaN(r.value)?!1:r;let s=parseFloat(r);return En(s)&&Math.floor(s)===s?Fye(r[0],e,s,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function Fye(t,e,n,r){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=r?!1:n}function Dye(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:gt(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function kye(t,e,n){let r;return t==="start"?r=n:t==="end"?r=e.options.reverse?e.min:e.max:gt(t)?r=t.value:r=e.getBaseValue(),r}function Tye(t){const e=t.options,n=e.fill;let r=st(n&&n.target,n);return r===void 0&&(r=!!e.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function Iye(t){const{scale:e,index:n,line:r}=t,s=[],o=r.segments,a=r.points,l=Mye(e,n);l.push(j4({x:null,y:e.bottom},r));for(let c=0;c<o.length;c++){const d=o[c];for(let u=d.start;u<=d.end;u++)Lye(s,a[u],l)}return new fi({points:s,options:{}})}function Mye(t,e){const n=[],r=t.getMatchingVisibleMetas("line");for(let s=0;s<r.length;s++){const o=r[s];if(o.index===e)break;o.hidden||n.unshift(o.dataset)}return n}function Lye(t,e,n){const r=[];for(let s=0;s<n.length;s++){const o=n[s],{first:a,last:l,point:c}=zye(o,e,"x");if(!(!c||a&&l)){if(a)r.unshift(c);else if(t.push(c),!l)break}}t.push(...r)}function zye(t,e,n){const r=t.interpolate(e,n);if(!r)return{};const s=r[n],o=t.segments,a=t.points;let l=!1,c=!1;for(let d=0;d<o.length;d++){const u=o[d],f=a[u.start][n],g=a[u.end][n];if(ci(s,f,g)){l=s===f,c=s===g;break}}return{first:l,last:c,point:r}}class $4{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,r){const{x:s,y:o,radius:a}=this;return n=n||{start:0,end:on},e.arc(s,o,a,n.end,n.start,!0),!r.bounds}interpolate(e){const{x:n,y:r,radius:s}=this,o=e.angle;return{x:n+Math.cos(o)*s,y:r+Math.sin(o)*s,angle:o}}}function qye(t){const{chart:e,fill:n,line:r}=t;if(En(n))return jye(e,n);if(n==="stack")return Iye(t);if(n==="shape")return!0;const s=$ye(t);return s instanceof $4?s:j4(s,r)}function jye(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function $ye(t){return(t.scale||{}).getPointPositionForValue?Uye(t):Bye(t)}function Bye(t){const{scale:e={},fill:n}=t,r=Dye(n,e);if(En(r)){const s=e.isHorizontal();return{x:s?r:null,y:s?null:r}}return null}function Uye(t){const{scale:e,fill:n}=t,r=e.options,s=e.getLabels().length,o=r.reverse?e.max:e.min,a=kye(n,e,o),l=[];if(r.grid.circular){const c=e.getPointPositionForValue(0,o);return new $4({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(a)})}for(let c=0;c<s;++c)l.push(e.getPointPositionForValue(c,a));return l}function X_(t,e,n){const r=qye(e),{line:s,scale:o,axis:a}=e,l=s.options,c=l.fill,d=l.backgroundColor,{above:u=d,below:f=d}=c||{};r&&s.points.length&&(Fv(t,n),Yye(t,{line:s,target:r,above:u,below:f,area:n,scale:o,axis:a}),Dv(t))}function Yye(t,e){const{line:n,target:r,above:s,below:o,area:a,scale:l}=e,c=n._loop?"angle":e.axis;t.save(),c==="x"&&o!==s&&(rD(t,r,a.top),sD(t,{line:n,target:r,color:s,scale:l,property:c}),t.restore(),t.save(),rD(t,r,a.bottom)),sD(t,{line:n,target:r,color:o,scale:l,property:c}),t.restore()}function rD(t,e,n){const{segments:r,points:s}=e;let o=!0,a=!1;t.beginPath();for(const l of r){const{start:c,end:d}=l,u=s[c],f=s[DA(c,d,s)];o?(t.moveTo(u.x,u.y),o=!1):(t.lineTo(u.x,n),t.lineTo(u.x,u.y)),a=!!e.pathSegment(t,l,{move:a}),a?t.closePath():t.lineTo(f.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function sD(t,e){const{line:n,target:r,property:s,color:o,scale:a}=e,l=Nye(n,r,s);for(const{source:c,target:d,start:u,end:f}of l){const{style:{backgroundColor:g=o}={}}=c,E=r!==!0;t.save(),t.fillStyle=g,Hye(t,a,E&&xx(s,u,f)),t.beginPath();const S=!!n.pathSegment(t,c);let w;if(E){S?t.closePath():oD(t,r,f,s);const _=!!r.pathSegment(t,d,{move:S,reverse:!0});w=S&&_,w||oD(t,r,u,s)}t.closePath(),t.fill(w?"evenodd":"nonzero"),t.restore()}}function Hye(t,e,n){const{top:r,bottom:s}=e.chart.chartArea,{property:o,start:a,end:l}=n||{};o==="x"&&(t.beginPath(),t.rect(a,r,l-a,s-r),t.clip())}function oD(t,e,n,r){const s=e.interpolate(n,r);s&&t.lineTo(s.x,s.y)}var Gye={id:"filler",afterDatasetsUpdate(t,e,n){const r=(t.data.datasets||[]).length,s=[];let o,a,l,c;for(a=0;a<r;++a)o=t.getDatasetMeta(a),l=o.dataset,c=null,l&&l.options&&l instanceof fi&&(c={visible:t.isDatasetVisible(a),index:a,fill:Oye(l,a,r),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:l}),o.$filler=c,s.push(c);for(a=0;a<r;++a)c=s[a],!(!c||c.fill===!1)&&(c.fill=Pye(s,a,n.propagate))},beforeDraw(t,e,n){const r=n.drawTime==="beforeDraw",s=t.getSortedVisibleDatasetMetas(),o=t.chartArea;for(let a=s.length-1;a>=0;--a){const l=s[a].$filler;l&&(l.line.updateControlPoints(o,l.axis),r&&l.fill&&X_(t.ctx,l,o))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=t.getSortedVisibleDatasetMetas();for(let s=r.length-1;s>=0;--s){const o=r[s].$filler;nD(o)&&X_(t.ctx,o,t.chartArea)}},beforeDatasetDraw(t,e,n){const r=e.meta.$filler;!nD(r)||n.drawTime!=="beforeDatasetDraw"||X_(t.ctx,r,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const iD=(t,e)=>{let{boxHeight:n=e,boxWidth:r=e}=t;return t.usePointStyle&&(n=Math.min(n,e),r=t.pointStyleWidth||Math.min(r,e)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(e,n)}},Wye=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class aD extends qi{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,r){this.maxWidth=e,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=zt(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(r=>e.filter(r,this.chart.data))),e.sort&&(n=n.sort((r,s)=>e.sort(r,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const r=e.labels,s=kn(r.font),o=s.size,a=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=iD(r,o);let d,u;n.font=s.string,this.isHorizontal()?(d=this.maxWidth,u=this._fitRows(a,o,l,c)+10):(u=this.maxHeight,d=this._fitCols(a,s,l,c)+10),this.width=Math.min(d,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,r,s){const{ctx:o,maxWidth:a,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.lineWidths=[0],u=s+l;let f=e;o.textAlign="left",o.textBaseline="middle";let g=-1,E=-u;return this.legendItems.forEach((S,w)=>{const _=r+n/2+o.measureText(S.text).width;(w===0||d[d.length-1]+_+2*l>a)&&(f+=u,d[d.length-(w>0?0:1)]=0,E+=u,g++),c[w]={left:0,top:E,row:g,width:_,height:s},d[d.length-1]+=_+l}),f}_fitCols(e,n,r,s){const{ctx:o,maxHeight:a,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.columnSizes=[],u=a-e;let f=l,g=0,E=0,S=0,w=0;return this.legendItems.forEach((_,h)=>{const{itemWidth:m,itemHeight:A}=Vye(r,n,o,_,s);h>0&&E+A+2*l>u&&(f+=g+l,d.push({width:g,height:E}),S+=g+l,w++,g=E=0),c[h]={left:S,top:E,col:w,width:m,height:A},g=Math.max(g,m),E+=A+l}),f+=g,d.push({width:g,height:E}),f}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:s},rtl:o}}=this,a=Ed(o,this.left,this.width);if(this.isHorizontal()){let l=0,c=lr(r,this.left+s,this.right-this.lineWidths[l]);for(const d of n)l!==d.row&&(l=d.row,c=lr(r,this.left+s,this.right-this.lineWidths[l])),d.top+=this.top+e+s,d.left=a.leftForLtr(a.x(c),d.width),c+=d.width+s}else{let l=0,c=lr(r,this.top+e+s,this.bottom-this.columnSizes[l].height);for(const d of n)d.col!==l&&(l=d.col,c=lr(r,this.top+e+s,this.bottom-this.columnSizes[l].height)),d.top=c,d.left+=this.left+s,d.left=a.leftForLtr(a.x(d.left),d.width),c+=d.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Fv(e,this),this._draw(),Dv(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:r,ctx:s}=this,{align:o,labels:a}=e,l=gn.color,c=Ed(e.rtl,this.left,this.width),d=kn(a.font),{padding:u}=a,f=d.size,g=f/2;let E;this.drawTitle(),s.textAlign=c.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=d.string;const{boxWidth:S,boxHeight:w,itemHeight:_}=iD(a,f),h=function(O,N,y){if(isNaN(S)||S<=0||isNaN(w)||w<0)return;s.save();const v=st(y.lineWidth,1);if(s.fillStyle=st(y.fillStyle,l),s.lineCap=st(y.lineCap,"butt"),s.lineDashOffset=st(y.lineDashOffset,0),s.lineJoin=st(y.lineJoin,"miter"),s.lineWidth=v,s.strokeStyle=st(y.strokeStyle,l),s.setLineDash(st(y.lineDash,[])),a.usePointStyle){const b={radius:w*Math.SQRT2/2,pointStyle:y.pointStyle,rotation:y.rotation,borderWidth:v},P=c.xPlus(O,S/2),F=N+g;c4(s,b,P,F,a.pointStyleWidth&&S)}else{const b=N+Math.max((f-w)/2,0),P=c.leftForLtr(O,S),F=Il(y.borderRadius);s.beginPath(),Object.values(F).some(I=>I!==0)?Vh(s,{x:P,y:b,w:S,h:w,radius:F}):s.rect(P,b,S,w),s.fill(),v!==0&&s.stroke()}s.restore()},m=function(O,N,y){Ql(s,y.text,O,N+_/2,d,{strikethrough:y.hidden,textAlign:c.textAlign(y.textAlign)})},A=this.isHorizontal(),k=this._computeTitleHeight();A?E={x:lr(o,this.left+u,this.right-r[0]),y:this.top+u+k,line:0}:E={x:this.left+u,y:lr(o,this.top+k+u,this.bottom-n[0].height),line:0},y4(this.ctx,e.textDirection);const R=_+u;this.legendItems.forEach((O,N)=>{s.strokeStyle=O.fontColor,s.fillStyle=O.fontColor;const y=s.measureText(O.text).width,v=c.textAlign(O.textAlign||(O.textAlign=a.textAlign)),b=S+g+y;let P=E.x,F=E.y;c.setWidth(this.width),A?N>0&&P+b+u>this.right&&(F=E.y+=R,E.line++,P=E.x=lr(o,this.left+u,this.right-r[E.line])):N>0&&F+R>this.bottom&&(P=E.x=P+n[E.line].width+u,E.line++,F=E.y=lr(o,this.top+k+u,this.bottom-n[E.line].height));const I=c.x(P);if(h(I,F,O),P=mpe(v,P+S+g,A?P+b:this.right,e.rtl),m(c.x(P),F,O),A)E.x+=b+u;else if(typeof O.text!="string"){const T=d.lineHeight;E.y+=B4(O,T)+u}else E.y+=R}),b4(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,r=kn(n.font),s=tr(n.padding);if(!n.display)return;const o=Ed(e.rtl,this.left,this.width),a=this.ctx,l=n.position,c=r.size/2,d=s.top+c;let u,f=this.left,g=this.width;if(this.isHorizontal())g=Math.max(...this.lineWidths),u=this.top+d,f=lr(e.align,f,this.right-g);else{const S=this.columnSizes.reduce((w,_)=>Math.max(w,_.height),0);u=d+lr(e.align,this.top,this.bottom-S-e.labels.padding-this._computeTitleHeight())}const E=lr(l,f,f+g);a.textAlign=o.textAlign(CA(l)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,Ql(a,n.text,E,u,r)}_computeTitleHeight(){const e=this.options.title,n=kn(e.font),r=tr(e.padding);return e.display?n.lineHeight+r.height:0}_getLegendItemAt(e,n){let r,s,o;if(ci(e,this.left,this.right)&&ci(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(s=o[r],ci(e,s.left,s.left+s.width)&&ci(n,s.top,s.top+s.height))return this.legendItems[r]}return null}handleEvent(e){const n=this.options;if(!Jye(e.type,n))return;const r=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const s=this._hoveredItem,o=Wye(s,r);s&&!o&&zt(n.onLeave,[e,s,this],this),this._hoveredItem=r,r&&!o&&zt(n.onHover,[e,r,this],this)}else r&&zt(n.onClick,[e,r,this],this)}}function Vye(t,e,n,r,s){const o=Kye(r,t,e,n),a=Zye(s,r,e.lineHeight);return{itemWidth:o,itemHeight:a}}function Kye(t,e,n,r){let s=t.text;return s&&typeof s!="string"&&(s=s.reduce((o,a)=>o.length>a.length?o:a)),e+n.size/2+r.measureText(s).width}function Zye(t,e,n){let r=t;return typeof e.text!="string"&&(r=B4(e,n)),r}function B4(t,e){const n=t.text?t.text.length:0;return e*n}function Jye(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var U4={id:"legend",_element:aD,start(t,e,n){const r=t.legend=new aD({ctx:t.ctx,options:n,chart:t});fr.configure(t,r,n),fr.addBox(t,r)},stop(t){fr.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const r=t.legend;fr.configure(t,r,n),r.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const r=e.datasetIndex,s=n.chart;s.isDatasetVisible(r)?(s.hide(r),e.hidden=!0):(s.show(r),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:s,color:o,useBorderRadius:a,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map(c=>{const d=c.controller.getStyle(n?0:void 0),u=tr(d.borderWidth);return{text:e[c.index].label,fillStyle:d.backgroundColor,fontColor:o,hidden:!c.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:d.borderColor,pointStyle:r||d.pointStyle,rotation:d.rotation,textAlign:s||d.textAlign,borderRadius:a&&(l||d.borderRadius),datasetIndex:c.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class kA extends qi{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const s=rn(r.text)?r.text.length:1;this._padding=tr(r.padding);const o=s*kn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:r,bottom:s,right:o,options:a}=this,l=a.align;let c=0,d,u,f;return this.isHorizontal()?(u=lr(l,r,o),f=n+e,d=o-r):(a.position==="left"?(u=r+e,f=lr(l,s,n),c=an*-.5):(u=o-e,f=lr(l,n,s),c=an*.5),d=s-n),{titleX:u,titleY:f,maxWidth:d,rotation:c}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const r=kn(n.font),o=r.lineHeight/2+this._padding.top,{titleX:a,titleY:l,maxWidth:c,rotation:d}=this._drawArgs(o);Ql(e,n.text,0,0,r,{color:n.color,maxWidth:c,rotation:d,textAlign:CA(n.align),textBaseline:"middle",translation:[a,l]})}}function Xye(t,e){const n=new kA({ctx:t.ctx,options:e,chart:t});fr.configure(t,n,e),fr.addBox(t,n),t.titleBlock=n}var Y4={id:"title",_element:kA,start(t,e,n){Xye(t,n)},stop(t){const e=t.titleBlock;fr.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const r=t.titleBlock;fr.configure(t,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Zm=new WeakMap;var Qye={id:"subtitle",start(t,e,n){const r=new kA({ctx:t.ctx,options:n,chart:t});fr.configure(t,r,n),fr.addBox(t,r),Zm.set(t,r)},stop(t){fr.removeBox(t,Zm.get(t)),Zm.delete(t)},beforeUpdate(t,e,n){const r=Zm.get(t);fr.configure(t,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const yf={average(t){if(!t.length)return!1;let e,n,r=new Set,s=0,o=0;for(e=0,n=t.length;e<n;++e){const l=t[e].element;if(l&&l.hasValue()){const c=l.tooltipPosition();r.add(c.x),s+=c.y,++o}}return{x:[...r].reduce((l,c)=>l+c)/r.size,y:s/o}},nearest(t,e){if(!t.length)return!1;let n=e.x,r=e.y,s=Number.POSITIVE_INFINITY,o,a,l;for(o=0,a=t.length;o<a;++o){const c=t[o].element;if(c&&c.hasValue()){const d=c.getCenterPoint(),u=px(e,d);u<s&&(s=u,l=c)}}if(l){const c=l.tooltipPosition();n=c.x,r=c.y}return{x:n,y:r}}};function co(t,e){return e&&(rn(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Yo(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(` `)>-1?t.split(` `):t}function ebe(t,e){const{element:n,datasetIndex:r,index:s}=e,o=t.getDatasetMeta(r).controller,{label:a,value:l}=o.getLabelAndValue(s);return{chart:t,label:a,parsed:o.getParsed(s),raw:t.data.datasets[r].data[s],formattedValue:l,dataset:o.getDataset(),dataIndex:s,datasetIndex:r,element:n}}function lD(t,e){const n=t.chart.ctx,{body:r,footer:s,title:o}=t,{boxWidth:a,boxHeight:l}=e,c=kn(e.bodyFont),d=kn(e.titleFont),u=kn(e.footerFont),f=o.length,g=s.length,E=r.length,S=tr(e.padding);let w=S.height,_=0,h=r.reduce((k,R)=>k+R.before.length+R.lines.length+R.after.length,0);if(h+=t.beforeBody.length+t.afterBody.length,f&&(w+=f*d.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),h){const k=e.displayColors?Math.max(l,c.lineHeight):c.lineHeight;w+=E*k+(h-E)*c.lineHeight+(h-1)*e.bodySpacing}g&&(w+=e.footerMarginTop+g*u.lineHeight+(g-1)*e.footerSpacing);let m=0;const A=function(k){_=Math.max(_,n.measureText(k).width+m)};return n.save(),n.font=d.string,Dt(t.title,A),n.font=c.string,Dt(t.beforeBody.concat(t.afterBody),A),m=e.displayColors?a+2+e.boxPadding:0,Dt(r,k=>{Dt(k.before,A),Dt(k.lines,A),Dt(k.after,A)}),m=0,n.font=u.string,Dt(t.footer,A),n.restore(),_+=S.width,{width:_,height:w}}function tbe(t,e){const{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function nbe(t,e,n,r){const{x:s,width:o}=r,a=n.caretSize+n.caretPadding;if(t==="left"&&s+o+a>e.width||t==="right"&&s-o-a<0)return!0}function rbe(t,e,n,r){const{x:s,width:o}=n,{width:a,chartArea:{left:l,right:c}}=t;let d="center";return r==="center"?d=s<=(l+c)/2?"left":"right":s<=o/2?d="left":s>=a-o/2&&(d="right"),nbe(d,t,e,n)&&(d="center"),d}function cD(t,e,n){const r=n.yAlign||e.yAlign||tbe(t,n);return{xAlign:n.xAlign||e.xAlign||rbe(t,e,n,r),yAlign:r}}function sbe(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function obe(t,e,n){let{y:r,height:s}=t;return e==="top"?r+=n:e==="bottom"?r-=s+n:r-=s/2,r}function dD(t,e,n,r){const{caretSize:s,caretPadding:o,cornerRadius:a}=t,{xAlign:l,yAlign:c}=n,d=s+o,{topLeft:u,topRight:f,bottomLeft:g,bottomRight:E}=Il(a);let S=sbe(e,l);const w=obe(e,c,d);return c==="center"?l==="left"?S+=d:l==="right"&&(S-=d):l==="left"?S-=Math.max(u,g)+s:l==="right"&&(S+=Math.max(f,E)+s),{x:Kn(S,0,r.width-e.width),y:Kn(w,0,r.height-e.height)}}function Jm(t,e,n){const r=tr(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function uD(t){return co([],Yo(t))}function ibe(t,e,n){return Ja(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function fD(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const H4={beforeTitle:Bo,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:Bo,beforeBody:Bo,beforeLabel:Bo,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return pt(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Bo,afterBody:Bo,beforeFooter:Bo,footer:Bo,afterFooter:Bo};function Fr(t,e,n,r){const s=t[e].call(n,r);return typeof s>"u"?H4[e].call(n,r):s}class Cx extends qi{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,o=new x4(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=ibe(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:r}=n,s=Fr(r,"beforeTitle",this,e),o=Fr(r,"title",this,e),a=Fr(r,"afterTitle",this,e);let l=[];return l=co(l,Yo(s)),l=co(l,Yo(o)),l=co(l,Yo(a)),l}getBeforeBody(e,n){return uD(Fr(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:r}=n,s=[];return Dt(e,o=>{const a={before:[],lines:[],after:[]},l=fD(r,o);co(a.before,Yo(Fr(l,"beforeLabel",this,o))),co(a.lines,Fr(l,"label",this,o)),co(a.after,Yo(Fr(l,"afterLabel",this,o))),s.push(a)}),s}getAfterBody(e,n){return uD(Fr(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:r}=n,s=Fr(r,"beforeFooter",this,e),o=Fr(r,"footer",this,e),a=Fr(r,"afterFooter",this,e);let l=[];return l=co(l,Yo(s)),l=co(l,Yo(o)),l=co(l,Yo(a)),l}_createItems(e){const n=this._active,r=this.chart.data,s=[],o=[],a=[];let l=[],c,d;for(c=0,d=n.length;c<d;++c)l.push(ebe(this.chart,n[c]));return e.filter&&(l=l.filter((u,f,g)=>e.filter(u,f,g,r))),e.itemSort&&(l=l.sort((u,f)=>e.itemSort(u,f,r))),Dt(l,u=>{const f=fD(e.callbacks,u);s.push(Fr(f,"labelColor",this,u)),o.push(Fr(f,"labelPointStyle",this,u)),a.push(Fr(f,"labelTextColor",this,u))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=l,l}update(e,n){const r=this.options.setContext(this.getContext()),s=this._active;let o,a=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const l=yf[r.position].call(this,s,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const c=this._size=lD(this,r),d=Object.assign({},l,c),u=cD(this.chart,r,d),f=dD(r,d,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:f.x,y:f.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,r,s){const o=this.getCaretPosition(e,r,s);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(e,n,r){const{xAlign:s,yAlign:o}=this,{caretSize:a,cornerRadius:l}=r,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:f}=Il(l),{x:g,y:E}=e,{width:S,height:w}=n;let _,h,m,A,k,R;return o==="center"?(k=E+w/2,s==="left"?(_=g,h=_-a,A=k+a,R=k-a):(_=g+S,h=_+a,A=k-a,R=k+a),m=_):(s==="left"?h=g+Math.max(c,u)+a:s==="right"?h=g+S-Math.max(d,f)-a:h=this.caretX,o==="top"?(A=E,k=A-a,_=h-a,m=h+a):(A=E+w,k=A+a,_=h+a,m=h-a),R=A),{x1:_,x2:h,x3:m,y1:A,y2:k,y3:R}}drawTitle(e,n,r){const s=this.title,o=s.length;let a,l,c;if(o){const d=Ed(r.rtl,this.x,this.width);for(e.x=Jm(this,r.titleAlign,r),n.textAlign=d.textAlign(r.titleAlign),n.textBaseline="middle",a=kn(r.titleFont),l=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,c=0;c<o;++c)n.fillText(s[c],d.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+l,c+1===o&&(e.y+=r.titleMarginBottom-l)}}_drawColorBox(e,n,r,s,o){const a=this.labelColors[r],l=this.labelPointStyles[r],{boxHeight:c,boxWidth:d}=o,u=kn(o.bodyFont),f=Jm(this,"left",o),g=s.x(f),E=c<u.lineHeight?(u.lineHeight-c)/2:0,S=n.y+E;if(o.usePointStyle){const w={radius:Math.min(d,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},_=s.leftForLtr(g,d)+d/2,h=S+c/2;e.strokeStyle=o.multiKeyBackground,e.fillStyle=o.multiKeyBackground,gx(e,w,_,h),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,gx(e,w,_,h)}else{e.lineWidth=gt(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const w=s.leftForLtr(g,d),_=s.leftForLtr(s.xPlus(g,1),d-2),h=Il(a.borderRadius);Object.values(h).some(m=>m!==0)?(e.beginPath(),e.fillStyle=o.multiKeyBackground,Vh(e,{x:w,y:S,w:d,h:c,radius:h}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),Vh(e,{x:_,y:S+1,w:d-2,h:c-2,radius:h}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(w,S,d,c),e.strokeRect(w,S,d,c),e.fillStyle=a.backgroundColor,e.fillRect(_,S+1,d-2,c-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,n,r){const{body:s}=this,{bodySpacing:o,bodyAlign:a,displayColors:l,boxHeight:c,boxWidth:d,boxPadding:u}=r,f=kn(r.bodyFont);let g=f.lineHeight,E=0;const S=Ed(r.rtl,this.x,this.width),w=function(y){n.fillText(y,S.x(e.x+E),e.y+g/2),e.y+=g+o},_=S.textAlign(a);let h,m,A,k,R,O,N;for(n.textAlign=a,n.textBaseline="middle",n.font=f.string,e.x=Jm(this,_,r),n.fillStyle=r.bodyColor,Dt(this.beforeBody,w),E=l&&_!=="right"?a==="center"?d/2+u:d+2+u:0,k=0,O=s.length;k<O;++k){for(h=s[k],m=this.labelTextColors[k],n.fillStyle=m,Dt(h.before,w),A=h.lines,l&&A.length&&(this._drawColorBox(n,e,k,S,r),g=Math.max(f.lineHeight,c)),R=0,N=A.length;R<N;++R)w(A[R]),g=f.lineHeight;Dt(h.after,w)}E=0,g=f.lineHeight,Dt(this.afterBody,w),e.y-=o}drawFooter(e,n,r){const s=this.footer,o=s.length;let a,l;if(o){const c=Ed(r.rtl,this.x,this.width);for(e.x=Jm(this,r.footerAlign,r),e.y+=r.footerMarginTop,n.textAlign=c.textAlign(r.footerAlign),n.textBaseline="middle",a=kn(r.footerFont),n.fillStyle=r.footerColor,n.font=a.string,l=0;l<o;++l)n.fillText(s[l],c.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+r.footerSpacing}}drawBackground(e,n,r,s){const{xAlign:o,yAlign:a}=this,{x:l,y:c}=e,{width:d,height:u}=r,{topLeft:f,topRight:g,bottomLeft:E,bottomRight:S}=Il(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(l+f,c),a==="top"&&this.drawCaret(e,n,r,s),n.lineTo(l+d-g,c),n.quadraticCurveTo(l+d,c,l+d,c+g),a==="center"&&o==="right"&&this.drawCaret(e,n,r,s),n.lineTo(l+d,c+u-S),n.quadraticCurveTo(l+d,c+u,l+d-S,c+u),a==="bottom"&&this.drawCaret(e,n,r,s),n.lineTo(l+E,c+u),n.quadraticCurveTo(l,c+u,l,c+u-E),a==="center"&&o==="left"&&this.drawCaret(e,n,r,s),n.lineTo(l,c+f),n.quadraticCurveTo(l,c,l+f,c),n.closePath(),n.fill(),s.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,r=this.$animations,s=r&&r.x,o=r&&r.y;if(s||o){const a=yf[e.position].call(this,this._active,this._eventPosition);if(!a)return;const l=this._size=lD(this,e),c=Object.assign({},a,this._size),d=cD(n,e,c),u=dD(e,c,d,n);(s._to!==u.x||o._to!==u.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=l.width,this.height=l.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=tr(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(e.save(),e.globalAlpha=r,this.drawBackground(o,e,s,n),y4(e,n.textDirection),o.y+=a.top,this.drawTitle(o,e,n),this.drawBody(o,e,n),this.drawFooter(o,e,n),b4(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const r=this._active,s=e.map(({datasetIndex:l,index:c})=>{const d=this.chart.getDatasetMeta(l);if(!d)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:d.data[c],index:c}}),o=!Xy(r,s),a=this._positionChanged(s,n);(o||a)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],a=this._getActiveElements(e,o,n,r),l=this._positionChanged(a,e),c=n||!Xy(a,o)||l;return c&&(this._active=a,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),c}_getActiveElements(e,n,r,s){const o=this.options;if(e.type==="mouseout")return[];if(!s)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const a=this.chart.getElementsAtEventForMode(e,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(e,n){const{caretX:r,caretY:s,options:o}=this,a=yf[o.position].call(this,e,n);return a!==!1&&(r!==a.x||s!==a.y)}}Ne(Cx,"positioners",yf);var G4={id:"tooltip",_element:Cx,positioners:yf,afterInit(t,e,n){n&&(t.tooltip=new Cx({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:H4},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},abe=Object.freeze({__proto__:null,Colors:xye,Decimation:Aye,Filler:Gye,Legend:U4,SubTitle:Qye,Title:Y4,Tooltip:G4});const lbe=(t,e,n,r)=>(typeof e=="string"?(n=t.push(e)-1,r.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function cbe(t,e,n,r){const s=t.indexOf(e);if(s===-1)return lbe(t,e,n,r);const o=t.lastIndexOf(e);return s!==o?n:s}const dbe=(t,e)=>t===null?null:Kn(Math.round(t),0,e);function hD(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class ob extends dc{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:s,label:o}of n)r[s]===o&&r.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(pt(e))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===e?n:cbe(r,e,st(n,e),this._addedLabels),dbe(n,r.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:r,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(r=0),n||(s=this.getLabels().length-1)),this.min=r,this.max=s}buildTicks(){const e=this.min,n=this.max,r=this.options.offset,s=[];let o=this.getLabels();o=e===0&&n===o.length-1?o:o.slice(e,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let a=e;a<=n;a++)s.push({value:a});return s}getLabelForValue(e){return hD.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}Ne(ob,"id","category"),Ne(ob,"defaults",{ticks:{callback:hD}});function ube(t,e){const n=[],{bounds:s,step:o,min:a,max:l,precision:c,count:d,maxTicks:u,maxDigits:f,includeBounds:g}=t,E=o||1,S=u-1,{min:w,max:_}=e,h=!pt(a),m=!pt(l),A=!pt(d),k=(_-w)/(f+1);let R=aF((_-w)/S/E)*E,O,N,y,v;if(R<1e-14&&!h&&!m)return[{value:w},{value:_}];v=Math.ceil(_/R)-Math.floor(w/R),v>S&&(R=aF(v*R/S/E)*E),pt(c)||(O=Math.pow(10,c),R=Math.ceil(R*O)/O),s==="ticks"?(N=Math.floor(w/R)*R,y=Math.ceil(_/R)*R):(N=w,y=_),h&&m&&o&&lpe((l-a)/o,R/1e3)?(v=Math.round(Math.min((l-a)/R,u)),R=(l-a)/v,N=a,y=l):A?(N=h?a:N,y=m?l:y,v=d-1,R=(y-N)/v):(v=(y-N)/R,Hf(v,Math.round(v),R/1e3)?v=Math.round(v):v=Math.ceil(v));const b=Math.max(lF(R),lF(N));O=Math.pow(10,pt(c)?b:c),N=Math.round(N*O)/O,y=Math.round(y*O)/O;let P=0;for(h&&(g&&N!==a?(n.push({value:a}),N<a&&P++,Hf(Math.round((N+P*R)*O)/O,a,pD(a,k,t))&&P++):N<a&&P++);P<v;++P){const F=Math.round((N+P*R)*O)/O;if(m&&F>l)break;n.push({value:F})}return m&&g&&y!==l?n.length&&Hf(n[n.length-1].value,l,pD(l,k,t))?n[n.length-1].value=l:n.push({value:l}):(!m||y===l)&&n.push({value:y}),n}function pD(t,e,{horizontal:n,minRotation:r}){const s=Ws(r),o=(n?Math.sin(s):Math.cos(s))||.001,a=.75*e*(""+t).length;return Math.min(e/o,a)}class ib extends dc{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return pt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:s,max:o}=this;const a=c=>s=n?s:c,l=c=>o=r?o:c;if(e){const c=_o(s),d=_o(o);c<0&&d<0?l(0):c>0&&d>0&&a(0)}if(s===o){let c=o===0?1:Math.abs(o*.05);l(o+c),e||a(s-c)}this.min=s,this.max=o}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=e,s;return r?(s=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let r=this.getTickLimit();r=Math.max(2,r);const s={maxTicks:r,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,a=ube(s,o);return e.bounds==="ticks"&&e4(a,this,"value"),e.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const e=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){const s=(r-n)/Math.max(e.length-1,1)/2;n-=s,r+=s}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(e){return qp(e,this.chart.options.locale,this.options.ticks.format)}}class ab extends ib{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=En(e)?e:0,this.max=En(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,r=Ws(this.options.ticks.minRotation),s=(e?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}Ne(ab,"id","linear"),Ne(ab,"defaults",{ticks:{callback:Ov.formatters.numeric}});const Zh=t=>Math.floor(ca(t)),ll=(t,e)=>Math.pow(10,Zh(t)+e);function mD(t){return t/Math.pow(10,Zh(t))===1}function gD(t,e,n){const r=Math.pow(10,n),s=Math.floor(t/r);return Math.ceil(e/r)-s}function fbe(t,e){const n=e-t;let r=Zh(n);for(;gD(t,e,r)>10;)r++;for(;gD(t,e,r)<10;)r--;return Math.min(r,Zh(t))}function hbe(t,{min:e,max:n}){e=Kr(t.min,e);const r=[],s=Zh(e);let o=fbe(e,n),a=o<0?Math.pow(10,Math.abs(o)):1;const l=Math.pow(10,o),c=s>o?Math.pow(10,s):0,d=Math.round((e-c)*a)/a,u=Math.floor((e-c)/l/10)*l*10;let f=Math.floor((d-u)/Math.pow(10,o)),g=Kr(t.min,Math.round((c+u+f*Math.pow(10,o))*a)/a);for(;g<n;)r.push({value:g,major:mD(g),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(o++,f=2,a=o>=0?1:a),g=Math.round((c+u+f*Math.pow(10,o))*a)/a;const E=Kr(t.max,g);return r.push({value:E,major:mD(E),significand:f}),r}class Ex extends dc{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const r=ib.prototype.parse.apply(this,[e,n]);if(r===0){this._zero=!0;return}return En(r)&&r>0?r:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=En(e)?Math.max(0,e):null,this.max=En(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!En(this._userMin)&&(this.min=e===ll(this.min,0)?ll(this.min,-1):ll(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let r=this.min,s=this.max;const o=l=>r=e?r:l,a=l=>s=n?s:l;r===s&&(r<=0?(o(1),a(10)):(o(ll(r,-1)),a(ll(s,1)))),r<=0&&o(ll(s,-1)),s<=0&&a(ll(r,1)),this.min=r,this.max=s}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},r=hbe(n,this);return e.bounds==="ticks"&&e4(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(e){return e===void 0?"0":qp(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=ca(e),this._valueRange=ca(this.max)-ca(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(ca(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}Ne(Ex,"id","logarithmic"),Ne(Ex,"defaults",{ticks:{callback:Ov.formatters.logarithmic,major:{enabled:!0}}});function Sx(t){const e=t.ticks;if(e.display&&t.display){const n=tr(e.backdropPadding);return st(e.font&&e.font.size,gn.font.size)+n.height}return 0}function pbe(t,e,n){return n=rn(n)?n:[n],{w:Spe(t,e.string,n),h:n.length*e.lineHeight}}function yD(t,e,n,r,s){return t===r||t===s?{start:e-n/2,end:e+n/2}:t<r||t>s?{start:e-n,end:e}:{start:e,end:e+n}}function mbe(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),r=[],s=[],o=t._pointLabels.length,a=t.options.pointLabels,l=a.centerPointLabels?an/o:0;for(let c=0;c<o;c++){const d=a.setContext(t.getPointLabelContext(c));s[c]=d.padding;const u=t.getPointPosition(c,t.drawingArea+s[c],l),f=kn(d.font),g=pbe(t.ctx,f,t._pointLabels[c]);r[c]=g;const E=Jr(t.getIndexAngle(c)+l),S=Math.round(wA(E)),w=yD(S,u.x,g.w,0,180),_=yD(S,u.y,g.h,90,270);gbe(n,e,E,w,_)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=vbe(t,r,s)}function gbe(t,e,n,r,s){const o=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));let l=0,c=0;r.start<e.l?(l=(e.l-r.start)/o,t.l=Math.min(t.l,e.l-l)):r.end>e.r&&(l=(r.end-e.r)/o,t.r=Math.max(t.r,e.r+l)),s.start<e.t?(c=(e.t-s.start)/a,t.t=Math.min(t.t,e.t-c)):s.end>e.b&&(c=(s.end-e.b)/a,t.b=Math.max(t.b,e.b+c))}function ybe(t,e,n){const r=t.drawingArea,{extra:s,additionalAngle:o,padding:a,size:l}=n,c=t.getPointPosition(e,r+s+a,o),d=Math.round(wA(Jr(c.angle+Pn))),u=xbe(c.y,l.h,d),f=_be(d),g=wbe(c.x,l.w,f);return{visible:!0,x:c.x,y:u,textAlign:f,left:g,top:u,right:g+l.w,bottom:u+l.h}}function bbe(t,e){if(!e)return!0;const{left:n,top:r,right:s,bottom:o}=t;return!(ui({x:n,y:r},e)||ui({x:n,y:o},e)||ui({x:s,y:r},e)||ui({x:s,y:o},e))}function vbe(t,e,n){const r=[],s=t._pointLabels.length,o=t.options,{centerPointLabels:a,display:l}=o.pointLabels,c={extra:Sx(o)/2,additionalAngle:a?an/s:0};let d;for(let u=0;u<s;u++){c.padding=n[u],c.size=e[u];const f=ybe(t,u,c);r.push(f),l==="auto"&&(f.visible=bbe(f,d),f.visible&&(d=f))}return r}function _be(t){return t===0||t===180?"center":t<180?"left":"right"}function wbe(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function xbe(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function Cbe(t,e,n){const{left:r,top:s,right:o,bottom:a}=n,{backdropColor:l}=e;if(!pt(l)){const c=Il(e.borderRadius),d=tr(e.backdropPadding);t.fillStyle=l;const u=r-d.left,f=s-d.top,g=o-r+d.width,E=a-s+d.height;Object.values(c).some(S=>S!==0)?(t.beginPath(),Vh(t,{x:u,y:f,w:g,h:E,radius:c}),t.fill()):t.fillRect(u,f,g,E)}}function Ebe(t,e){const{ctx:n,options:{pointLabels:r}}=t;for(let s=e-1;s>=0;s--){const o=t._pointLabelItems[s];if(!o.visible)continue;const a=r.setContext(t.getPointLabelContext(s));Cbe(n,a,o);const l=kn(a.font),{x:c,y:d,textAlign:u}=o;Ql(n,t._pointLabels[s],c,d+l.lineHeight/2,l,{color:a.color,textAlign:u,textBaseline:"middle"})}}function W4(t,e,n,r){const{ctx:s}=t;if(n)s.arc(t.xCenter,t.yCenter,e,0,on);else{let o=t.getPointPosition(0,e);s.moveTo(o.x,o.y);for(let a=1;a<r;a++)o=t.getPointPosition(a,e),s.lineTo(o.x,o.y)}}function Sbe(t,e,n,r,s){const o=t.ctx,a=e.circular,{color:l,lineWidth:c}=e;!a&&!r||!l||!c||n<0||(o.save(),o.strokeStyle=l,o.lineWidth=c,o.setLineDash(s.dash),o.lineDashOffset=s.dashOffset,o.beginPath(),W4(t,n,a,r),o.closePath(),o.stroke(),o.restore())}function Abe(t,e,n){return Ja(t,{label:n,index:e,type:"pointLabel"})}class bf extends ib{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=tr(Sx(this.options)/2),n=this.width=this.maxWidth-e.width,r=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+r/2+e.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=En(e)&&!isNaN(e)?e:0,this.max=En(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Sx(this.options))}generateTickLabels(e){ib.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,r)=>{const s=zt(this.options.pointLabels.callback,[n,r],this);return s||s===0?s:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const e=this.options;e.display&&e.pointLabels.display?mbe(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,r,s){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((r-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,r,s))}getIndexAngle(e){const n=on/(this._pointLabels.length||1),r=this.options.startAngle||0;return Jr(e*n+Ws(r))}getDistanceFromCenterForValue(e){if(pt(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(pt(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const r=n[e];return Abe(this.getContext(),e,r)}}getPointPosition(e,n,r=0){const s=this.getIndexAngle(e)-Pn+r;return{x:Math.cos(s)*n+this.xCenter,y:Math.sin(s)*n+this.yCenter,angle:s}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:r,right:s,bottom:o}=this._pointLabelItems[e];return{left:n,top:r,right:s,bottom:o}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const r=this.ctx;r.save(),r.beginPath(),W4(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=e,r.fill(),r.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:r,grid:s,border:o}=n,a=this._pointLabels.length;let l,c,d;if(n.pointLabels.display&&Ebe(this,a),s.display&&this.ticks.forEach((u,f)=>{if(f!==0||f===0&&this.min<0){c=this.getDistanceFromCenterForValue(u.value);const g=this.getContext(f),E=s.setContext(g),S=o.setContext(g);Sbe(this,E,c,a,S)}}),r.display){for(e.save(),l=a-1;l>=0;l--){const u=r.setContext(this.getPointLabelContext(l)),{color:f,lineWidth:g}=u;!g||!f||(e.lineWidth=g,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,c=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),d=this.getPointPosition(l,c),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(d.x,d.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const s=this.getIndexAngle(0);let o,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((l,c)=>{if(c===0&&this.min>=0&&!n.reverse)return;const d=r.setContext(this.getContext(c)),u=kn(d.font);if(o=this.getDistanceFromCenterForValue(this.ticks[c].value),d.showLabelBackdrop){e.font=u.string,a=e.measureText(l.label).width,e.fillStyle=d.backdropColor;const f=tr(d.backdropPadding);e.fillRect(-a/2-f.left,-o-u.size/2-f.top,a+f.width,u.size+f.height)}Ql(e,l.label,0,-o,u,{color:d.color,strokeColor:d.textStrokeColor,strokeWidth:d.textStrokeWidth})}),e.restore()}drawTitle(){}}Ne(bf,"id","radialLinear"),Ne(bf,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ov.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),Ne(bf,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Ne(bf,"descriptors",{angleLines:{_fallback:"grid"}});const Tv={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Mr=Object.keys(Tv);function bD(t,e){return t-e}function vD(t,e){if(pt(e))return null;const n=t._adapter,{parser:r,round:s,isoWeekday:o}=t._parseOpts;let a=e;return typeof r=="function"&&(a=r(a)),En(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(s&&(a=s==="week"&&(Zd(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,s)),+a)}function _D(t,e,n,r){const s=Mr.length;for(let o=Mr.indexOf(t);o<s-1;++o){const a=Tv[Mr[o]],l=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-e)/(l*a.size))<=r)return Mr[o]}return Mr[s-1]}function Nbe(t,e,n,r,s){for(let o=Mr.length-1;o>=Mr.indexOf(n);o--){const a=Mr[o];if(Tv[a].common&&t._adapter.diff(s,r,a)>=e-1)return a}return Mr[n?Mr.indexOf(n):0]}function Rbe(t){for(let e=Mr.indexOf(t)+1,n=Mr.length;e<n;++e)if(Tv[Mr[e]].common)return Mr[e]}function wD(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:r,hi:s}=xA(n,e),o=n[r]>=e?n[r]:n[s];t[o]=!0}}function Pbe(t,e,n,r){const s=t._adapter,o=+s.startOf(e[0].value,r),a=e[e.length-1].value;let l,c;for(l=o;l<=a;l=+s.add(l,1,r))c=n[l],c>=0&&(e[c].major=!0);return e}function xD(t,e,n){const r=[],s={},o=e.length;let a,l;for(a=0;a<o;++a)l=e[a],s[l]=a,r.push({value:l,major:!1});return o===0||!n?r:Pbe(t,r,s,n)}class Jh extends dc{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const r=e.time||(e.time={}),s=this._adapter=new $me._date(e.adapters.date);s.init(n),Yf(r.displayFormats,s.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:vD(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,r=e.time.unit||"day";let{min:s,max:o,minDefined:a,maxDefined:l}=this.getUserBounds();function c(d){!a&&!isNaN(d.min)&&(s=Math.min(s,d.min)),!l&&!isNaN(d.max)&&(o=Math.max(o,d.max))}(!a||!l)&&(c(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&c(this.getMinMax(!1))),s=En(s)&&!isNaN(s)?s:+n.startOf(Date.now(),r),o=En(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],r=e[e.length-1]),{min:n,max:r}}buildTicks(){const e=this.options,n=e.time,r=e.ticks,s=r.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,a=this.max,l=fpe(s,o,a);return this._unit=n.unit||(r.autoSkip?_D(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):Nbe(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:Rbe(this._unit),this.initOffsets(s),e.reverse&&l.reverse(),xD(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,r=0,s,o;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?n=1-s:n=(this.getDecimalForValue(e[1])-s)/2,o=this.getDecimalForValue(e[e.length-1]),e.length===1?r=o:r=(o-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;n=Kn(n,0,a),r=Kn(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const e=this._adapter,n=this.min,r=this.max,s=this.options,o=s.time,a=o.unit||_D(o.minUnit,n,r,this._getLabelCapacity(n)),l=st(s.ticks.stepSize,1),c=a==="week"?o.isoWeekday:!1,d=Zd(c)||c===!0,u={};let f=n,g,E;if(d&&(f=+e.startOf(f,"isoWeek",c)),f=+e.startOf(f,d?"day":a),e.diff(r,n,a)>1e5*l)throw new Error(n+" and "+r+" are too far apart with stepSize of "+l+" "+a);const S=s.ticks.source==="data"&&this.getDataTimestamps();for(g=f,E=0;g<r;g=+e.add(g,l,a),E++)wD(u,g,S);return(g===r||s.bounds==="ticks"||E===1)&&wD(u,g,S),Object.keys(u).sort(bD).map(w=>+w)}getLabelForValue(e){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(e,r.tooltipFormat):n.format(e,r.displayFormats.datetime)}format(e,n){const s=this.options.time.displayFormats,o=this._unit,a=n||s[o];return this._adapter.format(e,a)}_tickFormatFunction(e,n,r,s){const o=this.options,a=o.ticks.callback;if(a)return zt(a,[e,n,r],this);const l=o.time.displayFormats,c=this._unit,d=this._majorUnit,u=c&&l[c],f=d&&l[d],g=r[n],E=d&&f&&g&&g.major;return this._adapter.format(e,s||(E?f:u))}generateTickLabels(e){let n,r,s;for(n=0,r=e.length;n<r;++n)s=e[n],s.label=this._tickFormatFunction(s.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,r=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,r=this.ctx.measureText(e).width,s=Ws(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(s),a=Math.sin(s),l=this._resolveTickFontOptions(0).size;return{w:r*o+l*a,h:r*a+l*o}}_getLabelCapacity(e){const n=this.options.time,r=n.displayFormats,s=r[n.unit]||r.millisecond,o=this._tickFormatFunction(e,0,xD(this,[e],this._majorUnit),s),a=this._getLabelSize(o),l=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return l>0?l:1}getDataTimestamps(){let e=this._cache.data||[],n,r;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,r=s.length;n<r;++n)e=e.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,r;if(e.length)return e;const s=this.getLabels();for(n=0,r=s.length;n<r;++n)e.push(vD(this,s[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return r4(e.sort(bD))}}Ne(Jh,"id","time"),Ne(Jh,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Xm(t,e,n){let r=0,s=t.length-1,o,a,l,c;n?(e>=t[r].pos&&e<=t[s].pos&&({lo:r,hi:s}=di(t,"pos",e)),{pos:o,time:l}=t[r],{pos:a,time:c}=t[s]):(e>=t[r].time&&e<=t[s].time&&({lo:r,hi:s}=di(t,"time",e)),{time:o,pos:l}=t[r],{time:a,pos:c}=t[s]);const d=a-o;return d?l+(c-l)*(e-o)/d:l}class Ax extends Jh{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Xm(n,this.min),this._tableRange=Xm(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:r}=this,s=[],o=[];let a,l,c,d,u;for(a=0,l=e.length;a<l;++a)d=e[a],d>=n&&d<=r&&s.push(d);if(s.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,l=s.length;a<l;++a)u=s[a+1],c=s[a-1],d=s[a],Math.round((u+c)/2)!==d&&o.push({time:d,pos:a/(l-1)});return o}_generate(){const e=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(e)||!r.length)&&r.splice(0,0,e),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((s,o)=>s-o)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?e=this.normalize(n.concat(r)):e=n.length?n:r,e=this._cache.all=e,e}getDecimalForValue(e){return(Xm(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return Xm(this._table,r*this._tableRange+this._minPos,!0)}}Ne(Ax,"id","timeseries"),Ne(Ax,"defaults",Jh.defaults);var Obe=Object.freeze({__proto__:null,CategoryScale:ob,LinearScale:ab,LogarithmicScale:Ex,RadialLinearScale:bf,TimeScale:Jh,TimeSeriesScale:Ax});const Fbe=[jme,gye,abe,Obe];Jo.register(...Fbe);/*! * chartjs-plugin-datalabels v2.2.0 * https://chartjs-plugin-datalabels.netlify.app * (c) 2017-2022 chartjs-plugin-datalabels contributors * Released under the MIT license */var CD=function(){if(typeof window<"u"){if(window.devicePixelRatio)return window.devicePixelRatio;var t=window.screen;if(t)return(t.deviceXDPI||1)/(t.logicalXDPI||1)}return 1}(),Zf={toTextLines:function(t){var e=[],n;for(t=[].concat(t);t.length;)n=t.pop(),typeof n=="string"?e.unshift.apply(e,n.split(` `)):Array.isArray(n)?t.push.apply(t,n):pt(t)||e.unshift(""+n);return e},textSize:function(t,e,n){var r=[].concat(e),s=r.length,o=t.font,a=0,l;for(t.font=n.string,l=0;l<s;++l)a=Math.max(t.measureText(r[l]).width,a);return t.font=o,{height:s*n.lineHeight,width:a}},bound:function(t,e,n){return Math.max(t,Math.min(e,n))},arrayDiff:function(t,e){var n=t.slice(),r=[],s,o,a,l;for(s=0,a=e.length;s<a;++s)l=e[s],o=n.indexOf(l),o===-1?r.push([l,1]):n.splice(o,1);for(s=0,a=n.length;s<a;++s)r.push([n[s],-1]);return r},rasterize:function(t){return Math.round(t*CD)/CD}};function Q_(t,e){var n=e.x,r=e.y;if(n===null)return{x:0,y:-1};if(r===null)return{x:1,y:0};var s=t.x-n,o=t.y-r,a=Math.sqrt(s*s+o*o);return{x:a?s/a:0,y:a?o/a:-1}}function Dbe(t,e,n,r,s){switch(s){case"center":n=r=0;break;case"bottom":n=0,r=1;break;case"right":n=1,r=0;break;case"left":n=-1,r=0;break;case"top":n=0,r=-1;break;case"start":n=-n,r=-r;break;case"end":break;default:s*=Math.PI/180,n=Math.cos(s),r=Math.sin(s);break}return{x:t,y:e,vx:n,vy:r}}var kbe=0,V4=1,K4=2,Z4=4,J4=8;function Qm(t,e,n){var r=kbe;return t<n.left?r|=V4:t>n.right&&(r|=K4),e<n.top?r|=J4:e>n.bottom&&(r|=Z4),r}function Tbe(t,e){for(var n=t.x0,r=t.y0,s=t.x1,o=t.y1,a=Qm(n,r,e),l=Qm(s,o,e),c,d,u;!(!(a|l)||a&l);)c=a||l,c&J4?(d=n+(s-n)*(e.top-r)/(o-r),u=e.top):c&Z4?(d=n+(s-n)*(e.bottom-r)/(o-r),u=e.bottom):c&K4?(u=r+(o-r)*(e.right-n)/(s-n),d=e.right):c&V4&&(u=r+(o-r)*(e.left-n)/(s-n),d=e.left),c===a?(n=d,r=u,a=Qm(n,r,e)):(s=d,o=u,l=Qm(s,o,e));return{x0:n,x1:s,y0:r,y1:o}}function eg(t,e){var n=e.anchor,r=t,s,o;return e.clamp&&(r=Tbe(r,e.area)),n==="start"?(s=r.x0,o=r.y0):n==="end"?(s=r.x1,o=r.y1):(s=(r.x0+r.x1)/2,o=(r.y0+r.y1)/2),Dbe(s,o,t.vx,t.vy,e.align)}var tg={arc:function(t,e){var n=(t.startAngle+t.endAngle)/2,r=Math.cos(n),s=Math.sin(n),o=t.innerRadius,a=t.outerRadius;return eg({x0:t.x+r*o,y0:t.y+s*o,x1:t.x+r*a,y1:t.y+s*a,vx:r,vy:s},e)},point:function(t,e){var n=Q_(t,e.origin),r=n.x*t.options.radius,s=n.y*t.options.radius;return eg({x0:t.x-r,y0:t.y-s,x1:t.x+r,y1:t.y+s,vx:n.x,vy:n.y},e)},bar:function(t,e){var n=Q_(t,e.origin),r=t.x,s=t.y,o=0,a=0;return t.horizontal?(r=Math.min(t.x,t.base),o=Math.abs(t.base-t.x)):(s=Math.min(t.y,t.base),a=Math.abs(t.base-t.y)),eg({x0:r,y0:s+a,x1:r+o,y1:s,vx:n.x,vy:n.y},e)},fallback:function(t,e){var n=Q_(t,e.origin);return eg({x0:t.x,y0:t.y,x1:t.x+(t.width||0),y1:t.y+(t.height||0),vx:n.x,vy:n.y},e)}},hi=Zf.rasterize;function Ibe(t){var e=t.borderWidth||0,n=t.padding,r=t.size.height,s=t.size.width,o=-s/2,a=-r/2;return{frame:{x:o-n.left-e,y:a-n.top-e,w:s+n.width+e*2,h:r+n.height+e*2},text:{x:o,y:a,w:s,h:r}}}function Mbe(t,e){var n=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!n)return null;if(n.xCenter!==void 0&&n.yCenter!==void 0)return{x:n.xCenter,y:n.yCenter};var r=n.getBasePixel();return t.horizontal?{x:r,y:null}:{x:null,y:r}}function Lbe(t){return t instanceof id?tg.arc:t instanceof Sd?tg.point:t instanceof Kf?tg.bar:tg.fallback}function zbe(t,e,n,r,s,o){var a=Math.PI/2;if(o){var l=Math.min(o,s/2,r/2),c=e+l,d=n+l,u=e+r-l,f=n+s-l;t.moveTo(e,d),c<u&&d<f?(t.arc(c,d,l,-Math.PI,-a),t.arc(u,d,l,-a,0),t.arc(u,f,l,0,a),t.arc(c,f,l,a,Math.PI)):c<u?(t.moveTo(c,n),t.arc(u,d,l,-a,a),t.arc(c,d,l,a,Math.PI+a)):d<f?(t.arc(c,d,l,-Math.PI,0),t.arc(c,f,l,0,Math.PI)):t.arc(c,d,l,-Math.PI,Math.PI),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,r,s)}function qbe(t,e,n){var r=n.backgroundColor,s=n.borderColor,o=n.borderWidth;!r&&(!s||!o)||(t.beginPath(),zbe(t,hi(e.x)+o/2,hi(e.y)+o/2,hi(e.w)-o,hi(e.h)-o,n.borderRadius),t.closePath(),r&&(t.fillStyle=r,t.fill()),s&&o&&(t.strokeStyle=s,t.lineWidth=o,t.lineJoin="miter",t.stroke()))}function jbe(t,e,n){var r=n.lineHeight,s=t.w,o=t.x,a=t.y+r/2;return e==="center"?o+=s/2:(e==="end"||e==="right")&&(o+=s),{h:r,w:s,x:o,y:a}}function $be(t,e,n){var r=t.shadowBlur,s=n.stroked,o=hi(n.x),a=hi(n.y),l=hi(n.w);s&&t.strokeText(e,o,a,l),n.filled&&(r&&s&&(t.shadowBlur=0),t.fillText(e,o,a,l),r&&s&&(t.shadowBlur=r))}function Bbe(t,e,n,r){var s=r.textAlign,o=r.color,a=!!o,l=r.font,c=e.length,d=r.textStrokeColor,u=r.textStrokeWidth,f=d&&u,g;if(!(!c||!a&&!f))for(n=jbe(n,s,l),t.font=l.string,t.textAlign=s,t.textBaseline="middle",t.shadowBlur=r.textShadowBlur,t.shadowColor=r.textShadowColor,a&&(t.fillStyle=o),f&&(t.lineJoin="round",t.lineWidth=u,t.strokeStyle=d),g=0,c=e.length;g<c;++g)$be(t,e[g],{stroked:f,filled:a,w:n.w,x:n.x,y:n.y+n.h*g})}var X4=function(t,e,n,r){var s=this;s._config=t,s._index=r,s._model=null,s._rects=null,s._ctx=e,s._el=n};So(X4.prototype,{_modelize:function(t,e,n,r){var s=this,o=s._index,a=kn(en([n.font,{}],r,o)),l=en([n.color,gn.color],r,o);return{align:en([n.align,"center"],r,o),anchor:en([n.anchor,"center"],r,o),area:r.chart.chartArea,backgroundColor:en([n.backgroundColor,null],r,o),borderColor:en([n.borderColor,null],r,o),borderRadius:en([n.borderRadius,0],r,o),borderWidth:en([n.borderWidth,0],r,o),clamp:en([n.clamp,!1],r,o),clip:en([n.clip,!1],r,o),color:l,display:t,font:a,lines:e,offset:en([n.offset,4],r,o),opacity:en([n.opacity,1],r,o),origin:Mbe(s._el,r),padding:tr(en([n.padding,4],r,o)),positioner:Lbe(s._el),rotation:en([n.rotation,0],r,o)*(Math.PI/180),size:Zf.textSize(s._ctx,e,a),textAlign:en([n.textAlign,"start"],r,o),textShadowBlur:en([n.textShadowBlur,0],r,o),textShadowColor:en([n.textShadowColor,l],r,o),textStrokeColor:en([n.textStrokeColor,l],r,o),textStrokeWidth:en([n.textStrokeWidth,0],r,o)}},update:function(t){var e=this,n=null,r=null,s=e._index,o=e._config,a,l,c,d=en([o.display,!0],t,s);d&&(a=t.dataset.data[s],l=st(zt(o.formatter,[a,t]),a),c=pt(l)?[]:Zf.toTextLines(l),c.length&&(n=e._modelize(d,c,o,t),r=Ibe(n))),e._model=n,e._rects=r},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(t,e){var n=this,r=t.ctx,s=n._model,o=n._rects,a;this.visible()&&(r.save(),s.clip&&(a=s.area,r.beginPath(),r.rect(a.left,a.top,a.right-a.left,a.bottom-a.top),r.clip()),r.globalAlpha=Zf.bound(0,s.opacity,1),r.translate(hi(e.x),hi(e.y)),r.rotate(s.rotation),qbe(r,o.frame,s),Bbe(r,s.lines,o.text,s),r.restore())}});var Ube=Number.MIN_SAFE_INTEGER||-9007199254740991,Ybe=Number.MAX_SAFE_INTEGER||9007199254740991;function rf(t,e,n){var r=Math.cos(n),s=Math.sin(n),o=e.x,a=e.y;return{x:o+r*(t.x-o)-s*(t.y-a),y:a+s*(t.x-o)+r*(t.y-a)}}function ED(t,e){var n=Ybe,r=Ube,s=e.origin,o,a,l,c,d;for(o=0;o<t.length;++o)a=t[o],l=a.x-s.x,c=a.y-s.y,d=e.vx*l+e.vy*c,n=Math.min(n,d),r=Math.max(r,d);return{min:n,max:r}}function ng(t,e){var n=e.x-t.x,r=e.y-t.y,s=Math.sqrt(n*n+r*r);return{vx:(e.x-t.x)/s,vy:(e.y-t.y)/s,origin:t,ln:s}}var Q4=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};So(Q4.prototype,{center:function(){var t=this._rect;return{x:t.x+t.w/2,y:t.y+t.h/2}},update:function(t,e,n){this._rotation=n,this._rect={x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h}},contains:function(t){var e=this,n=1,r=e._rect;return t=rf(t,e.center(),-e._rotation),!(t.x<r.x-n||t.y<r.y-n||t.x>r.x+r.w+n*2||t.y>r.y+r.h+n*2)},intersects:function(t){var e=this._points(),n=t._points(),r=[ng(e[0],e[1]),ng(e[0],e[3])],s,o,a;for(this._rotation!==t._rotation&&r.push(ng(n[0],n[1]),ng(n[0],n[3])),s=0;s<r.length;++s)if(o=ED(e,r[s]),a=ED(n,r[s]),o.max<a.min||a.max<o.min)return!1;return!0},_points:function(){var t=this,e=t._rect,n=t._rotation,r=t.center();return[rf({x:e.x,y:e.y},r,n),rf({x:e.x+e.w,y:e.y},r,n),rf({x:e.x+e.w,y:e.y+e.h},r,n),rf({x:e.x,y:e.y+e.h},r,n)]}});function ej(t,e,n){var r=e.positioner(t,e),s=r.vx,o=r.vy;if(!s&&!o)return{x:r.x,y:r.y};var a=n.w,l=n.h,c=e.rotation,d=Math.abs(a/2*Math.cos(c))+Math.abs(l/2*Math.sin(c)),u=Math.abs(a/2*Math.sin(c))+Math.abs(l/2*Math.cos(c)),f=1/Math.max(Math.abs(s),Math.abs(o));return d*=s*f,u*=o*f,d+=e.offset*s,u+=e.offset*o,{x:r.x+d,y:r.y+u}}function Hbe(t,e){var n,r,s,o;for(n=t.length-1;n>=0;--n)for(s=t[n].$layout,r=n-1;r>=0&&s._visible;--r)o=t[r].$layout,o._visible&&s._box.intersects(o._box)&&e(s,o);return t}function Gbe(t){var e,n,r,s,o,a,l;for(e=0,n=t.length;e<n;++e)r=t[e],s=r.$layout,s._visible&&(l=new Proxy(r._el,{get:(c,d)=>c.getProps([d],!0)[d]}),o=r.geometry(),a=ej(l,r.model(),o),s._box.update(a,o,r.rotation()));return Hbe(t,function(c,d){var u=c._hidable,f=d._hidable;u&&f||f?d._visible=!1:u&&(c._visible=!1)})}var Jf={prepare:function(t){var e=[],n,r,s,o,a;for(n=0,s=t.length;n<s;++n)for(r=0,o=t[n].length;r<o;++r)a=t[n][r],e.push(a),a.$layout={_box:new Q4,_hidable:!1,_visible:!0,_set:n,_idx:a._index};return e.sort(function(l,c){var d=l.$layout,u=c.$layout;return d._idx===u._idx?u._set-d._set:u._idx-d._idx}),this.update(e),e},update:function(t){var e=!1,n,r,s,o,a;for(n=0,r=t.length;n<r;++n)s=t[n],o=s.model(),a=s.$layout,a._hidable=o&&o.display==="auto",a._visible=s.visible(),e|=a._hidable;e&&Gbe(t)},lookup:function(t,e){var n,r;for(n=t.length-1;n>=0;--n)if(r=t[n].$layout,r&&r._visible&&r._box.contains(e))return t[n];return null},draw:function(t,e){var n,r,s,o,a,l;for(n=0,r=e.length;n<r;++n)s=e[n],o=s.$layout,o._visible&&(a=s.geometry(),l=ej(s._el,s.model(),a),o._box.update(l,a,s.rotation()),s.draw(t,l))}},Wbe=function(t){if(pt(t))return null;var e=t,n,r,s;if(gt(t))if(!pt(t.label))e=t.label;else if(!pt(t.r))e=t.r;else for(e="",n=Object.keys(t),s=0,r=n.length;s<r;++s)e+=(s!==0?", ":"")+n[s]+": "+t[n[s]];return""+e},Vbe={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:Wbe,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},Tr="$datalabels",tj="$default";function Kbe(t,e){var n=t.datalabels,r={},s=[],o,a;return n===!1?null:(n===!0&&(n={}),e=So({},[e,n]),o=e.labels||{},a=Object.keys(o),delete e.labels,a.length?a.forEach(function(l){o[l]&&s.push(So({},[e,o[l],{_key:l}]))}):s.push(e),r=s.reduce(function(l,c){return Dt(c.listeners||{},function(d,u){l[u]=l[u]||{},l[u][c._key||tj]=d}),delete c.listeners,l},{}),{labels:s,listeners:r})}function Nx(t,e,n,r){if(e){var s=n.$context,o=n.$groups,a;e[o._set]&&(a=e[o._set][o._key],a&&zt(a,[s,r])===!0&&(t[Tr]._dirty=!0,n.update(s)))}}function Zbe(t,e,n,r,s){var o,a;!n&&!r||(n?r?n!==r&&(a=o=!0):a=!0:o=!0,a&&Nx(t,e.leave,n,s),o&&Nx(t,e.enter,r,s))}function Jbe(t,e){var n=t[Tr],r=n._listeners,s,o;if(!(!r.enter&&!r.leave)){if(e.type==="mousemove")o=Jf.lookup(n._labels,e);else if(e.type!=="mouseout")return;s=n._hovered,n._hovered=o,Zbe(t,r,s,o,e)}}function Xbe(t,e){var n=t[Tr],r=n._listeners.click,s=r&&Jf.lookup(n._labels,e);s&&Nx(t,r,s,e)}var Qbe={id:"datalabels",defaults:Vbe,beforeInit:function(t){t[Tr]={_actives:[]}},beforeUpdate:function(t){var e=t[Tr];e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]},afterDatasetUpdate:function(t,e,n){var r=e.index,s=t[Tr],o=s._datasets[r]=[],a=t.isDatasetVisible(r),l=t.data.datasets[r],c=Kbe(l,n),d=e.meta.data||[],u=t.ctx,f,g,E,S,w,_,h,m;for(u.save(),f=0,E=d.length;f<E;++f)if(h=d[f],h[Tr]=[],a&&h&&t.getDataVisibility(f)&&!h.skip)for(g=0,S=c.labels.length;g<S;++g)w=c.labels[g],_=w._key,m=new X4(w,u,h,f),m.$groups={_set:r,_key:_||tj},m.$context={active:!1,chart:t,dataIndex:f,dataset:l,datasetIndex:r},m.update(m.$context),h[Tr].push(m),o.push(m);u.restore(),So(s._listeners,c.listeners,{merger:function(A,k,R){k[A]=k[A]||{},k[A][e.index]=R[A],s._listened=!0}})},afterUpdate:function(t){t[Tr]._labels=Jf.prepare(t[Tr]._datasets)},afterDatasetsDraw:function(t){Jf.draw(t,t[Tr]._labels)},beforeEvent:function(t,e){if(t[Tr]._listened){var n=e.event;switch(n.type){case"mousemove":case"mouseout":Jbe(t,n);break;case"click":Xbe(t,n);break}}},afterEvent:function(t){var e=t[Tr],n=e._actives,r=e._actives=t.getActiveElements(),s=Zf.arrayDiff(n,r),o,a,l,c,d,u,f;for(o=0,a=s.length;o<a;++o)if(d=s[o],d[1])for(f=d[0].element[Tr]||[],l=0,c=f.length;l<c;++l)u=f[l],u.$context.active=d[1]===1,u.update(u.$context);(e._dirty||s.length)&&(Jf.update(e._labels),t.render()),delete e._dirty}};Jo.register(ob,ab,Sd,fi,Y4,G4,U4,Qbe);const eve="/assets/bajoTabla-6f9677c3.png",tt=({dataFixture:t,dataEquipos:e})=>{var Se,he,Je,Ct;const n=e||[],r=t||[],[s,o]=C.useState(null),[a,l]=C.useState(!1),[c,d]=C.useState(!1),[u,f]=C.useState(!0),g={},E={},S={},w={},_={},h={},m={},A={},k=new Set;r.forEach(de=>{de.equipolocal!=="A conf"&&k.add(de.equipolocal),de.equipovisitante!=="A conf"&&k.add(de.equipovisitante)}),n.forEach(de=>{const le=de.nombre;k.has(le)&&(g[le]=0,E[le]=0,h[le]=0,m[le]=0,A[le]=0,S[le]=0,w[le]=0,_[le]=0)}),r.forEach(de=>{if(de.estado==="Finalizado"||de.estado==="Jugandose"){const le=de.equipolocal,Oe=de.equipovisitante;if(de.resolucion==="PP ambos 0-1")E[le]+=1,E[Oe]+=1,_[le]+=1,_[Oe]+=1,m[le]+=1,m[Oe]+=1,A[le]-=1,A[Oe]-=1;else if(de.resolucion==="PP ambos 0-3")E[le]+=1,E[Oe]+=1,_[le]+=1,_[Oe]+=1,m[le]+=3,m[Oe]+=3,A[le]-=3,A[Oe]-=3;else{const Ke=de.goleslocal,it=de.golesvisitante;E[le]+=1,E[Oe]+=1,h[le]+=Ke,h[Oe]+=it,m[le]+=it,m[Oe]+=Ke,A[le]+=Ke-it,A[Oe]+=it-Ke,Ke>it?(g[le]+=3,S[le]+=1,_[Oe]+=1):Ke<it?(g[Oe]+=3,S[Oe]+=1,_[le]+=1):(g[le]+=1,g[Oe]+=1,w[le]+=1,w[Oe]+=1)}}});const R=Object.entries(g).sort((de,le)=>{if(le[1]!==de[1])return le[1]-de[1];const Oe=A[de[0]]||0,Ke=A[le[0]]||0;if(Oe!==Ke)return Ke-Oe;const it=h[de[0]]||0,It=h[le[0]]||0;return It!==it?It-it:de[0].localeCompare(le[0])}),O=(Se=r[0])==null?void 0:Se.torneo,N=(he=r[0])==null?void 0:he.grupoCopas,y=(Je=r[0])==null?void 0:Je.organizador,v=(Ct=r[0])==null?void 0:Ct.añoTorneo,b=y!=="Afa"?"":i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina"}),P=O==="PRIMERAA"||O==="PRIMERAAFEM"?'PRIMERA "A" '+v:O==="PRIMERAB"||O==="PRIMERABFEM"?'PRIMERA "B" '+v:O==="PRIMERAC"||O==="PRIMERACFEM"?'PRIMERA "C" '+v:O==="PRIMERAD1"?'PRIMERA "D1" '+v:O==="PRIMERAD2"||O==="PRIMERAD2"?'PRIMERA "D2" '+v:O==="ARGENLIGAZ1"?'PRIMERA "Z1" '+v:O==="ARGENLIGAZ2"?'PRIMERA "Z2" '+v:O==="COPAAMERICA"&&N==="A"?"GRUPO A":O==="COPAAMERICA"&&N==="B"?"GRUPO B":O==="COPADEPLATA"?"COPA DE PLATA":O==="AufPRIMERA"?'PRIMERA "A" '+v:O==="LNFA"||O==="COPAAFRICA"&&N==="A"?"GRUPO A":O==="LNFA"||O==="COPAAFRICA"&&N==="B"?"GRUPO B":O==="LIBERTADORES"&&N==="A"?"GRUPO A":O==="LIBERTADORES"&&N==="B"?"GRUPO B":O==="LIBERTADORES"&&N==="C"?"GRUPO C":O==="LIBERTADORESFEM"&&N==="A"?"GRUPO A":O==="LIBERTADORESFEM"&&N==="B"?"GRUPO B":O==="LNFA"||O==="LIBERTADORES"&&N==="C"?"GRUPO C":O==="LNFA"&&N==="D"?"GRUPO D":O==="INTEGRACION"?"PRIMERA "+v:O==="LAAMBA"||O==="LAAMBAFEM"?"LAAMBA ELITE "+v:O==="CONCACAF"&&N==="A"?"GRUPO A":O==="CONCACAF"&&N==="B"?"GRUPO B":O==="CONCACAF"&&N==="C"?"GRUPO C":O==="ARGENLIGABZ1"?'PRIMERA "Z1" '+v:O==="ARGENLIGABZ2"?'PRIMERA "Z2" '+v:O==="MUNDIAL"&&N==="A"?"GRUPO A":O==="MUNDIAL"&&N==="B"?"GRUPO B":O==="MUNDIAL"&&N==="C"?"GRUPO C":O==="MUNDIAL"&&N==="D"?"GRUPO D":O==="MUNDIAL"&&N==="E"?"GRUPO E":O==="MUNDIAL"&&N==="F"?"GRUPO F":"",I=[{torneo:"PRIMERAA",mensaje:"PLAYOFF "},{torneo:"PRIMERAAFEM",mensaje:"PLAYOFF "},{torneo:"PRIMERABFEM",mensaje:"ASCENSO DIRECTO "},{torneo:"PRIMERAB",mensaje:"ASCENSO DIRECTO "},{torneo:"PRIMERAC",mensaje:"ASCENSO DIRECTO "},{torneo:"PRIMERAD1",mensaje:"ASCENSO DIRECTO "},{torneo:"PRIMERAD2",mensaje:"ASCENSO DIRECTO "},{torneo:"INTEGRACION",mensaje:"CLASIFICAN A LA PRIMERA D DE AFA "},{torneo:"COPAAMERICA",mensaje:"CLASIFICADOS A LAS SEMIFINALES Y AL MUNDIAL"},{torneo:"ARGENLIGAZ1",mensaje:"1° y 2° clasificará a la PRIMERA D de AFA. "},{torneo:"ARGENLIGAZ2",mensaje:"1° y 2° clasificará a la PRIMERA D de AFA. "},{torneo:"COPADEPLATA",mensaje:"Campeón ( Clasifica a la SuperCopa 2024 ) "},{torneo:"AufPRIMERA",mensaje:"PLAYOFF "},{torneo:"CONCACAF",mensaje:"CLASIFICADO A CUARTOS DE FINAL "},{torneo:"LNFA",mensaje:"CLASIFICADO A CUARTOS DE FINAL "},{torneo:"LAAMBA",mensaje:"CAMPEÓN"},{torneo:"LAAMBAFEM",mensaje:"CAMPEÓN"},{torneo:"LIBERTADORES",mensaje:"CLASIFICADO A CUARTOS DE FINAL "},{torneo:"LIBERTADORESFEM",mensaje:"CLASIFICADO A SEMIFINAL "},{torneo:"MUNDIAL",mensaje:"CLASIFICADO A OCTAVOS DE FINAL "},{torneo:"COPAAFRICA",mensaje:"CLASIFICADO A SEMIFINALES "},{torneo:"COPAASIA",mensaje:"CLASIFICADO A CUARTOS DE FINAL "},{torneo:"ARGENLIGABZ1",mensaje:"ASCENSO DIRECTO"},{torneo:"ARGENLIGABZ2",mensaje:"ASCENSO DIRECTO"},{torneo:"PRIMERACFEM",mensaje:"ASCENSO DIRECTO"},{torneo:"LNFS",mensaje:"PLAYOFF "}].filter(de=>de.torneo===O).map((de,le)=>i("tr",{className:"border border-dark",children:i("td",{className:"text-center",colSpan:10,style:{backgroundColor:"#B8F7A6",fontSize:9},children:de.mensaje})},le)),q=[{torneo:"PRIMERAA",mensaje:"PLAYOFF - En la 1er Ronda- Los primeros 8 COPA DE ORO",color:"#B8F7A6"},{torneo:"PRIMERAB",mensaje:"PLAYOFF - Del 2° al 9° Playoffs por el segundo ascenso",color:"#BAC1C0"},{torneo:"PRIMERABFEM",mensaje:"PLAYOFF - Del 2° al 9° Playoffs por el 2° y 3° ascenso",color:"#BAC1C0"},{torneo:"PRIMERACFEM",mensaje:"PLAYOFF - Del 2° al 9° Playoffs por el segundo y tercer ascenso",color:"#BAC1C0"},{torneo:"PRIMERAC",mensaje:"PLAYOFF - Del 2° al 9° Playoffs por el segundo ascenso",color:"#BAC1C0"},{torneo:"PRIMERAD1",mensaje:"PLAYOFF - Por el segundo ascenso ",color:"#BAC1C0"},{torneo:"PRIMERAD2",mensaje:"PLAYOFF - Por el segundo ascenso ",color:"#BAC1C0"},{torneo:"ARGENLIGAZ1",mensaje:"PLAYOFF - Del 3° al 6° Playoffs por la tercera clasificación. ",color:"#BAC1C0"},{torneo:"ARGENLIGAZ2",mensaje:"PLAYOFF - Del 3° al 6° Playoffs por la tercera clasificación. ",color:"#BAC1C0"},{torneo:"AufPRIMERA",mensaje:"NO HAY DESCENSO",color:"#227DE1"},{torneo:"CONCACAF",mensaje:"CUARTOS DE FINAL - Los dos mejores 3° de los 3 grupos ",color:"#BAC1C0"},{torneo:"LIBERTADORES",mensaje:"CUARTOS DE FINAL - Los dos mejores 3° de los 3 grupos ",color:"#BAC1C0"},{torneo:"ARGENLIGABZ1",mensaje:"PLAYOFF - Del 2° al 5° Playoffs por el segundo ascenso ",color:"#BAC1C0"},{torneo:"ARGENLIGABZ2",mensaje:"PLAYOFF - Del 2° al 5° Playoffs por el segundo ascenso ",color:"#BAC1C0"},{torneo:"MUNDIAL",mensaje:"OCTAVOS DE FINAL - Los cuatro mejores 3° de los 6 grupos ",color:"#BAC1C0"}].filter(de=>de.torneo===O).map((de,le)=>i("tr",{className:"border border-dark",children:i("td",{className:"text-center",colSpan:10,style:{backgroundColor:de.color,fontSize:9},children:de.mensaje})},le)),G=[{torneo:"PRIMERAA",mensaje:"PLAYOFF - 9° al 16° COPA DE PLATA",color:"white"},{torneo:"PRIMERAB",mensaje:"DESCENSO DIRECTO",color:"#DE9090"},{torneo:"PRIMERABFEM",mensaje:"DESCENSO DIRECTO",color:"#DE9090"},{torneo:"PRIMERAAFEM",mensaje:"DESCENSO DIRECTO",color:"#DE9090"},{torneo:"PRIMERAC",mensaje:"DESCENSO DIRECTO",color:"#DE9090"},{torneo:"PRIMERAD1",mensaje:"DESAFILIACIÓN",color:"#DE9090"},{torneo:"PRIMERAD2",mensaje:"DESAFILIACIÓN",color:"#DE9090"},{torneo:"ARGENLIGAZ1",mensaje:"DESCENSO DIRECTO",color:"#DE9090"},{torneo:"ARGENLIGAZ2",mensaje:"DESCENSO DIRECTO",color:"#DE9090"},{torneo:"PRIMERACFEM",mensaje:"DESAFILIACIÓN",color:"#DE9090"},{torneo:"LNFS",mensaje:"DESCENSO DIRECTO",color:"#DE9090"}].filter(de=>de.torneo===O).map((de,le)=>i("tr",{className:"border border-dark",children:i("td",{className:"text-center",colSpan:10,style:{backgroundColor:de.color,fontSize:9},children:de.mensaje})},le)),j=[{torneo:"PRIMERAA",mensaje:"DESCENSO DIRECTO - En caso de igualdad en pts, se define partido desempate",color:"#DE9090"},{torneo:"ARGENLIGABZ1",mensaje:`Afiliados AFA (Los Andes-Colegiales- Brown (A) - Ctro Español) El mejor posicionado clasificará a la D de AFA. `,color:"#9370DB",colorFuente:"white"},{torneo:"ARGENLIGABZ2",mensaje:`Afiliados AFA (Ituzaingo-Temperley-Alte Brown - J Unida (SM) ) - El mejor posicionado clasificará a la D de AFA. `,color:"#9370DB",colorFuente:"white"}].filter(de=>de.torneo===O).map((de,le)=>i("tr",{className:"border border-dark",children:i("td",{className:"text-center",colSpan:10,style:{backgroundColor:de.color,fontSize:10,color:de.colorFuente,whiteSpace:"normal"},children:de.mensaje.split(` `).map((Oe,Ke)=>p("span",{children:[Oe,i("br",{})]},Ke))})},le)),U=de=>{const le=n.find(Oe=>Oe.nombre===de);return le?le.escudos:""},L=de=>de.goleslocal>de.golesvisitante?de.equipolocal:de.golesvisitante>de.goleslocal?de.equipovisitante:"empate",K=de=>!!r.find(Oe=>(Oe.equipolocal===de||Oe.equipovisitante===de)&&Oe.estado==="Jugandose"&&L(Oe)===de),Y=de=>!!r.find(Oe=>(Oe.equipolocal===de||Oe.equipovisitante===de)&&Oe.estado==="Jugandose"&&L(Oe)!==de&&L(Oe)!=="empate"),te=de=>!!r.find(Oe=>(Oe.equipolocal===de||Oe.equipovisitante===de)&&Oe.estado==="Jugandose"&&L(Oe)==="empate"),[J,Q]=C.useState(!1),[oe,pe]=C.useState(!1);C.useEffect(()=>{const de=()=>{window.scrollY>50&&!oe&&Q(!0)};return window.addEventListener("scroll",de),()=>{window.removeEventListener("scroll",de)}},[oe]);const ye=de=>{const le=n.find(Oe=>Oe.nombre===de&&["Afa","Argenliga","Laamba"].includes(Oe.organizador));le?(o(le),f(!0),l(!0)):console.log(`No se encontró el equipo ${de} o no pertenece a los organizadores permitidos.`)},Pe=()=>{l(!1),o(null)},Me=()=>{f(!1)},He=de=>{if(!de)return"Sin cargar";let le;if(de.includes("/")){const[It,wn,me]=de.split("/");le=new Date(`${me}-${wn}-${It}`)}else le=new Date(de);if(isNaN(le))return"Sin cargar";const Oe=le.getDate(),Ke=le.getMonth()+1,it=le.getFullYear();return`${Oe}/${Ke}/${it}`},ie=de=>{if(!de)return null;let le;if(de.includes("/")){const[it,It,wn]=de.split("/");le=new Date(`${wn}-${It}-${it}`)}else le=new Date(de);if(isNaN(le))return null;const Oe=new Date().getFullYear(),Ke=le.getFullYear();return Oe-Ke};return C.useEffect(()=>{d(!0);const de=setTimeout(()=>d(!1),2e3);return()=>clearTimeout(de)},[]),p(ee,{children:[i(ae,{children:i(V,{children:p($,{xs:12,md:12,children:[O!=="COPAAMERICA"?i("h2",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"TABLA DE PUNTOS"}):"",p(Ie,{responsive:!0,size:"sm",className:"",children:[p("thead",{children:[i("tr",{children:p("td",{className:"text-center text-white border border-dark fw-bolder",colSpan:10,style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[b," ",P," ",b]})}),p("tr",{style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:[i("th",{className:"text-center text-white",colSpan:1,children:"#"}),i("th",{className:"text-center anchoPosiciones text-white",children:"Equipo"}),i("th",{className:"text-center anchoPosiciones text-white",children:"Pts."}),i("th",{className:"text-center anchoPosiciones text-white",children:"PJ"}),i("th",{className:"text-center anchoPosiciones text-white",children:"PG"}),i("th",{className:"text-center anchoPosiciones text-white",children:"PE"}),i("th",{className:"text-center anchoPosiciones text-white",children:"PP"}),i("th",{className:"text-center anchoPosiciones text-white",children:"GF"}),i("th",{className:"text-center anchoPosiciones text-white",children:"GC"}),i("th",{className:"text-center anchoPosiciones text-white",children:"Dif"})]})]}),p("tbody",{style:{backgroundColor:"#ffff",color:"black",fontWeight:"700",fontFamily:"Roboto Condensed, sans-serif"},children:[R.map((de,le)=>p("tr",{children:[i("th",{className:"border border-dark text-dark text-center col-1",scope:"row",style:(O==="ARGENLIGAZ1"||O==="ARGENLIGAZ2")&&(de[0]==="Puerto Nvo"||de[0]==="Estudiantes (Lp)"||de[0]==="Sp Italiano"||de[0]==="Temperley")?{backgroundColor:"#9370DB"}:O==="PRIMERAA"?le<=7?{backgroundColor:"#B8F7A6"}:le===R.length-1||le===16?{backgroundColor:"#DE9090"}:{}:O==="PRIMERAB"?le===0?{backgroundColor:"#B8F7A6"}:le>=1&&le<=8?{backgroundColor:"#BAC1C0"}:le===16||le===17?{backgroundColor:"#DE9090"}:{}:O==="PRIMERAC"?le===0?{backgroundColor:"#B8F7A6"}:le>=1&&le<=8?{backgroundColor:"#BAC1C0"}:le===15||le===16||le===17?{backgroundColor:"#DE9090"}:{}:O==="PRIMERAD1"||O==="PRIMERAD2"?le===0?{backgroundColor:"#B8F7A6"}:le>=1&&le<=4?{backgroundColor:"#BAC1C0"}:le>=10&&le<=16?{backgroundColor:"#DE9090"}:{}:O==="COPAAMERICA"?le<2?{backgroundColor:"#B8F7A6"}:{}:O==="LNFA"?le<2?{backgroundColor:"#B8F7A6"}:{}:O==="ARGENLIGAZ1"||O==="ARGENLIGAZ2"?le<2?{backgroundColor:"#B8F7A6"}:le>=2&&le<=5?{backgroundColor:"#BAC1C0"}:le===11||le===12||le===13?{backgroundColor:"#DE9090"}:{}:O==="COPADEPLATA"?le===0?{backgroundColor:"#B8F7A6"}:{}:O==="INTEGRACION"?le<=1?{backgroundColor:"#B8F7A6"}:{}:O==="AufPRIMERA"?le<=7?{backgroundColor:"#B8F7A6"}:le>=8?{backgroundColor:"#227DE1"}:{}:O==="CONCACAF"?le<2?{backgroundColor:"#B8F7A6"}:le>=2&&le<3?{backgroundColor:"#BAC1C0"}:{}:O==="PRIMERAAFEM"?le<=7?{backgroundColor:"#B8F7A6"}:le===13||le===14?{backgroundColor:"#DE9090"}:{}:O==="PRIMERABFEM"?le>0&&le<=8?{backgroundColor:"#BAC1C0"}:le===14||le===15?{backgroundColor:"#DE9090"}:le===0?{backgroundColor:"#B8F7A6"}:{}:O==="LAAMBA"?le===0?{backgroundColor:"#B8F7A6"}:{}:O==="LAAMBAFEM"?le===0?{backgroundColor:"#B8F7A6"}:{}:O==="LIBERTADORES"||O==="MUNDIAL"?le<2?{backgroundColor:"#B8F7A6"}:le===2?{backgroundColor:"#BAC1C0"}:{}:O==="LIBERTADORESFEM"?le<2?{backgroundColor:"#B8F7A6"}:{}:O==="COPAAFRICA"?le<2?{backgroundColor:"#B8F7A6"}:{}:O==="COPAASIA"?le<2?{backgroundColor:"#B8F7A6"}:{}:O==="ARGENLIGABZ1"||O==="ARGENLIGABZ2"?le===0?{backgroundColor:"#B8F7A6"}:le>=1&&le<=4?{backgroundColor:"#BAC1C0"}:{}:O==="PRIMERACFEM"?le===0?{backgroundColor:"#B8F7A6"}:le>=1&&le<=8?{backgroundColor:"#BAC1C0"}:le===9||le===10||le===11||le===12?{backgroundColor:"#DE9090"}:{}:O==="LNFS"?le<=7?{backgroundColor:"#B8F7A6"}:le===14||le===15?{backgroundColor:"#DE9090"}:{}:{},children:p("span",{style:{fontSize:12},children:[" ",le+1," "]})}),i("th",{className:"border border-dark",children:p("td",{className:"d-flex align-items-center ",style:{border:"none",outline:"none"},children:[i("img",{className:"me-1",src:U(de[0]),alt:`${de[0]} escudo`,style:{width:"15px",height:"15px"}}),i(oL,{placement:"top",show:c&&le===2&&["Afa","Argenliga","Laamba"].includes(y)&&O!=="PRIMERAAFEM"&&O!=="PRIMERABFEM"&&O!=="PRIMERACFEM",overlay:i(jW,{id:`tooltip-top-${le}`,style:{color:"white",fontFamily:"Roboto Condensed, sans-serif"},children:"Ahora podes ver el detalle de cada equipo"}),children:p("span",{className:"fontPosiciones fuenteEquiposTabla",onClick:()=>ye(de[0]),style:{cursor:"pointer"},children:[de[0],K(de[0])?i(pd,{style:{color:"green"}}):Y(de[0])?i(pd,{style:{color:"red"}}):te(de[0])?i(pd,{style:{color:"gray"}}):null]})},le)]})}),i("td",{className:" border border-dark text-center",style:{fontSize:14,fontWeight:700},children:de[1]}),p("td",{className:" border border-dark text-center",style:{fontSize:12,color:"#330"},children:[E[de[0]]," "]}),i("td",{className:" border border-dark text-center",style:{fontSize:12,color:"#330"},children:S[de[0]]||0}),i("td",{className:" border border-dark text-center",style:{fontSize:12,color:"#330"},children:w[de[0]]||0}),i("td",{className:" border border-dark text-center",style:{fontSize:12,color:"#330"},children:_[de[0]]||0}),i("td",{className:" border border-dark text-center",style:{fontSize:12,color:"#330"},children:h[de[0]]||0}),i("td",{className:" border border-dark text-center",style:{fontSize:12,color:"#330"},children:m[de[0]]||0}),i("td",{className:" border border-dark text-center",style:{fontSize:12,color:"#330"},children:A[de[0]]||0})]},de[0])),I,q,G,j]})]})]})})}),i("div",{className:"banner",children:i("a",{href:"/premiossegundopalo",rel:"noreferrer",style:{width:"100%",height:"auto"},children:i("img",{src:eve,alt:"BajoTabla",style:{width:"100%",height:"auto"}})})}),i("div",{style:{display:" flex",justifyContent:"center",marginBottom:"50px"},children:p(Ut,{show:a,onHide:Pe,style:{fontFamily:"Roboto Condensed, sans-serif",marginTop:"50px"},children:[i(Ut.Body,{children:s&&p("div",{className:"equipo-detalles",children:[p("div",{className:"detalles-centrados",children:[i("h3",{children:s.nombre||"Sin datos"}),i("img",{src:s.escudos||"ruta/por/defecto.png",alt:`${s.nombre||"Sin datos"} escudo`,style:{width:"50px",height:"50px"}}),p("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[p("p",{children:[i("strong",{children:"Fundado:"}),s.fundado?`${He(s.fundado)} (${ie(s.fundado)} años)`:"Sin datos"]}),s.ingresoAfa&&p("p",{children:[i("strong",{children:"Ingreso Afa:"})," ",s.ingresoAfa]})]}),i(Phe,{nombreEquipo:s.nombre}),i(Qe,{variant:"success",className:"mb-2 mt-3 btn-sm",onClick:()=>{const de=`Hola, me gustaría proporcionar más información sobre ${s.nombre||"Sin datos"} : - Fundado: ${s.fundado?He(s.fundado):"Sin datos"} - Ingreso AFA: ${s.ingresoAfa||"Sin datos"} - Dirección: ${s.direccion||"Sin datos"} - Teléfono: ${s.telefono||"Sin datos"} - Habilitada por AFA: ${s.canchaHabiltada||"Sin datos"} - Quiero agregar o aclarar que: `,le=`https://wa.me/5491154782712?text=${encodeURIComponent(de)}`;window.open(le,"_blank")},children:"Ayudanos a completar todos los datos."})]}),i("div",{}),p("div",{className:"detalles-oscurecidos",children:[p("p",{children:[i("strong",{children:"Dirección:"})," ",s.direccion||"Sin datos"]}),p("p",{children:[i("strong",{children:"Teléfono:"})," ",s.telefono||"Sin datos"]}),s.fotoCancha?p(ee,{children:[u&&i("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"200px"},children:i(Ee,{animation:"border",color:"white"})}),i("img",{src:s.fotoCancha,alt:`Foto de la cancha de ${s.nombre||"Sin datos"}`,style:{width:"100%",height:"auto",display:u?"none":"block"},onLoad:Me})]}):i("p",{}),p("p",{className:"mt-2",children:[i("strong",{children:"Estadio Habilitado:"}),s.canchaHabiltada==="Si"?" Si":s.canchaHabiltada==="No"?"No":"Sin datos"]}),i("p",{style:{fontSize:"10px"},children:"** SIN DATOS ** Nos encontramos recopilando toda la información."})]})]})}),i("div",{style:{display:"flex",justifyContent:"center",fontSize:"11px",flexDirection:"column",alignItems:"center"},children:i("p",{children:"Podes enviarnos más datos de tu club a info@segundopalo.com.ar."})}),i(Ut.Footer,{className:"mb-5",children:i(Qe,{variant:"secondary",onClick:Pe,children:"Cerrar"})})]})})]})},tve="/assets/et500-966e4492.png",nve="/assets/et1000-acccbdcd.png",rve="/assets/et3000-8a1a7929.png",sve="/assets/et5000-85b89791.png",e1=[{img:tve,link:"https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_plan_id=2c9380848e681d84018e773f963407dd"},{img:nve,link:"https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_plan_id=2c9380848e681dc9018e6b4b0ff80123"},{img:rve,link:"https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_plan_id=2c9380848e681dc9018e77401cba0826"},{img:sve,link:"https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_plan_id=2c93808491eb5f1c019202d616420742"}],ove=()=>{const[t,e]=C.useState(0),n=C.useRef(null),r=C.useRef(!1),s=C.useRef(0),o=C.useRef(0);return C.useEffect(()=>{const f=setInterval(()=>{e(g=>(g+1)%e1.length)},9e3);return()=>clearInterval(f)},[]),C.useEffect(()=>{n.current&&(n.current.scrollLeft=t*n.current.clientWidth)},[t]),i("div",{className:"slider-container",onClick:()=>{window.open(e1[t].link,"_blank")},style:{overflow:"hidden",cursor:"pointer",position:"relative",zIndex:1},children:i("div",{ref:n,className:"slider",onMouseDown:f=>{r.current=!0,s.current=f.pageX-n.current.offsetLeft,o.current=n.current.scrollLeft},onMouseLeave:()=>{r.current=!1},onMouseUp:()=>{r.current=!1},onMouseMove:f=>{if(!r.current)return;f.preventDefault();const E=(f.pageX-n.current.offsetLeft-s.current)*3;n.current.scrollLeft=o.current-E},style:{display:"flex",transition:"scroll-left 0.5s ease-in-out",overflowX:"scroll",cursor:r.current?"grabbing":"grab",width:"100%"},children:e1.map((f,g)=>i("div",{className:"slide",style:{flex:"0 0 auto",width:"100%",marginRight:"10px"},children:i("img",{src:f.img,alt:` ${g}`,style:{width:"100%",height:"70px",borderRadius:"5px",border:"2px solid #000"}})},g))})})},Tn=({dataFixture:t,dataEquipos:e,canalesTv:n})=>{const r=e||[],s=t||[],o=n||[],[a,l]=C.useState([]);C.useEffect(()=>{for(let m=s.length;m>=1;m--)if(s.filter(k=>k.jornada===m&&k.estado==="Jugandose").length>0){l(m);return}let _=null,h=null;for(let m=1;m<=s.length;m++){const A=s.filter(k=>k.jornada===m&&k.estado==="Pendiente"&&k.fecha!==null);if(A.length>0){const k=Math.min(...A.map(R=>new Date(R.fecha)));(h===null||k<h)&&(h=k,_=m)}}if(_!==null){l(_);return}for(let m=s.length;m>=1;m--)if(s.filter(k=>k.jornada===m&&k.estado==="Finalizado").length>0){l(m);return}l(1)},[s]);const c=s.reduce((_,h)=>{const m=h.jornada,A=h.fecha,k=h.equipolocal,R=h.equipovisitante;return _[m]=_[m]||{},_[m][A]=_[m][A]||{partidos:[]},_[m][A].partidos.push({...h,equipoLocal:k,equipoVisitante:R}),_},{}),d=()=>{c[a+1]&&l(a+1)},u=()=>{c[a-1]&&l(a-1)},f=(_,h)=>{g("/videos",{state:{url:_,data:h}})},g=Rt(),S=Object.keys(c).map((_,h)=>i(Qe,{variant:"dark",size:"sm",onClick:()=>l(Number(_)),style:{width:5,borderRadius:5,borderColor:"transparent",fontFamily:"Roboto Condensed, sans-serif",fontSize:10,display:"flex",justifyContent:"center",alignItems:"center",margin:2,backgroundColor:Number(_)===a?"gray":"#001c31",color:"white"},children:i("span",{className:"fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:`${_}`})},h)),w=new Set;return i(ee,{children:p(ae,{className:"",children:[i(V,{className:"justify-content-center ",style:{backgroundColor:"transparent"},children:S}),i(V,{className:"mt-3 mb-1",style:{backgroundColor:"#001c31",height:"50px"},children:p("div",{className:"d-flex justify-content-between",style:{alignItems:"center"},children:[i(qb,{onClick:u,style:{cursor:"pointer",fontSize:25,color:"white"}}),p("p",{className:"fw-bolder text-white",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:20},children:["Fecha ",a]}),i(zb,{variant:"primary",onClick:d,style:{cursor:"pointer",fontSize:25,color:"white"}})]})}),i(V,{children:i($,{className:"d-flex justify-content-center mt-2 mb-1",children:i(ove,{})})}),i(V,{children:i($,{children:p(Ie,{size:"sm",responsive:!0,bordered:!0,className:"border-dark",children:[i("thead",{children:p("tr",{style:{backgroundColor:"#001c31"},children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{children:Object.keys(c).length<=5?i(ee,{children:i("tr",{children:i("td",{colSpan:"6",className:"text-center",children:i("span",{className:"fw-bolder",style:{fontSize:14,fontFamily:"Roboto Condensed, sans-serif"},children:"Proximamente fixture"})})})}):i(ee,{children:Object.keys(c).map(_=>_!==a.toString()?null:Object.keys(c[_]).sort().map(h=>p(Fe.Fragment,{children:[i("tr",{className:"text-center text-white fw-bolder fuenteEquipos",style:{backgroundColor:"#001c31"},children:i("td",{colSpan:"6",style:{fontFamily:"Roboto Condensed, sans-serif"},children:`${h&&se(h).isValid()?se(h).format("dddd D [de] MMMM").charAt(0).toUpperCase()+se(h).format("dddd D [de] MMMM").slice(1):"A confirmar"}`})}),c[_][h].partidos.sort((m,A)=>{const k=new Date(`1970-01-01T${m.hora}Z`),R=new Date(`1970-01-01T${A.hora}Z`);return k-R}).map(m=>{var I,T;let A,k;r.forEach(q=>{q.nombre===m.equipoLocal&&(A=q.escudos),q.nombre===m.equipoVisitante&&(k=q.escudos)});const R=m.estado==="Finalizado"?"#001c31":m.estado==="Pendiente"?"#dfe3e5":m.estado==="Jugandose"?"#dc3545":m.estado==="Suspendido"?"#e84118":m.estado==="Postergado"?"#fbc531":m.estado==="Parcial"?"#dfe3e5":null,O=m.estado==="Finalizado"?"white":m.estado==="Pendiente"?"black":m.estado==="Jugandose"||m.estado==="Suspendido"?"white":m.estado==="Postergado"||m.estado==="Parcial"?"black":null,N=m.hora,y=se(N,"HH:mm:ss").format("HH:mm"),v=m.estado==="Finalizado"?"Final":m.estado==="Pendiente"&&m.hora===null?"A conf.":m.estado==="Pendiente"&&y!==null?y:m.estado==="Jugandose"?m.tiempodelpartido:m.estado==="Suspendido"?"Susp":m.estado==="Parcial"?"Parc":m.estado==="Postergado"?"Post":"",b=m.transmision,P=o.find(q=>q.idTv===b),F=P?P.logo:null;return p(ee,{children:[p("tr",{children:[i("td",{className:"text-center fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:R,color:O},children:p("div",{className:"d-flex justify-content-center",style:{flexDirection:"column"},children:[p("span",{style:{fontSize:10},children:[v,F!==null&&(m.estado==="Pendiente"||m.estado==="Jugandose")?i("img",{src:F,alt:"Logo del canal",style:{width:"15px",height:"15px"}}):null]}),i("span",{style:{fontSize:8},children:m.estado==="Pendiente"&&m.estado!==null?m.estadio:""}),i("span",{style:{fontSize:8},children:m.motivossuspension!==null&&m.estado==="Suspendido"?`(${m.motivossuspension})`:null}),i("span",{style:{fontSize:8},children:m.motivopostergacion!==null&&m.estado==="Postergado"?`(${m.motivopostergacion})`:null})]})}),p("div",{className:"d-flex justify-content-center bg-white",style:{flexDirection:"column",alignContent:"center",alignItems:"center"},children:[i("img",{className:"me-1",src:A,alt:"escudo equipo",style:{width:"15px",height:"15px",borderRadius:"50%",margin:"0"}}),i("td",{className:"text-center fuenteEquipos fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif"},children:m.equipoLocal})]}),i("td",{className:"text-center fuenteEquipos fw-bolder bg-white",style:{fontFamily:"Roboto Condensed, sans-serif"},children:m.estado==="Finalizado"||m.estado==="Jugandose"||m.estado==="Suspendido"?m.goleslocal:""}),i("td",{className:"text-center fuenteEquipos fw-bolder bg-white",style:{fontFamily:"Roboto Condensed, sans-serif"},children:m.estado==="Finalizado"||m.estado==="Jugandose"||m.estado==="Suspendido"?m.golesvisitante:""}),p("div",{className:"d-flex justify-content-center bg-white",style:{flexDirection:"column",alignContent:"center",alignItems:"center"},children:[i("img",{className:"me-1",src:k,alt:"escudo equipo",style:{width:"15px",height:"15px",borderRadius:"50%",margin:"0"}}),i("td",{className:"text-center fuenteEquipos fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif"},children:m.equipovisitante})]}),p("td",{style:{backgroundColor:"#dfe3e5",textAlign:"center"},children:[m.linkgoles===""||m.linkgoles===null?null:i("a",{style:{cursor:"pointer"},onClick:()=>{var q,W;f(m.linkgoles,{id:m.id,estado:m.estado,equipolocal:m.equipolocal,equipovisitante:m.equipovisitante,goleslocal:m.goleslocal,penaleslocal:m.penaleslocal,penalesvisitante:m.penalesvisitante,golesvisitante:m.golesvisitante,escudoLocal:A,escudoVisitante:k,tiempodelpartido:m.tiempodelpartido,hora:y,goleadoresLocal:m.goleadoresLocal,goleadoresVisitante:m.goleadoresVisitante,estadio:m.estadio,transmision:(q=n.find(G=>G.idTv===m.transmision))==null?void 0:q.nombre,imgCanalTv:(W=n.find(G=>G.idTv===m.transmision))==null?void 0:W.logo}),window.scrollTo({top:0,behavior:"smooth"}),window.location.reload()},className:"text-white",children:i(Tt,{style:{fontSize:"15px",color:"black"}})}),m.linkvivo===""||m.linkvivo===null?null:i("a",{style:{cursor:"pointer"},onClick:()=>{var q,W;f(m.linkvivo,{id:m.id,estado:m.estado,equipolocal:m.equipolocal,equipovisitante:m.equipovisitante,goleslocal:m.goleslocal,penaleslocal:m.penaleslocal,penalesvisitante:m.penalesvisitante,golesvisitante:m.golesvisitante,escudoLocal:A,escudoVisitante:k,tiempodelpartido:m.tiempodelpartido,hora:y,fecha:m.fecha,goleadoresLocal:m.goleadoresLocal,goleadoresVisitante:m.goleadoresVisitante,estadio:m.estadio,transmision:(q=n.find(G=>G.idTv===m.transmision))==null?void 0:q.nombre,imgCanalTv:(W=n.find(G=>G.idTv===m.transmision))==null?void 0:W.logo}),window.scrollTo({top:0,behavior:"smooth"}),window.location.reload()},className:"text-white",children:i(Ya,{style:{fontSize:"17px",color:"red"}})})]})]},m.id),(m.goleadoresLocal||m.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(I=m.goleadoresLocal)==null?void 0:I.split(",").map((q,W)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[W>0&&"-",q.trim().slice(0,-1)]},W))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(T=m.goleadoresVisitante)==null?void 0:T.split(",").map((q,W)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[W>0&&"-",q.trim().slice(0,-1)]},W))})})]})]})})]},h)))})}),Object.keys(c).map(_=>_!==a.toString()?null:Object.keys(c[_]).sort().map(h=>i("tfoot",{children:c[_][h].partidos.sort((m,A)=>{}).map(m=>m.libre&&i("tr",{children:i("td",{colSpan:"6",className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",color:"white"},children:i("span",{style:{fontSize:12},children:p("span",{style:{fontWeight:"bold"},children:["Libre: ",m.libre]})})})}))}))),Object.keys(c).map(_=>_!==a.toString()?null:Object.keys(c[_]).sort().map(h=>i("tfoot",{children:c[_][h].partidos.sort((m,A)=>{}).map(m=>m.resolucion&&i("tr",{children:i("td",{colSpan:"6",className:"text-center ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"white",color:"white"},children:i("span",{style:{fontSize:10},children:p("span",{className:"text-dark",style:{fontWeight:"bold"},children:[" ",m.equipolocal," vs ",m.equipovisitante," (",m.resolucion,")"]})})})}))})))]})})}),!!a&&i(V,{style:{backgroundColor:"#001c31"},children:p($,{className:" d-flex justify-content-center",style:{flexDirection:"column"},children:[i("p",{className:"fw-bolder text-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:13},children:"Estadisticas fecha"}),p("p",{className:"fw-bolder text-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:13,marginRight:7},children:["Total de Goles:"," ",Object.keys(c[a]||{}).reduce((_,h)=>{const m=c[a][h].partidos;return _+m.reduce((A,k)=>A+k.goleslocal+k.golesvisitante,0)},0)]}),p("div",{className:"d-flex justify-content-center",children:[p("p",{className:"fw-bolder text-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:13,marginRight:7},children:["Goles locales:"," ",Object.keys(c[a]||{}).reduce((_,h)=>{const m=c[a][h].partidos;return _+m.reduce((A,k)=>A+k.goleslocal,0)},0)]}),p("p",{className:"fw-bolder text-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:13},children:["- Goles Visitante:"," ",Object.keys(c[a]||{}).reduce((_,h)=>{const m=c[a][h].partidos;return _+m.reduce((A,k)=>A+k.golesvisitante,0)},0)]})]}),p("div",{className:"d-flex justify-content-center",children:[p("p",{className:"fw-bolder text-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:13},children:["Vict. locales:"," ",Object.keys(c[a]||{}).reduce((_,h)=>{const m=c[a][h].partidos;return _+m.reduce((A,k)=>A+(k.goleslocal>k.golesvisitante&&k.estado==="Finalizado"?1:0),0)},0)]}),p("p",{className:"fw-bolder text-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:13},children:["- Vict. visitantes:"," ",Object.keys(c[a]||{}).reduce((_,h)=>{const m=c[a][h].partidos;return _+m.reduce((A,k)=>A+(k.golesvisitante>k.goleslocal&&k.estado==="Finalizado"?1:0),0)},0)]}),p("p",{className:"fw-bolder text-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:13},children:["- Empates:"," ",Object.keys(c[a]||{}).reduce((_,h)=>{const m=c[a][h].partidos;return _+m.reduce((A,k)=>A+(k.goleslocal===k.golesvisitante&&k.estado==="Finalizado"?1:0),0)},0)]})]})]})}),!!a&&i(ee,{children:Object.keys(c[a]||{}).some(_=>c[a][_].partidos.some(h=>n.some(m=>m.idTv===h.transmision)))&&p(ee,{children:[i(V,{style:{backgroundColor:"#001c31"},children:i($,{className:"d-flex justify-content-center",style:{flexDirection:"row",alignItems:"stretch"},children:i("p",{className:"fw-bolder text-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:13},children:"Canales streaming"})})}),i(V,{style:{backgroundColor:"white"},children:i($,{className:"d-flex justify-content-start",style:{alignItems:"stretch"},children:Object.keys(c[a]||{}).map(_=>i(ee,{children:c[a][_].partidos.map(h=>{if(!w.has(h.transmision)){w.add(h.transmision);const m=n.find(A=>A.idTv===h.transmision);if(m)return i(ee,{children:i("div",{className:"d-flex flex-wrap text-white",children:p("span",{className:"fw-bolder text-dark text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[i("img",{src:m.logo,alt:"Logo del canal",style:{width:"10px",height:"10px"}}),m.nombre]})},m.idTv)})}return null})}))})})]})})]})})},Fo=({dataEquipos:t,dataFixture:e,canalesTvPlayoff:n})=>{var O;const[r,s]=C.useState(!0),[o,a]=C.useState([]),[l,c]=C.useState([]),[d,u]=C.useState([]),[f,g]=C.useState([]),E=e||[];C.useEffect(()=>{c(t),u(n),a(S(e)),s(!1)},[t,e]);const S=N=>{const y={};N.forEach(b=>{const P=b.faseCopas,F=b.llavePlayOff;y[P]||(y[P]={}),y[P][F]||(y[P][F]=[]),y[P][F].push(b)});const v={};return Object.keys(y).sort().forEach(b=>{v[b]={};const P=["Ida","Vuelta","Tercer partido"];Object.keys(y[b]).sort().forEach(F=>{y[b][F].sort((I,T)=>P.indexOf(I.partidoPlayOff)-P.indexOf(T.partidoPlayOff)),v[b][F]=y[b][F]})}),v},w=S(E),_=Object.fromEntries(Object.entries(w).map(([N,y])=>{const v=Object.fromEntries(Object.entries(y).map(([b,P])=>{const F=P.filter(I=>I.equipolocal!=="A conf"||I.equipovisitante!=="A conf");return[b,F]}).filter(([b,P])=>P.length>0));return[N,v]}).filter(([N,y])=>Object.keys(y).length>0)),h=(N,y)=>{m("/videos",{state:{url:N,data:y}})},m=Rt(),A=["Final","3 puesto","Semi final","Cuartos de final","Octavos de final","16avos","32avos","5 puesto","7 puesto","5 a 8 puesto","9 puesto","11 puesto","2° Fase","1° Fase"],k=(O=E[0])==null?void 0:O.torneo;return p(ae,{className:"anchoPlayoff",children:[i("div",{className:"d-flex justify-content-center tituloPartidosDia",style:{height:"auto",backgroundColor:"#001c31",alignItems:"center"},children:i(V,{children:i($,{children:i("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"PLAYOFFS"})})})}),i(V,{className:"",children:i($,{children:i("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"10px"},children:k==="PLAYOFF"?i("p",{children:"Las instancias de Cuartos de Final , Semifinales y Final, se operarán conforme al siguiente detalle: Al mejor de tres (3) partidos, ejerciendo la condición de local en los primeros y terceros partidos, el equipo mejor ubicado en la Tabla Final de Posiciones de la Fase “Regular” 2023.Todos los partidos deben tener un ganador, en caso que alguno de estos tres partidos resulte empatado, se ejecutarán tiros libres desde el punto penal, hasta determinar un ganador del mismo partido. Avanzarán a la siguiente ronda, los equipos que ganen dos (2) de los tres (3) partidos de la serie."}):k==="PLAYOFFB"?p(ee,{children:[" ",i("p",{children:"Las instancias de Cuartos de Final y Semifinales, se disputarán a dos partidos, actuando de local en los segundos partidos, el equipo mejor ubicado en la Tabla Anual. Si al término de los segundos partidos, la cantidad de puntos y la diferencia de goles resultaran igualadas, el equipo mejor ubicado en la Tabla Anual , pasará a la instancia siguiente. "}),i("p",{children:"Final: Los dos ganadores de las semifinales se enfrentarán a doble partido, local y visitante actuando como local en el segundo encuentro el equipo mejor ubicado en la Tabla Final de Posiciones del Torneo de Primera División “B” 2023. Si al término del segundo partido, la cantidad de puntos y la diferencia de goles resultaran igualadas, la definición se operará mediante la disputa de un tiempo suplementario de diez (10) minutos, dividido en dos períodos de (5) minutos y, en caso de subsistir la igualdad, ejecución de tiros desde el punto penal."})]}):k==="PLAYOFFD"?p(ee,{children:[i("p",{children:"Cuartos de Final: esta instancia la disputarán los equipos ubicados en el 2°, 3°, 4° y 5° puesto de cada una de las Zonas (“Z1” y “Z2”). Esta instancia se disputará a doble partido, local y visitante, actuando como local en los segundos encuentros los equipos ubicados en el 2° y 3° puesto en la Tabla Final de Posiciones del Torneo de Primera División “D” 2024 de cada una de las Zonas (“Z1” y “Z2”)."}),"Si al término de los segundos partidos, la cantidad de puntos y la diferencia de goles resultaran igualadas, la definición se operará mediante la ejecución de tiros desde el punto penal.",i("p",{children:"Semifinales y Final:Esta instancia se disputará a doble partido, local y visitante, actuando como local en los segundos encuentros los equipos mejor ubicados en la Tabla Final. Si al término de los segundos partidos, la cantidad de puntos y la diferencia de goles resultaran igualadas, la definición se operará mediante la ejecución de tiros desde el punto penal."})]}):k==="PLAYOFFARGENLIGAZ1"||k==="PLAYOFFARGENLIGAZ2"?p(ee,{children:[i("p",{children:"Semifinal: Se disputará a partido único en cancha neutral. Si al término del partido, la diferencia de goles resultaran igualadas, pasará a la instancia siguiente el equipo mejor ubicado en la Tabla de posiciones."}),i("p",{children:"Final:Esta instancia se disputará a partido único en cancha neutral. Si al término del partido, la diferencia de goles resultaran igualadas, la definicion se operara mediante la disputa de un tiempo suplemenntario de (10) minutos en dos periodos de (5) minutos y en caso de subsistir la igualdad, se ejecutarán tiros desde el punto del penal para definir al ganador."})]}):k==="PLAYOFFARGENLIGABZ1"||k==="PLAYOFFARGENLIGABZ2"?p(ee,{children:[i("p",{children:"Semifinal: Se disputará a partido único en cancha neutral. Si al término del partido, la diferencia de goles resultaran igualadas, pasará a la instancia siguiente el equipo mejor ubicado en la Tabla de posiciones."}),i("p",{children:"Final:Esta instancia se disputará a partido único en cancha neutral. Si al término del partido, la diferencia de goles resultaran igualadas, la definicion se operara mediante la disputa de un tiempo suplemenntario de (10) minutos en dos periodos de (5) minutos y en caso de subsistir la igualdad, se ejecutarán tiros desde el punto del penal para definir al ganador."})]}):k==="PLAYOFFBFEM"?p(ee,{children:[i("p",{children:"Las instancias de Cuartos de Final y Semifinales se disputarán a doble partido, local y visitante, actuando como local en el segundo encuentro el equipo mejor ubicado en la Tabla Final de Posiciones del Torneo de Primera División “B” 2024. Si al término de los segundos partidos, la cantidad de puntos y la diferencia de goles resultaran igualadas, el equipo mejor ubicado en la Tabla Final de Posiciones del Torneo de Primera División “B” 2024, pasará a la instancia siguiente."}),i("p",{children:"Los dos equipos que lleguen a la FINAL obtendrán el derecho de ascender a la Primera División."}),i("p",{children:"Final: Los dos ganadores de las semifinales se enfrentarán a doble partido, local y visitante actuando como local en el segundo encuentro el equipo mejor ubicado en la Tabla Final de Posiciones del Torneo de Primera División “B” 2024. Si al término del segundo partido, la cantidad de puntos y la diferencia de goles resultaran igualadas, la definición se operará mediante la disputa de un tiempo suplementario de diez (10) minutos, dividido en dos períodos de (5) minutos y, en caso de subsistir la igualdad, ejecución de tiros desde el punto penal."})]}):k==="PLAYOFFCFEM"?p(ee,{children:[i("p",{}),i("p",{children:"Las instancias de Cuartos de Final y Semifinales se disputarán a doble partido, local y visitante, actuando como local en el segundo encuentro el equipo mejor ubicado en la Tabla Final de Posiciones del Torneo de Primera División “C” 2024. Si al término de los segundos partidos, la cantidad de puntos y la diferencia de goles resultaran igualadas, la definición se operará mediante la ejecución de tiros desde el punto penal. Los equipos vencedores de las Semifinales, obtendrán el derecho de ascender a la Primera División “B” Temporada 2025."}),i("p",{children:"Final: Los dos ganadores de las semifinales se enfrentarán a doble partido, local y visitante actuando como local en el segundo encuentro el equipo mejor ubicado en la Tabla Final de Posiciones del Torneo de Primera División “C” 2024. Si al término del segundo partido, la cantidad de puntos y la diferencia de goles resultaran igualadas, la definición se operará mediante la disputa de un tiempo suplementario de diez (10) minutos, dividido en dos períodos de (5) minutos y, en caso de subsistir la igualdad, ejecución de tiros desde el punto penal."})]}):k==="PLAYOFFC"?p(ee,{children:[i("p",{}),i("p",{children:"Las instancias de Cuartos de Final y Semifinales se disputarán a doble partido, local y visitante, actuando como local en el segundo encuentro el equipo mejor ubicado en la Tabla Final de Posiciones del Torneo de Primera División “C” 2024. Si al término de los segundos partidos, la cantidad de puntos y la diferencia de goles resultaran igualadas, el equipo mejor ubicado en la Tabla Final de Posiciones del Torneo de Primera División “C” 2024, pasará a la instancia siguiente."}),i("p",{children:"Final:Los dos ganadores de las semifinales se enfrentarán a doble partido, local y visitante actuando como local en el segundo encuentro el equipo mejor ubicado en la Tabla Final de Posiciones del Torneo de Primera División “C” 2024. Si al término del segundo partido, la cantidad de puntos y la diferencia de goles resultaran igualadas, la definición se operará mediante la disputa de un tiempo suplementario de diez (10) minutos, dividido en dos períodos de (5) minutos y, en caso de subsistir la igualdad, ejecución de tiros desde el punto penal."})]}):""})})}),Object.entries(_).sort((N,y)=>{const v=N[0],b=y[0],P=A.indexOf(v),F=A.indexOf(b);return P-F}).map(([N,y])=>i(ee,{children:p(ae,{className:" mt-1",children:[p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"18px"},children:[" ",N.toUpperCase()]}),i($,{children:Object.entries(y).map(([v,b])=>i(ee,{children:i($,{md:12,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{children:Array.isArray(b)&&b.map(P=>{var Y,te,J,Q,oe;const F=P.equipolocal,I=P.equipovisitante,T=P.transmision,q=Array.isArray(l)?(Y=l.find(pe=>pe.nombre===F))==null?void 0:Y.escudos:void 0,W=Array.isArray(l)?(te=l.find(pe=>pe.nombre===I))==null?void 0:te.escudos:void 0,G=(J=d.find(pe=>pe.idTv===T))==null?void 0:J.logo,H=P.hora?se(P.hora,"HH:mm:ss").format("HH:mm"):"A conf",j=f===P.id&&P.estado==="Jugandose"?"#dc3545":"white",U=f===P.id&&P.estado==="Jugandose"?"white":"black",L=se(P.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("DD/MM"),K=se(P.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("dddd").toUpperCase();return p(Fe.Fragment,{children:[P.fecha!==null?i("tr",{children:p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[K," ",L]})}):i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"FECHA Y HORA A CONFIRMAR"}),i("tr",{children:i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:P.partidoPlayOff})}),p("tr",{children:[P.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder",style:{fontSize:9,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):P.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",P.motivossuspension,")"]})]}):P.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:P.estado}):P.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Parc ",G&&i("img",{src:G,alt:T,style:{width:"20px",height:"20px"}})]}):P.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:[P.tiempodelpartido," ",G&&i("img",{src:G,alt:T,style:{width:"20px",height:"20px"}})]}):P.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[P.hora===""?i(ee,{children:"A conf"}):H," ",G&&i("img",{src:G,alt:T,style:{width:"20px",height:"20px"}}),i("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"}})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[q&&i("img",{src:q,alt:F,style:{width:"15px",height:"15px"}})," ",i("span",{style:{height:"auto"},children:F!==""?F:"A conf"})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:j,color:U,width:"auto"},children:[P.estado!=="Pendiente"?P.goleslocal:null,P.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+P.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:j,color:U},children:[P.estado!=="Pendiente"?P.golesvisitante:null,P.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+P.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[W&&i("img",{src:W,alt:I,style:{width:"15px",height:"15px"}})," ",p("span",{style:{height:"auto"},children:[" ",I!==""?I:"A conf"]})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[P.linkgoles===null||P.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(P.linkgoles,{id:P.id,estado:P.estado,equipolocal:P.equipolocal,equipovisitante:P.equipovisitante,goleslocal:P.goleslocal,penaleslocal:P.penaleslocal,penalesvisitante:P.penalesvisitante,golesvisitante:P.golesvisitante,escudoLocal:q,escudoVisitante:W,tiempodelpartido:P.tiempodelpartido,hora:H,fecha:P.fecha,goleadoresLocal:P.goleadoresLocal,goleadoresVisitante:P.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})}),P.linkvivo===null||P.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(P.linkvivo,{id:P.id,estado:P.estado,equipolocal:P.equipolocal,equipovisitante:P.equipovisitante,goleslocal:P.goleslocal,penaleslocal:P.penaleslocal,penalesvisitante:P.penalesvisitante,golesvisitante:P.golesvisitante,escudoLocal:q,escudoVisitante:W,tiempodelpartido:P.tiempodelpartido,hora:H,goleadoresLocal:P.goleadoresLocal,goleadoresVisitante:P.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Ya,{style:{fontSize:"19px",color:"red"}})})]})})]},P.id),(P.goleadoresLocal||P.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(Q=P.goleadoresLocal)==null?void 0:Q.split(",").map((pe,ye)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[ye>0&&"-",pe.trim().slice(0,-1)]},ye))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(oe=P.goleadoresVisitante)==null?void 0:oe.split(",").map((pe,ye)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[ye>0&&"-",pe.trim().slice(0,-1)]},ye))})})]})]},P.id)})})]})})}))},N)]})})),i(V,{})]})},ls=()=>i(ae,{className:" "}),cs=()=>(C.useEffect(()=>{const t=()=>{try{window.googletag.cmd.push(function(){window.googletag.display("554bd9f0-f9e9-4223-9d9b-98430719deb0")})}catch(n){console.error(n)}},e=setInterval(()=>{window.googletag&&window.googletag.cmd&&(t(),clearInterval(e))},100);return()=>clearInterval(e)},[]),i(ee,{})),nj=C.createContext();function nr(){return C.useContext(nj)}const ive=({children:t})=>{const[e,n]=C.useState(null),[r,s]=C.useState(!0),[o,a]=C.useState({}),[l,c]=C.useState(null),[d,u]=C.useState([]),[f,g]=C.useState([]),E=async()=>{try{const{data:S,error:w}=await z.from("Equipos").select("*").eq("genero","Masculino");w?console.error("Error",w):(g(S),u(S))}catch(S){console.error("Error mensaje",S.message)}};return C.useEffect(()=>{E()},[]),C.useEffect(()=>{(async()=>{s(!0);try{const w=z.auth.session();n((w==null?void 0:w.user)??null)}catch(w){console.error("Unexpected error fetching user",w)}finally{setTimeout(()=>{s(!1)},3e3)}})();try{z.auth.onAuthStateChange((w,_)=>{n((_==null?void 0:_.user)??null),c(_)})}catch(w){console.error("Unexpected error on auth state change",w)}},[]),i(nj.Provider,{value:{user:e,loading:r,perfil:o,session:l,setPerfil:a,setUser:n,dataEquipos:d,escudos:f},children:t})},SD=()=>{const[t,e]=C.useState([]),[n,r]=C.useState(!0),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]),{dataEquipos:g}=nr();Ss(),C.useEffect(()=>{E(),h(),S(),w(),_();const k=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},O=>{E()}).subscribe(),R=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},O=>{}).subscribe();return()=>{k.unsubscribe(),R.unsubscribe()}},[]);const E=async()=>{try{const{data:k,error:R}=await z.from("listado_2024").select("*").eq("torneo","PRIMERAA");R?console.error("Error",R):(e(k),r(!1))}catch(k){console.error("Error",k.message)}},S=async()=>{try{const{data:k,error:R}=await z.from("CanalesTv").select("*");R?console.error("Error",R):(o(k),r(!1))}catch(k){console.error("Error",k.message)}},w=async()=>{try{const{data:k,error:R}=await z.from("Goleadores").select("*").eq("torneo","PRIMERAA").eq("añoGoleadores",2024);R?console.error("Error",R):l(k)}catch(k){console.error("Error",k.message)}},_=async()=>{try{const{data:k,error:R}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2024);R?console.error("Error",R):(d(k),r(!1))}catch(k){console.error("Error",k.message)}},h=async()=>{try{const{data:k,error:R}=await z.from("clasificados_playoff").select("*");R?console.error("Error",R):(f(k),r(!1))}catch(k){console.error("Unexpected error",k)}finally{r(!1)}},m=u.filter(k=>k.status==="Clasificado"),A=u.filter(k=>k.status==="Descenso");return m.slice(0,8),A.slice(0,4),n?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL AFA PRIMERA A - PRIMERA - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera A: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"FUTSAL AFA PRIMERA A",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{className:"bannerParaPc",children:i(cs,{})})}),i(V,{children:i($,{className:"",children:i(et,{})})}),i(V,{children:i($,{md:12})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:g})}),p($,{md:6,children:[i(ls,{}),i(Tn,{dataFixture:t,dataEquipos:g,canalesTv:s}),i(Vt,{goleadores:a,dataEquipos:g})]})]})]})]})},AD=()=>{C.useState({});const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]);C.useState(!1);const[u,f]=C.useState(!1);C.useState([]);const[g,E]=C.useState(!1),[S,w]=C.useState(!1),[_,h]=C.useState("white"),[m,A]=C.useState("black"),[k,R]=C.useState(null),{escudos:O}=nr();C.useEffect(()=>{const L=()=>{window.scrollY>50&&!S&&E(!0)};return window.addEventListener("scroll",L),()=>{window.removeEventListener("scroll",L)}},[S]),C.useEffect(()=>{N(),b(),y();const L=se().format("YYYY-MM-DD"),K=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},te=>{const J=Array.isArray(te.new)?te.new:[te.new],Q=J.filter(pe=>se(pe.fecha).isSame(L,"day"));e(pe=>{const ye={...pe};return Q.forEach(Pe=>{const Me=Pe.torneo;if(ye[Me]){const He=ye[Me].findIndex(ie=>ie.id===Pe.id);He!==-1?ye[Me][He]={...ye[Me][He],...Pe}:ye[Me]=[...ye[Me],Pe]}else ye[Me]=[Pe]}),ye}),d(J.map(pe=>pe.id));const oe=J.find(pe=>pe.estado==="Jugandose");oe&&(R(oe.id),h("#dc3545"),A("white"),setTimeout(()=>{R(null),h("white"),A("black")},4e3))}).subscribe(),Y=()=>{document.hidden||(N(),b(),y())};return document.addEventListener("visibilitychange",Y),()=>{K.unsubscribe(),document.removeEventListener("visibilitychange",Y)}},[]);const N=async()=>{try{const L=Intl.DateTimeFormat().resolvedOptions().timeZone;let{data:K,error:Y}=await z.rpc("partidoshoy",{zona_horario:L});if(Y)console.log("Error",Y);else{const te=K.map(J=>({fechaActual:J.fechaactual,horaActual:J.horaactual,horaLocal:J.data.hora_local,...J.data}));e(v(te)),o(!1)}}catch(L){console.error("Error fetching data",L)}},y=async()=>{const{data:L,error:K}=await z.from("Fixture2023").select("*").eq("partidoPlayOff","Ida");K?console.error("Error fetching data: ",K):l(L)},v=L=>{const K={};return L.forEach(Y=>{const te=Y.torneo;K[te]||(K[te]=[]),K[te].push(Y)}),Object.values(K).forEach(Y=>{Y.sort((te,J)=>{if(te.horaLocal&&J.horaLocal){const Q=te.horaLocal.localeCompare(J.horaLocal);return Q===0&&te.id&&J.id?te.id.localeCompare(J.id):Q}else return 0})}),K},b=async()=>{let{data:L,error:K}=await z.from("CanalesTv").select("*");K?console.log("Error",K):r(L)},P=async()=>{const L="2024-05-02",K=se().format("YYYY-MM-DD");f(K===L)};C.useEffect(()=>{P()},[]);const F=(L,K)=>{I("/videos",{state:{url:L,data:K}})},I=Rt();if(s)return i("div",{className:"d-flex justify-content-center",style:{marginTop:250},children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})});const T=["MUNDIAL","FFMUNDIAL","COPAAMERICA","PRIMERAA","PLAYOFFA","LIBERTADORES","LIBERTADORESFEM","COPADEORO","COPAOROFEM","COPADEPLATA","UEFACLASIFICACION","COPAARGENTINA","COPAARGENTINAFEM","PRIMERAB","PLAYOFFB","LNFS","PLAYOFFLNFS","AMISTOSOINT","PLAYOFFC","PRIMERAC","DESEMPATEC","CAMPEOND","PLAYOFFD","PRIMERAD1","DESEMPATED1","PRIMERAD2",,"PRIMERAAFEM","PLAYOFFAFEM","PRIMERABFEM","PLAYOFFBFEM","INTEGRACION","PRIMERACFEM","PLAYOFFCFEM","PLAYOFFSURU","AufPRIMERA","PLAYOFFARGENLIGAZ1","ARGENLIGAZ1","ARGENLIGAZ2","PLAYOFFARGENLIGAZ2","PLAYOFFARGENLIGABZ1","ARGENLIGABZ1","ARGENLIGABZ2","PLAYOFFARGENLIGABZ2","PLAYOFFUEFACLASIFICACION","COPAASIA","FFCOPAASIA","COPAAFRICA","FFCOPAAFRICA","CONCACAF","FFCONCACAF","LNFA"],q={};for(let L in t)t[L].length>0&&(q[L]=t[L][0].organizador);function W(L){return L==="Afa"||L==="Argenliga"?i("img",{style:{marginRight:3},src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina"}):L==="Auf"?i("img",{style:{marginRight:3},src:"https://flagcdn.com/w20/uy.png",srcSet:"https://flagcdn.com/w40/uy.png 2x",width:"20",alt:"Uruguay"}):L==="Rfef"?i("img",{style:{marginRight:3},src:"https://flagcdn.com/w20/es.png",srcSet:"https://flagcdn.com/w40/es.png 2x",width:"20",alt:"España"}):i(Ft,{})}const G=L=>L==="PRIMERAA"||L==="PLAYOFFA"?"PRIMERA A":L==="PRIMERAB"||L==="PLAYOFFB"?"PRIMERA B":L==="PRIMERAC"||L==="PLAYOFFC"?"PRIMERA C":L==="PRIMERAD1"||L==="PLAYOFFD"?"PRIMERA D1":L==="PRIMERAD2"||L==="PLAYOFFD"?"PRIMERA D2":L==="PRIMERAAFEM"||L==="PLAYOFFAFEM"?"PRIMERA A FEM":L==="PRIMERABFEM"||L==="PLAYOFFBFEM"?"PRIMERA B FEM":L==="PRIMERACFEM"||L==="PLAYOFFCFEM"?"PRIMERA C FEM":L==="PLAYOFFSURU"||L==="PLAYOFFSURU"?"URUGUAY":L==="ARGENLIGAZ1"||L==="PLAYOFFARGENLIGAZ1"?"ARGENLIGA A Z1":L==="ARGENLIGAZ2"||L==="PLAYOFFARGENLIGAZ2"?"ARGENLIGA A Z2":L==="AMISTOSOINT"?"AMISTOSO INT":L==="LNFA"?"LNFA":L==="COPAAMERICA"||L==="FFCOPAAMERICA"?"COPA AMÉRICA":L==="LIBERTADORES"||L==="FFLIBERTADORES"?"COPA LIBERTADORES":L==="LIBERTADORESFEM"||L==="FFLIBERTADORESFEM"?"COPA LIBERTADORES FEM":L==="COPADEORO"||L==="FFCOPADEORO"?"COPA DE ORO":L==="COPADEPLATA"||L==="FFCOPADEPLATA"?"COPA DE PLATA":L==="UEFACLASIFICACION"||L==="FFUEFACLASIFICACION"||L==="PLAYOFFUEFACLASIFICACION"?"UEFA CLASIFICACIÓN":L==="COPAASIA"||L==="FFCOPAASIA"?"COPA ASIA":L==="COPAAFRICA"||L==="FFCOPAAFRICA"?"COPA AFRICA":L==="CONCACAF"||L==="FFCONCACAF"?"CONCACAF":L==="ARGENLIGABZ1"||L==="PLAYOFFARGENLIGABZ1"?"ARGENLIGA B Z1":L==="ARGENLIGABZ2"||L==="PLAYOFFARGENLIGABZ2"?"ARGENLIGA B Z2":L==="MUNDIAL"||L==="FFMUNDIAL"?"MUNDIAL":L==="DESEMPATEC"?"PRIMERA C":L==="CAMPEOND"?"PRIMERA D":L==="DESEMPATED1"?"PRIMERA D1":L==="AufPRIMERA"?"PRIMERA A":L==="INTEGRACION"?"INTEGRACIÓN":L==="COPAARGENTINA"?"COPA ARGENTINA":L==="COPAARGENTINAFEM"?"COPA ARGENTINA FEM":L==="COPAOROFEM"?"COPA DE ORO FEM":L==="LNFS"||L==="PLAYOFFLNFS"?"LNFS ESPAÑA":L,H={PRIMERAA:"/primeraa",PRIMERAB:"/primerab",PRIMERAC:"/primerac",PRIMERAD1:"/primerad1",PRIMERAD2:"/primerad2",ARGENLIGAZ1:"/argenligazona1",ARGENLIGAZ2:"/argenligazona2",ARGENLIGABZ1:"/argenligabzona1",ARGENLIGABZ2:"/argenligabzona2",PRIMERAAFEM:"/primeraafemenino",PRIMERABFEM:"/primerabfemenino",PRIMERACFEM:"/primeracfemenino",PLAYOFFA:"/primeraa",PLAYOFFB:"/primerab",PLAYOFFC:"/primerac",PLAYOFFD:"/primerad1",PLAYOFFD:"/primerad2",PLAYOFFAFEM:"/primeraafemenino",PLAYOFFBFEM:"/primerabfemenino",PLAYOFFCFEM:"/primeracfemenino",PLAYOFFSURU:"/uruguay",PLAYOFFARGENLIGAZ1:"/argenligazona1",PLAYOFFARGENLIGAZ2:"/argenligazona2",PLAYOFFARGENLIGABZ1:"/argenligabzona1",PLAYOFFARGENLIGABZ2:"/argenligabzona2",AMISTOSOINT:"/amistososinternacionalesfutsal",LNFA:"/lnfafutsal",COPAAMERICA:"/copaamericafutsal",LIBERTADORES:"/copalibertadoresfutsal",FFLIBERTADORES:"/copalibertadoresfutsal",LIBERTADORESFEM:"/copalibertadoresfemeninafutsal",FFLIBERTADORESFEM:"/copalibertadoresfemeninafutsal",COPADEORO:"/copadeorofutsal",COPADEPLATA:"/copadeplatafutsal",UEFACLASIFICACION:"/uefaclasificacionmunadialfutsal",PLAYOFFUEFACLASIFICACION:"/uefaclasificacionmunadialfutsal",COPAAFRICA:"/copaafricafutsal",FFCOPAAFRICA:"/copaafricafutsal",COPAASIA:"/copaasiafutsal",FFCOPAASIA:"/copaasiafutsal",CONCACAF:"/concacaffutsal",FFCONCACAF:"/concacaffutsal",DESEMPATEC:"/primerac",CAMPEOND:"/primerad",DESEMPATED1:"/primerad1",DESEMPATED2:"/primerad2",AufPRIMERA:"/uruguay",INTEGRACION:"/integracion",COPAARGENTINA:"/copaargentinafutsal",COPAARGENTINAFEM:"/copaargentinafemeninafutsal",MUNDIAL:"/mundialfutsal",FFMUNDIAL:"/mundialfutsal",LNFS:"/españafutsal"},j=L=>L==="PRIMERAAFEM"||L==="PRIMERABFEM"||L==="PRIMERACFEM"||L==="PLAYOFFAFEM"||L==="PLAYOFFBFEM"||L==="PLAYOFFCFEM"||L==="LIBERTADORESFEM"||L==="FFLIBERTADORESFEM"||L==="COPAARGENTINAFEM"||L==="COPAOROFEM"?"#350070":"#001C31",U=["LIBERTADORESFEM","FFLIBERTADORESFEM","LIBERTADORES","FFLIBERTADORES"];return p(ee,{children:[p(ae,{className:"anchoInicio mb-5",children:[p(Xe,{children:[i("title",{children:" SEGUNDOPALO - Futsal AFA Primera A, B, C, D - Fixture completo con tabla de posiciones"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera A, B, C, D : tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),i(V,{children:p($,{style:{display:"flex",justifyContent:"center"},children:[p("a",{href:"/partidosayer",className:"btn btn-secondary btn-sm fw-bolder",style:{display:"flex",flexDirection:"column",borderRadius:"15px 0px 0px 15px"},children:[i(Wq,{style:{marginLeft:10}}),"AYER"]}),p("h6",{className:"text-center text-white fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:15,display:"flex",alignItems:"center",alignContent:"center",justifyContent:"center",height:"100%",backgroundColor:"#001c31",width:"100%"},children:[" PARTIDOS ",i("br",{})," HOY"]}),p("a",{href:"/partidosmañana",className:"btn btn-secondary btn-sm fw-bolder",style:{display:"flex",flexDirection:"column",borderRadius:"0px 15px 15px 0px"},children:[i(Vq,{style:{marginLeft:10}}),"MAÑ"]})]})}),i(V,{children:i($,{className:"mt-1 mb-1 text-center ",children:i(et,{})})}),t&&Object.entries(t).length===0?p(ae,{className:"mt-5",style:{display:"flex",justifyContent:"center",flexDirection:"column",backgroundColor:"#001c31"},children:[i(V,{children:i($,{children:i("p",{className:"text-center text-white mt-4 fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"1em"},children:"HOY NO HAY PARTIDOS, TE INVITAMOS A REVISAR LAS TABLAS DE POSICIONES"})})}),p(ae,{className:"mt-1",style:{display:"flex",justifyContent:"center",flexDirection:"column",backgroundColor:"#015496"},children:[i(V,{children:i($,{style:{display:"flex",justifyContent:"center"},children:i("p",{className:"text-center text-white mt-4 fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"1em"},children:"MASCULINO"})})}),p(V,{children:[p($,{style:{display:"flex",justifyContent:"center"},children:[i(ve,{to:"/primeraa",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA A"})}),i(ve,{to:"/primerab",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA B"})}),i(ve,{to:"/primerac",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA C"})}),i(ve,{to:"/primerad1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA D1"})}),i(ve,{to:"/primerad2",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA D2"})})]}),p($,{className:"mb-5",style:{display:"flex",justifyContent:"center"},children:[i(ve,{to:"/argenligazona1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"ARGENLIGA A Z1"})}),i(ve,{to:"/argenligazona2",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"ARGENLIGA A Z2"})}),i(ve,{to:"/argenligabzona1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"ARGENLIGA B Z1"})}),i(ve,{to:"/argenligabzona2",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"ARGENLIGA B Z2"})})]})]})]}),p(ae,{className:"mt-3",style:{display:"flex",justifyContent:"center",flexDirection:"column",backgroundColor:"#015496"},children:[i(V,{children:i($,{style:{display:"flex",justifyContent:"center"},children:i("p",{className:"text-center text-white mt-4 fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"1em"},children:"FEMENINO"})})}),i(V,{children:p($,{className:"mb-5",style:{display:"flex",justifyContent:"center"},children:[i(ve,{to:"/primeraafemenino",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA A"})}),i(ve,{to:"/primerabfemenino",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA B"})}),i(ve,{to:"/primeracfemenino",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA C"})})]})})]}),i(V,{children:i($,{className:"mt-2 mb-5",style:{display:"flex",justifyContent:"center"},children:i(ve,{to:"/futuro",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:p("button",{className:"new-section-button m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:15,backgroundColor:"#f2b700",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},onClick:()=>window.location.href="/futuro",children:[i("span",{children:"SEGUND⚽PALO - FUTURO"}),i("span",{style:{fontSize:"13px"},children:"(INFERIORES)"})]})})})})]}):p(ae,{style:{display:"flex",justifyContent:"center",flexDirection:"column"},children:[i(V,{children:i($,{className:"mt-1 mb-1",style:{display:"flex",justifyContent:"center"},children:i(ve,{href:"/futuro",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:p("button",{className:"new-section-button m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:15,backgroundColor:"#f2b700",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},onClick:()=>window.location.href="/futuro",children:[i("span",{children:"SEGUND⚽PALO - FUTURO"}),i("span",{style:{fontSize:"13px"},children:"(INFERIORES)"})]})})})}),i(V,{children:i($,{className:" mb-1",style:{display:"flex",justifyContent:"center"},children:i(ve,{to:"/premiossegundopalo",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:"new-section-button m-1 btn fw-bolder btn-lg",style:{fontSize:15,backgroundColor:"#030303",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",borderColor:"#b89552",color:"#b89552"},children:i("span",{children:"PREMIOS FUTURO 2024"})})})})})]}),Object.entries(t).sort((L,K)=>{const Y=L[0],te=K[0],J=T.indexOf(Y),Q=T.indexOf(te);return J-Q}).map(([L,K])=>i(ee,{children:i($,{children:p(Ie,{bordered:!0,className:"border border-dark ",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{style:{backgroundColor:"white"},children:p(Fe.Fragment,{children:[i("tr",{children:i("td",{className:"text-center text-white tituloPartidos fw-bolder",style:{fontSize:15,backgroundColor:j(L),fontFamily:"Roboto Condensed, sans-serif"},colSpan:"6",children:p("a",{href:H[L],style:{color:"white",textDecoration:"none"},children:[W(q[L])," ",G(L)," ",W(q[L])]})})}),K.map(Y=>{var de,le,Oe,Ke,it,It,wn;const te=Y.equipolocal,J=Y.equipovisitante,Q=Y.transmision,oe=(de=O.find(me=>me.nombre===te))==null?void 0:de.escudos,pe=(le=O.find(me=>me.nombre===J))==null?void 0:le.escudos,ye=(Oe=n.find(me=>me.idTv===Q))==null?void 0:Oe.logo;Y.hora;const Pe=Y.horaLocal||"",Me=String(k)===String(Y.id)&&Y.estado==="Jugandose"?"#dc3545":"white",He=String(k)===String(Y.id)&&Y.estado==="Jugandose"?"white":"black",ie=(Ke=O.find(me=>me.nombre===te))==null?void 0:Ke.pais,Se=(it=O.find(me=>me.nombre===J))==null?void 0:it.pais,he=me=>`https://flagcdn.com/w20/${me.toLowerCase()}.png`,Je=me=>`https://flagcdn.com/w40/${me.toLowerCase()}.png 2x`,Ct=me=>U.includes(L)&&me?i(ee,{children:i("div",{children:i("img",{style:{marginBottom:5,marginLeft:3,width:"15px",height:"10px"},src:he(me),srcSet:Je(me),alt:me})})}):null;return p(Fe.Fragment,{children:[i("tr",{children:Y.fechapendiente!==null&&Y.fechapendiente>=1?p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:["Pendiente Fecha ",Y.fechapendiente]}):null}),i("tr",{children:Y.faseCopas!==null?i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:Y.faseCopas}):null}),i("tr",{children:Y.partidoPlayOff==="Vuelta"&&Y.torneo!=="PLAYOFFA"?p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:["Ida ",a.filter(me=>me.equipolocal===Y.equipovisitante&&me.equipovisitante===Y.equipolocal).map(me=>me.golesvisitante),"-",a.filter(me=>me.equipolocal===Y.equipovisitante&&me.equipovisitante===Y.equipolocal).map(me=>me.goleslocal)]}):Y.partidoPlayOff==="Vuelta"&&Y.torneo==="PLAYOFFA"?p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:["Vuelta- serie a favor de ",a.filter(me=>me.equipolocal===Y.equipovisitante&&me.equipovisitante===Y.equipolocal).map(me=>me.ganador)]}):null}),i("tr",{children:Y.partidoPlayOff==="Ida"?i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:"Ida"}):null}),p("tr",{children:[Y.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder ",style:{fontSize:13,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):Y.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",Y.motivossuspension,")"]})]}):Y.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:Y.estado}):Y.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:[i("div",{style:{display:"flex",justifyContent:"center",flexDirection:"column"},children:"Parc"}),Pe," ",ye&&i("img",{src:ye,alt:Q,style:{width:"18px",height:"18px",marginLeft:1}})]}):Y.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif"},children:[Y.tiempodelpartido,ye&&i("img",{src:ye,alt:Q,style:{width:"18px",height:"18px",marginLeft:"2px"}}),Y.crono==="Si"&&Y.tiempodelpartido!=="ET"?i("div",{style:{fontSize:"11px"},children:Y.reloj!==null?i(gA,{tiempoInicial:Y.reloj}):i(mA,{partidoId:Y.id,tiempodelpartido:Y.tiempodelpartido,crono:Y.crono,estado:Y.estado})}):null]}):Y.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[p("div",{style:{display:"flex",justifyContent:"center"},children:[Pe," ",ye&&i("img",{src:ye,alt:Q,style:{width:"18px",height:"18px",marginLeft:1}})]}),i("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:Y.estadio})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[p("div",{className:"d-flex justify-content-center",children:[Ct(ie),oe&&i("img",{src:oe,alt:te,style:{width:"15px",height:"15px"}})]}),i("span",{style:{height:"auto"},children:te})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:15,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:Me,color:He,width:"auto"},children:[Y.estado!=="Pendiente"?Y.goleslocal:null,Y.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+Y.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:15,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:Me,color:He},children:[Y.estado!=="Pendiente"?Y.golesvisitante:null,Y.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+Y.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[p("div",{className:"d-flex justify-content-center",children:[Ct(Se),pe&&i("img",{src:pe,alt:J,style:{width:"15px",height:"15px"}})]}),i("span",{style:{height:"auto"},children:J})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[Y.linkgoles===null||Y.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{F(Y.linkgoles,{id:Y.id,estado:Y.estado,equipolocal:Y.equipolocal,equipovisitante:Y.equipovisitante,goleslocal:Y.goleslocal,penaleslocal:Y.penaleslocal,penalesvisitante:Y.penalesvisitante,golesvisitante:Y.golesvisitante,escudoLocal:oe,escudoVisitante:pe,tiempodelpartido:Y.tiempodelpartido,hora:Pe,fecha:Y.fecha,goleadoresLocal:Y.goleadoresLocal,goleadoresVisitante:Y.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"}),window.location.reload()},className:"text-white",children:i(Tt,{style:{fontSize:"19px",color:"black"}})}),Y.linkvivo===null||Y.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{var me,Kt;F(Y.linkvivo,{id:Y.id,estado:Y.estado,equipolocal:Y.equipolocal,equipovisitante:Y.equipovisitante,goleslocal:Y.goleslocal,penaleslocal:Y.penaleslocal,penalesvisitante:Y.penalesvisitante,golesvisitante:Y.golesvisitante,escudoLocal:oe,escudoVisitante:pe,tiempodelpartido:Y.tiempodelpartido,hora:Pe,fecha:Y.fecha,goleadoresLocal:Y.goleadoresLocal,goleadoresVisitante:Y.goleadoresVisitante,estadio:Y.estadio,transmision:(me=n.find(Bn=>Bn.idTv===Y.transmision))==null?void 0:me.nombre,imgCanalTv:(Kt=n.find(Bn=>Bn.idTv===Y.transmision))==null?void 0:Kt.logo}),window.scrollTo({top:0,behavior:"smooth"}),window.location.reload()},className:"text-white",children:i(Ya,{style:{fontSize:"19px",color:"red"}})})]})})]},Y.id),Y.estado!=="Pendiente"&&(Y.goleadoresLocal||Y.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(It=Y.goleadoresLocal)==null?void 0:It.split(",").map((me,Kt)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[Kt>0&&"-",me.trim().slice(0,-1)]},Kt))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(wn=Y.goleadoresVisitante)==null?void 0:wn.split(",").map((me,Kt)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[Kt>0&&"-",me.trim().slice(0,-1)]},Kt))})})]})]},Y.id)}),i("tr",{className:"seccionTorneo",style:{borderColor:"transparent",backgroundColor:"black"},children:i("td",{className:"text-center fw-bolder ",style:{padding:"0px 0",borderColor:"transparent"},colSpan:"3",children:i("div",{style:{backgroundColor:"#003d63",color:"white",fontSize:"10px",fontFamily:"Roboto Condensed, sans-serif",border:"none",padding:"0px 0",borderColor:"transparent"},children:p("a",{href:H[L],style:{color:"white",textDecoration:"none",display:"block"},children:["Seccion ",i("br",{})," ",i("span",{style:{fontSize:"10px"},children:G(L)})]})})})})]},L)})]})},L)})),u?p(ae,{className:"mt-4",children:[i(V,{children:i($,{className:"mb-2",style:{backgroundColor:"#001c31"},children:i("h6",{className:"text-center text-white fw-bolder",style:{fontSize:"13px",fontFamily:"Roboto Condensed, sans-serif"},children:"SORTEO COPA LIBERTADORES 2024"})})}),i(V,{children:i($,{className:"mb-2",style:{backgroundColor:"#001c31"},children:i("h6",{className:"text-center text-white fw-bolder",style:{fontSize:"13px",fontFamily:"Roboto Condensed, sans-serif"},children:"ARG 13:00 - BOL CHI PAR VEN 12:00 - COL ECU PER 11:00"})})}),i(V,{children:i($,{children:i("div",{children:i(kE,{url:"https://www.youtube.com/embed/-omz9DmQIno",controls:!0,className:"embed-responsive-item",style:{maxWidth:"90vw",maxHeight:"50vh"}})})})})]}):null,i(V,{className:"mt-5",children:i($,{children:i(She,{equipos:O})})}),i(V,{children:i($,{className:"d-flex justify-content-center",children:i(ve,{to:"/calendario",style:{fontFamily:"Roboto Condensed, sans-serif"},children:i("button",{className:" m-1 btn text-white fw-bolder btn-sm ",style:{fontSize:10,backgroundColor:"#001c31",fontSize:13},children:"CALENDARIO EXTENDIDO"})})})})]}),i("div",{style:{display:" flex",justifyContent:"center"}})]})},ave=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},u=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},u=>{l()}).subscribe();return()=>{c.unsubscribe(),d.unsubscribe()}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","COPAAMERICA").eq("añoTorneo",2024).eq("grupoCopas","A");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},lve=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},A=>{E()}).subscribe();return()=>{h.unsubscribe(),m.unsubscribe()}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","COPAAMERICA").eq("añoTorneo",2024).eq("grupoCopas","B");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","PRIMERAA");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})};function rj({dataFixture:t,dataEquipos:e}){const[n,r]=C.useState([]),s=t.reduce((d,u)=>{const f=u.grupoCopas,g=u.jornada;return d[f]||(d[f]={}),d[f][g]||(d[f][g]=[]),d[f][g].push(u),d},{}),o=Object.keys(s).sort();C.useEffect(()=>{const u=e.filter(f=>f.organizador==="Fifa").map(f=>({escudo:f.escudos,equipo:f.nombre}));r(u)},[e]);const a=(d,u)=>{l("/videos",{state:{url:d,data:u}})},l=Rt();function c(d,u){const f=d.hora?se(d.hora,"HH:mm:ss"):se(),g=u.hora?se(u.hora,"HH:mm:ss"):se();return f.diff(g)}return i(ee,{children:i(ae,{children:o.map(d=>{const u=Object.keys(s[d]),f=[];for(let g=0;g<u.length;g+=2)f.push(u.slice(g,g+2));return f.map((g,E)=>i(V,{children:g.map(S=>{const w=s[d][S].find(h=>h.libre),_=s[d][S].sort(c);return i($,{md:6,xs:6,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[p("thead",{style:{color:"transparent",borderColor:"transparent"},children:[p("tr",{children:[i("th",{style:{width:"17%"}}),i("th",{style:{width:"8%"}}),i("th",{style:{width:"8%"}}),i("th",{style:{width:"17%"}}),i("th",{style:{width:"10%"}})]}),i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"11px"},children:[" Fecha ",S]})})]}),p("tbody",{children:[_.map(h=>{const m=n.find(y=>y.equipo===h.equipolocal),A=n.find(y=>y.equipo===h.equipovisitante);let k="A confirmar";h.fecha&&(k=se(h.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("ddd DD/MM").toUpperCase().replace(".",""));const R=h.estado==="Jugandose"?"red":"white",O=h.estado==="Jugandose"?"white":"black";let N="";return h.hora&&(N=se(h.hora,"HH:mm:ss").format("HH:mm")),p(Fe.Fragment,{children:[i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder ",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:[" ",k," - ",N]})}),p("tr",{className:"align-middle",children:[p("td",{className:"bg-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"12px"},children:[m&&i("img",{src:m.escudo,alt:m.equipo,width:"12",height:"12"})," ",h.equipolocal.substring(0,3).toUpperCase()]}),i("td",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:R,color:O},children:h.estado==="Finalizado"||h.estado==="Jugandose"?h.goleslocal:""}),i("td",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:R,color:O},children:h.estado==="Finalizado"||h.estado==="Jugandose"?h.golesvisitante:""}),p("td",{className:"bg-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"12px"},children:[h.equipovisitante.substring(0,3).toUpperCase()," ",A&&i("img",{src:A.escudo,alt:A.equipo,width:"12",height:"12"})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:h.linkgoles===null?null:i("a",{style:{cursor:"pointer"},onClick:()=>{a(h.linkgoles,{id:h.id,estado:h.estado,equipolocal:h.equipolocal,equipovisitante:h.equipovisitante,goleslocal:h.goleslocal,penaleslocal:h.penaleslocal,penalesvisitante:h.penalesvisitante,golesvisitante:h.golesvisitante,escudoLocal:m,escudoVisitante:A,tiempodelpartido:h.tiempodelpartido,hora:N,goleadoresLocal:h.goleadoresLocal,goleadoresVisitante:h.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})})})]})]},h.id)}),w&&i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[" Libre: ",w.libre]})})]})]})},S)})},E))})})})}const cve=({dataEquipos:t,dataFixture:e})=>{const s=(o=>{const a=o.reduce((l,c)=>{const d=c.llavePlayOff;return l[d]||(l[d]=[]),l[d].push(c),l},{});return Object.entries(a).map(([l,c])=>({llave:l,partidos:c}))})(e||[]);return i(ae,{className:"bracket-container",children:i(ae,{className:"bracket",children:i(V,{children:p($,{children:[i("div",{className:"round semifinals",children:p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="1"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1°A"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2°B"]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="2"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1°B"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2°A"]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})}),i("div",{className:"round finals",children:i("div",{className:"winners",children:i("div",{className:"matchups",children:i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="3"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"G1"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"G2"]})})})]},c)})},a))})})})})]})})})})},dve=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},u=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},u=>{l()}).subscribe();return()=>{c.unsubscribe(),d.unsubscribe()}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","COPAAMERICA").eq("añoTorneo",2024).eq("grupoCopas","A");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(rj,{dataFixture:t,dataEquipos:n})})},uve=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},A=>{E()}).subscribe();return()=>{h.unsubscribe(),m.unsubscribe()}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","COPAAMERICA").eq("añoTorneo",2024).eq("grupoCopas","B");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","PRIMERAA");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(rj,{dataFixture:t,dataEquipos:n})})},fve=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_(),h();const m=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{_()}).subscribe();return()=>{m.unsubscribe()}},[]);const g=async()=>{try{const{data:m,error:A}=await z.from("Goleadores").select("*").eq("torneo","COPAAMERICA").eq("añoGoleadores",2024);A?console.error("Error",A):e(m)}catch(m){console.error("Error",m.message)}},E=async()=>{try{const{data:m,error:A}=await z.from("Equipos").select("*").eq("genero","Masculino");A?console.error("Error",A):r(m)}catch(m){console.error("Error",m.message)}},S=async()=>{try{const{data:m,error:A}=await z.from("Asistencias").select("*").eq("torneo","COPAAMERICA").eq("añoAsistencia",2024);A?console.error("Error",A):o(m)}catch(m){console.error("Error",m.message)}},w=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").eq("torneo","FFCOPAAMERICA").eq("añoTorneo",2023);A?console.error("Error",A):l(m)}catch(m){console.error("Error",m.message)}},_=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").eq("torneo","FFCOPAAMERICA").eq("añoTorneo",2024);A?console.error("Error",A):d(m)}catch(m){console.error("Error",m.message)}},h=async()=>{try{const{data:m,error:A}=await z.from("CanalesTv").select("*");A?console.error("Error",A):f(m)}catch(m){console.error("Error",m.message)}};return p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL -COPA AMÉRICA - FIXTURES - PARTIDOS"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de LA COPA AMÉRICA DE Futsal , fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo mb-5",children:[i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i(Ft,{style:{marginRight:3}}),"COPA AMERICA",i(Ft,{style:{marginLeft:3}})]})}),i(V,{children:i($,{md:12,children:i(et,{})})}),i(V,{children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"FASE FINAL"})})}),i(V,{children:i($,{className:"text-center d-flex justify-content-center mb-2 mt-2",style:{overflowY:"auto"},children:i(cve,{dataFixture:c,dataEquipos:n})})}),i(V,{}),i(V,{children:i($,{md:12,children:i(DL,{dataFixture:c,dataEquipos:n,canalesTvPlayoff:u})})}),i(V,{children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"FASE DE GRUPOS"})})}),p(V,{children:[p($,{md:6,children:[i(ave,{}),i(dve,{})]}),p($,{md:6,children:[i(hr,{}),i(lve,{}),i(uve,{})]})]}),p(V,{children:[i($,{md:6,className:"mb-5",children:i(Vt,{goleadores:t,dataEquipos:n})}),i($,{md:6,className:"mb-5",children:i(TE,{asitencia:s,dataEquipos:n})})]})]})]})},hve=({equipos:t})=>{const[e,n]=C.useState([]);si(sd,"1xD10-tawmlMevscwue25TRJ7HL2SK-QLR7PUGUeK2k0/listaJugadores");const r=se().subtract(1,"days").format("DD-MM"),s=se().format("YYYY"),o=async()=>{let{data:a,error:l}=await z.from("listaJugadores").select("*");l?console.log("Error",l):n(a)};return C.useEffect(()=>{o()},[]),i(ae,{children:(t.some(a=>se(a.fundado).format("DD-MM")===r)||Object.values(e).some(a=>se(a.fechaNacimiento).format("DD-MM")===r))&&p(Ie,{className:"border border-dark",children:[i("thead",{children:i("tr",{className:"text-center text-white border border-dark fw-bolder",colSpan:10,style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"AYER"})}),p("tbody",{className:"",children:[t.some(a=>se(a.fundado).format("DD-MM")===r)&&p(ee,{children:[i("tr",{className:"text-center text-white border border-dark fw-bolder",colSpan:10,style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:13},children:"UN DÍA COMO AYER SE FUNDÓ"}),t.map(a=>{const l=se(a.fundado).format("DD-MM"),c=se(a.fundado).format("YYYY"),d=s-c;return l===r?i("tr",{children:p("td",{className:"fw-bolder text-center text-dark",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:[i("img",{src:a.escudos,alt:a.nombre,style:{width:"15px",height:"15px"}}),a.nombre," cumplió ",d," años desde su fundación."]})},a.id):null})]}),Object.values(e).some(a=>se(a.fechaNacimiento).format("DD-MM")===r)&&p(ee,{children:[i("tr",{className:"text-center text-white border border-dark fw-bolder",colSpan:10,style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:13},children:"CUMPLEAÑOS"}),Object.values(e).map(a=>{const l=se(a.fechaNacimiento).format("DD-MM"),c=se(a.fechaNacimiento).format("YYYY"),d=s-c;return l===r?i("tr",{children:p("td",{className:"fw-bolder text-center text-dark",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:[a.nombre," ",a.apellido," (",a.clubActual,") cumplio ayer ",d," años"]})},a.id):null})]})]})]})})},ND=()=>{C.useState({});const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState([]),[a,l]=C.useState(!0),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),w(),_(),E();const b=Re().subtract(1,"days").format("YYYY-MM-DD"),P=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},I=>{const q=(Array.isArray(I.new)?I.new:[I.new]).filter(W=>Re(W.fecha).isSame(b,"day"));e(W=>{const G={...W};return q.forEach(H=>{const j=H.torneo;if(G[j]){const U=G[j].findIndex(L=>L.id===H.id);U!==-1?G[j][U]={...G[j][U],...H}:G[j]=[...G[j],H]}else G[j]=[H]}),G})}).subscribe(),F=()=>{document.hidden||(g(),w(),_(),E())};return document.addEventListener("visibilitychange",F),()=>{P.unsubscribe(),document.removeEventListener("visibilitychange",F)}},[]);const g=async()=>{try{const b=Intl.DateTimeFormat().resolvedOptions().timeZone;let{data:P,error:F}=await z.rpc("partidosayer",{zona_horario:b});if(F)console.log("Error",F);else{const I=P.map(T=>({fechaActual:T.fechaactual,horaActual:T.horaactual,horaLocal:T.data.hora_local,...T.data}));e(S(I)),l(!1)}}catch(b){console.error("Error fetching data",b)}},E=async()=>{const{data:b,error:P}=await z.from("Fixture2023").select("*").eq("partidoPlayOff","Ida");P?console.error("Error fetching data: ",P):d(b)},S=b=>{const P={};return b.forEach(F=>{const I=F.torneo;P[I]||(P[I]=[]),P[I].push(F)}),Object.values(P).forEach(F=>{F.sort((I,T)=>I.hora&&T.hora?I.hora.localeCompare(T.hora):0)}),P},w=async()=>{let{data:b,error:P}=await z.from("CanalesTv").select("*");P?console.log("Error",P):o(b)},_=async()=>{let{data:b,error:P}=await z.from("Equipos").select("*");P?console.log("Error",P):r(b)},h=(b,P)=>{m("/videos",{state:{url:b,data:P}})},m=Rt();if(a)return i("div",{className:"d-flex justify-content-center",style:{marginTop:250},children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})});const A=["MUNDIAL","FFMUNDIAL","COPAAMERICA","PRIMERAA","PLAYOFFA","LIBERTADORES","LIBERTADORESFEM","COPADEORO","COPAOROFEM","COPADEPLATA","UEFACLASIFICACION","COPAARGENTINA","COPAARGENTINAFEM","PRIMERAB","PLAYOFFB","LNFS","PLAYOFFLNFS","AMISTOSOINT","PLAYOFFC","PRIMERAC","DESEMPATEC","CAMPEOND","PLAYOFFD","PRIMERAD1","DESEMPATED1","PRIMERAD2",,"PRIMERAAFEM","PLAYOFFAFEM","PRIMERABFEM","PLAYOFFBFEM","INTEGRACION","PRIMERACFEM","PLAYOFFCFEM","PLAYOFFSURU","AufPRIMERA","PLAYOFFARGENLIGAZ1","ARGENLIGAZ1","ARGENLIGAZ2","PLAYOFFARGENLIGAZ2","PLAYOFFARGENLIGABZ1","ARGENLIGABZ1","ARGENLIGABZ2","PLAYOFFARGENLIGABZ2","PLAYOFFUEFACLASIFICACION","COPAASIA","FFCOPAASIA","COPAAFRICA","FFCOPAAFRICA","CONCACAF","FFCONCACAF","LNFA"],k={};for(let b in t)t[b].length>0&&(k[b]=t[b][0].organizador);function R(b){return b==="Afa"||b==="Argenliga"?i("img",{style:{marginRight:3},src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina"}):b==="Auf"?i("img",{style:{marginRight:3},src:"https://flagcdn.com/w20/uy.png",srcSet:"https://flagcdn.com/w40/uy.png 2x",width:"20",alt:"Uruguay"}):b==="Rfef"?i("img",{style:{marginRight:3},src:"https://flagcdn.com/w20/es.png",srcSet:"https://flagcdn.com/w40/es.png 2x",width:"20",alt:"España"}):i(Ft,{})}const O=b=>b==="PRIMERAA"||b==="PLAYOFFA"?"PRIMERA A":b==="PRIMERAB"||b==="PLAYOFFB"?"PRIMERA B":b==="PRIMERAC"||b==="PLAYOFFC"?"PRIMERA C":b==="PRIMERAD1"||b==="PLAYOFFD"?"PRIMERA D1":b==="PRIMERAD2"||b==="PLAYOFFD"?"PRIMERA D2":b==="PRIMERAAFEM"||b==="PLAYOFFAFEM"?"PRIMERA A FEM":b==="PRIMERABFEM"||b==="PLAYOFFBFEM"?"PRIMERA B FEM":b==="PRIMERACFEM"||b==="PLAYOFFCFEM"?"PRIMERA C FEM":b==="PLAYOFFSURU"||b==="PLAYOFFSURU"?"URUGUAY":b==="ARGENLIGAZ1"||b==="PLAYOFFARGENLIGAZ1"?"ARGENLIGA A Z1":b==="ARGENLIGAZ2"||b==="PLAYOFFARGENLIGAZ2"?"ARGENLIGA A Z2":b==="AMISTOSOINT"?"AMISTOSO INT":b==="LNFA"?"LNFA":b==="COPAAMERICA"||b==="FFCOPAAMERICA"?"COPA AMÉRICA":b==="LIBERTADORES"||b==="FFLIBERTADORES"?"COPA LIBERTADORES":b==="LIBERTADORESFEM"||b==="FFLIBERTADORESFEM"?"COPA LIBERTADORES FEM":b==="COPADEORO"||b==="FFCOPADEORO"?"COPA DE ORO":b==="COPADEPLATA"||b==="FFCOPADEPLATA"?"COPA DE PLATA":b==="UEFACLASIFICACION"||b==="FFUEFACLASIFICACION"||b==="PLAYOFFUEFACLASIFICACION"?"UEFA CLASIFICACIÓN":b==="COPAASIA"||b==="FFCOPAASIA"?"COPA ASIA":b==="COPAAFRICA"||b==="FFCOPAAFRICA"?"COPA AFRICA":b==="CONCACAF"||b==="FFCONCACAF"?"CONCACAF":b==="ARGENLIGABZ1"||b==="PLAYOFFARGENLIGABZ1"?"ARGENLIGA B Z1":b==="ARGENLIGABZ2"||b==="PLAYOFFARGENLIGABZ2"?"ARGENLIGA B Z2":b==="DESEMPATEC"?"PRIMERA C":b==="CAMPEOND"?"PRIMERA D":b==="DESEMPATED1"?"PRIMERA D1":b==="AufPRIMERA"?"PRIMERA A":b==="INTEGRACION"?"INTEGRACIÓN":b==="COPAARGENTINA"?"COPA ARGENTINA":b==="MUNDIAL"||b==="FFMUNDIAL"?"MUNDIAL":b==="COPAARGENTINAFEM"?"COPA ARGENTINA FEM":b==="COPAOROFEM"?"COPA DE ORO FEM":b==="LNFS"||b==="PLAYOFFLNFS"?"LNFS ESPAÑA":b,N={PRIMERAA:"/primeraa",PRIMERAB:"/primerab",PRIMERAC:"/primerac",PRIMERAD1:"/primerad1",PRIMERAD2:"/primerad2",ARGENLIGAZ1:"/argenligazona1",ARGENLIGAZ2:"/argenligazona2",ARGENLIGABZ1:"/argenligabzona1",ARGENLIGABZ2:"/argenligabzona2",PRIMERAAFEM:"/primeraafemenino",PRIMERABFEM:"/primerabfemenino",PRIMERACFEM:"/primeracfemenino",PLAYOFFA:"/primeraa",PLAYOFFB:"/primerab",PLAYOFFC:"/primerac",PLAYOFFD:"/primerad1",PLAYOFFD:"/primerad2",PLAYOFFAFEM:"/primeraafemenino",PLAYOFFBFEM:"/primerabfemenino",PLAYOFFCFEM:"/primeracfemenino",PLAYOFFSURU:"/uruguay",PLAYOFFARGENLIGAZ1:"/argenligazona1",PLAYOFFARGENLIGAZ2:"/argenligazona2",PLAYOFFARGENLIGABZ1:"/argenligabzona1",PLAYOFFARGENLIGABZ2:"/argenligabzona2",AMISTOSOINT:"/amistososinternacionalesfutsal",LNFA:"/lnfafutsal",COPAAMERICA:"/copaamericafutsal",LIBERTADORES:"/copalibertadoresfutsal",LIBERTADORESFEM:"/copalibertadoresfemeninafutsal",FFLIBERTADORESFEM:"/copalibertadoresfemeninafutsal",FFLIBERTADORES:"/copalibertadoresfutsal",COPADEORO:"/copadeorofutsal",COPADEPLATA:"/copadeplatafutsal",UEFACLASIFICACION:"/uefaclasificacionmunadialfutsal",PLAYOFFUEFACLASIFICACION:"/uefaclasificacionmunadialfutsal",COPAAFRICA:"/copaafricafutsal",FFCOPAAFRICA:"/copaafricafutsal",COPAASIA:"/copaasiafutsal",FFCOPAASIA:"/copaasiafutsal",CONCACAF:"/concacaffutsal",FFCONCACAF:"/concacaffutsal",DESEMPATEC:"/primerac",CAMPEOND:"/primerad",DESEMPATED1:"/primerad1",DESEMPATED2:"/primerad2",AufPRIMERA:"/uruguay",INTEGRACION:"/integracion",COPAARGENTINA:"/copaargentinafutsal",COPAARGENTINAFEM:"/copaargentinafemeninafutsal",MUNDIAL:"/mundialfutsal",FFMUNDIAL:"/mundialfutsal",LNFS:"/españafutsal"},y=b=>b==="PRIMERAAFEM"||b==="PRIMERABFEM"||b==="PRIMERACFEM"||b==="PLAYOFFAFEM"||b==="PLAYOFFBFEM"||b==="PLAYOFFCFEM"||b==="LIBERTADORESFEM"||b==="FFLIBERTADORESFEM"||b==="COPAARGENTINAFEM"||b==="COPAOROFEM"?"#350070":"#001C31",v=["LIBERTADORESFEM","FFLIBERTADORESFEM","LIBERTADORES","FFLIBERTADORES"];return i(ee,{children:p(ae,{className:"anchoInicio",children:[p(Xe,{children:[i("title",{children:" SEGUNDOPALO - Futsal AFA Primera A, B, C, D - Fixture completo con tabla de posiciones"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera A, B, C, D : tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),i(V,{children:p($,{style:{display:"flex",justifyContent:"center"},children:[p("h6",{className:"text-center text-white fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:15,display:"flex",alignItems:"center",justifyContent:"center",height:"100%",backgroundColor:"#001c31",width:"100%"},children:[" PARTIDOS ",i("br",{})," AYER"]}),p("a",{href:"/",className:"btn btn-secondary btn-sm fw-bolder ",style:{display:"flex",flexDirection:"column",borderRadius:"0px 15px 15px 0px"},children:[i(Vq,{style:{marginLeft:10}}),"HOY"]})]})}),i(V,{children:i("div",{className:"mt-1 mb-1 ",children:i(et,{})})}),t&&Object.entries(t).length===0?p(ae,{className:"mt-5",style:{display:"flex",justifyContent:"center",flexDirection:"column",backgroundColor:"#001c31"},children:[i(V,{children:i($,{children:i("p",{className:"text-center text-white mt-4 fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"1em"},children:"AYER NO HUBO PARTIDOS, TE INVITAMOS A REVISAR LAS TABLAS DE POSICIONES"})})}),i(V,{children:p($,{style:{display:"flex",justifyContent:"center"},children:[i(ve,{to:"/primeraa",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA A"})}),i(ve,{to:"/primerab",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA B"})}),i(ve,{to:"/primerac",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA C"})}),i(ve,{to:"/primerad1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA D1"})}),i(ve,{to:"/primerad2",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA D2"})})]})}),i(V,{children:i($,{className:"mt-4",style:{display:"flex",justifyContent:"center"},children:i(ve,{to:"/uruguay",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA URUGUAY"})})})}),i(V,{children:p($,{className:"mt-4",style:{display:"flex",justifyContent:"center"},children:[i(ve,{to:"/argenligazona1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"ARGENLIGA Z1"})}),i(ve,{to:"/argenligazona2",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"ARGENLIGA Z2"})}),i(ve,{to:"/laambaelite",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"LAAMBA"})})]})}),i(V,{children:i($,{className:"mt-5 mb-5",style:{display:"flex",justifyContent:"center"},children:i(ve,{to:"/pruebajugadoresfutsal",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:"new-section-button m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:15,backgroundColor:"white"},children:"VER PRUEBAS JUGADORES"})})})})]}):p(ae,{style:{display:"flex",justifyContent:"center",flexDirection:"column"},children:[i(V,{children:i($,{className:"mt-1 mb-1",style:{display:"flex",justifyContent:"center"},children:i(ve,{href:"/futuro",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:p("button",{className:"new-section-button m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:15,backgroundColor:"#f2b700",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},onClick:()=>window.location.href="/futuro",children:[i("span",{children:"SEGUND⚽PALO - FUTURO"}),i("span",{style:{fontSize:"13px"},children:"(INFERIORES)"})]})})})}),i(V,{children:i($,{className:" mb-1",style:{display:"flex",justifyContent:"center"},children:i(ve,{to:"/rankingfifa",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:"new-section-button m-1 btn text-white fw-bolder btn-sm",style:{fontSize:15,backgroundColor:"#045694",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",borderColor:"white"},children:i("span",{children:"RANKING SELECCIONES FIFA"})})})})})]}),Object.entries(t).sort((b,P)=>{const F=b[0],I=P[0],T=A.indexOf(F),q=A.indexOf(I);return T-q}).map(([b,P])=>i(ee,{children:i($,{children:p(Ie,{bordered:!0,className:"border border-dark ",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{style:{backgroundColor:"white"},children:p(Fe.Fragment,{children:[i("tr",{children:i("td",{className:"text-center text-white tituloPartidos fw-bolder",style:{fontSize:15,backgroundColor:y(b),fontFamily:"Roboto Condensed, sans-serif"},colSpan:"6",children:p("a",{href:N[b],style:{color:"white",textDecoration:"none"},children:[R(k[b])," ",O(b)," ",R(k[b])]})})}),P.map(F=>{var pe,ye,Pe,Me,He,ie,Se;const I=F.equipolocal,T=F.equipovisitante,q=F.transmision,W=(pe=n.find(he=>he.nombre===I))==null?void 0:pe.escudos,G=(ye=n.find(he=>he.nombre===T))==null?void 0:ye.escudos,H=(Pe=s.find(he=>he.idTv===q))==null?void 0:Pe.logo,j=F.hora,U=j===null?"":Re(j,"HH:mm:ss").format("HH:mm"),L=u===F.id&&F.estado==="Jugandose"?"#dc3545":"white",K=u===F.id&&F.estado==="Jugandose"?"white":"black",Y=(Me=n.find(he=>he.nombre===I))==null?void 0:Me.pais,te=(He=n.find(he=>he.nombre===T))==null?void 0:He.pais,J=he=>`https://flagcdn.com/w20/${he.toLowerCase()}.png`,Q=he=>`https://flagcdn.com/w40/${he.toLowerCase()}.png 2x`,oe=he=>v.includes(b)&&he?i(ee,{children:i("div",{children:i("img",{style:{marginBottom:5,marginLeft:3,width:"15px",height:"10px"},src:J(he),srcSet:Q(he),alt:he})})}):null;return p(Fe.Fragment,{children:[i("tr",{children:F.fechapendiente!==null&&F.fechapendiente>=1?p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:["Pendiente Fecha ",F.fechapendiente]}):null}),i("tr",{children:F.faseCopas!==null?i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:F.faseCopas}):null}),i("tr",{children:F.partidoPlayOff==="Vuelta"&&F.torneo!=="PLAYOFFA"?p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:["Ida ",c.filter(he=>he.equipolocal===F.equipovisitante&&he.equipovisitante===F.equipolocal).map(he=>he.golesvisitante),"-",c.filter(he=>he.equipolocal===F.equipovisitante&&he.equipovisitante===F.equipolocal).map(he=>he.goleslocal)]}):F.partidoPlayOff==="Vuelta"&&F.torneo==="PLAYOFFA"?p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:["Vuelta- serie a favor de ",c.filter(he=>he.equipolocal===F.equipovisitante&&he.equipovisitante===F.equipolocal).map(he=>he.ganador)]}):null}),i("tr",{children:F.partidoPlayOff==="Ida"?i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:"Ida"}):null}),p("tr",{children:[F.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder ",style:{fontSize:13,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):F.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",F.motivossuspension,")"]})]}):F.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:F.estado}):F.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Parc ",H&&i("img",{src:H,alt:q,style:{width:"18px",height:"18px"}})]}):F.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif"},children:[F.tiempodelpartido,H&&i("img",{src:H,alt:q,style:{width:"18px",height:"18px",marginLeft:"2px"}}),F.crono==="Si"&&F.tiempodelpartido!=="ET"?i("div",{style:{fontSize:"11px"},children:F.reloj!==null?i(gA,{tiempoInicial:F.reloj}):i(mA,{partidoId:F.id,tiempodelpartido:F.tiempodelpartido,crono:F.crono,estado:F.estado})}):null]}):F.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[p("div",{style:{display:"flex",justifyContent:"center"},children:[U," ",H&&i("img",{src:H,alt:q,style:{width:"18px",height:"18px"}})]}),i("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:F.estadio})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[p("div",{className:"d-flex justify-content-center",children:[oe(Y),W&&i("img",{src:W,alt:I,style:{width:"15px",height:"15px"}})]}),i("span",{style:{height:"auto"},children:I})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:15,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:L,color:K,width:"auto"},children:[F.estado!=="Pendiente"?F.goleslocal:null,F.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+F.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:15,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:L,color:K},children:[F.estado!=="Pendiente"?F.golesvisitante:null,F.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+F.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[p("div",{className:"d-flex justify-content-center",children:[oe(te),G&&i("img",{src:G,alt:T,style:{width:"15px",height:"15px"}})]}),i("span",{style:{height:"auto"},children:T})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[F.linkgoles===null||F.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(F.linkgoles,{id:F.id,estado:F.estado,equipolocal:F.equipolocal,equipovisitante:F.equipovisitante,goleslocal:F.goleslocal,penaleslocal:F.penaleslocal,penalesvisitante:F.penalesvisitante,golesvisitante:F.golesvisitante,escudoLocal:W,escudoVisitante:G,tiempodelpartido:F.tiempodelpartido,hora:U,fecha:F.fecha,goleadoresLocal:F.goleadoresLocal,goleadoresVisitante:F.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"}),window.location.reload()},className:"text-white",children:i(Tt,{style:{fontSize:"19px",color:"black"}})}),F.linkvivo===null||F.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{var he,Je;h(F.linkvivo,{id:F.id,estado:F.estado,equipolocal:F.equipolocal,equipovisitante:F.equipovisitante,goleslocal:F.goleslocal,penaleslocal:F.penaleslocal,penalesvisitante:F.penalesvisitante,golesvisitante:F.golesvisitante,escudoLocal:W,escudoVisitante:G,tiempodelpartido:F.tiempodelpartido,hora:U,fecha:F.fecha,goleadoresLocal:F.goleadoresLocal,goleadoresVisitante:F.goleadoresVisitante,estadio:F.estadio,transmision:(he=s.find(Ct=>Ct.idTv===F.transmision))==null?void 0:he.nombre,imgCanalTv:(Je=s.find(Ct=>Ct.idTv===F.transmision))==null?void 0:Je.logo}),window.scrollTo({top:0,behavior:"smooth"}),window.location.reload()},className:"text-white",children:i(Ya,{style:{fontSize:"19px",color:"red"}})})]})})]},F.id),F.estado!=="Pendiente"&&(F.goleadoresLocal||F.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(ie=F.goleadoresLocal)==null?void 0:ie.split(",").map((he,Je)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[Je>0&&"-",he.trim().slice(0,-1)]},Je))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(Se=F.goleadoresVisitante)==null?void 0:Se.split(",").map((he,Je)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[Je>0&&"-",he.trim().slice(0,-1)]},Je))})})]})]},F.id)}),i("tr",{className:"seccionTorneo",style:{borderColor:"transparent",backgroundColor:"black"},children:i("td",{className:"text-center fw-bolder ",style:{padding:"0px 0",borderColor:"transparent"},colSpan:"3",children:i("div",{style:{backgroundColor:"#003d63",color:"white",fontSize:"10px",fontFamily:"Roboto Condensed, sans-serif",border:"none",padding:"0px 0",borderColor:"transparent"},children:p("a",{href:N[b],style:{color:"white",textDecoration:"none",display:"block"},children:["Seccion ",i("br",{})," ",i("span",{style:{fontSize:"10px"},children:O(b)})]})})})})]},b)})]})},b)})),i(V,{className:"mt-5",children:i($,{children:i(hve,{equipos:n})})}),i(V,{style:{marginBottom:50},children:i($,{className:"d-flex justify-content-center",children:i(ve,{to:"/calendario",style:{fontFamily:"Roboto Condensed, sans-serif"},children:i("button",{className:" m-1 btn text-white fw-bolder btn-sm ",style:{fontSize:10,backgroundColor:"#001c31",fontSize:13},children:"CALENDARIO EXTENDIDO"})})})})]})})},pve=({equipos:t})=>{const[e,n]=C.useState([]),r=se().add(1,"days").format("DD-MM"),s=se().format("YYYY"),o=async()=>{let{data:a,error:l}=await z.from("listaJugadores").select("*");l?console.log("Error",l):n(a)};return C.useEffect(()=>{o()},[]),i(ae,{children:(t.some(a=>se(a.fundado).format("DD-MM")===r)||Object.values(e).some(a=>se(a.fechaNacimiento).format("DD-MM")===r))&&p(Ie,{className:"border border-dark",children:[i("thead",{children:i("tr",{className:"text-center text-white border border-dark fw-bolder",colSpan:10,style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"MAÑANA"})}),p("tbody",{className:"",children:[t.some(a=>se(a.fundado).format("DD-MM")===r)&&p(ee,{children:[i("tr",{className:"text-center text-white border border-dark fw-bolder",colSpan:10,style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:13},children:"UN DÍA COMO MAÑANA SE FUNDÓ"}),t.map(a=>{const l=se(a.fundado).format("DD-MM"),c=se(a.fundado).format("YYYY"),d=s-c;return l===r?i("tr",{children:p("td",{className:"fw-bolder text-center text-dark",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:[i("img",{src:a.escudos,alt:a.nombre,style:{width:"15px",height:"15px"}}),a.nombre," cumplirá ",d," años desde su fundación."]})},a.id):null})]}),Object.values(e).some(a=>se(a.fechaNacimiento).format("DD-MM")===r)&&p(ee,{children:[i("tr",{className:"text-center text-white border border-dark fw-bolder",colSpan:10,style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:13},children:"CUMPLEAÑOS"}),Object.values(e).map(a=>{const l=se(a.fechaNacimiento).format("DD-MM"),c=se(a.fechaNacimiento).format("YYYY"),d=s-c;return l===r?i("tr",{children:p("td",{className:"fw-bolder text-center text-dark",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:[a.nombre," ",a.apellido," (",a.clubActual,") cumple mañana ",d," años"]})},a.id):null})]})]})]})})},RD=()=>{C.useState({});const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState([]),[a,l]=C.useState(!0),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),w(),_(),E();const b=Re().add(1,"days").format("YYYY-MM-DD"),P=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},I=>{const q=(Array.isArray(I.new)?I.new:[I.new]).filter(W=>Re(W.fecha).isSame(b,"day"));e(W=>{const G={...W};return q.forEach(H=>{const j=H.torneo;if(G[j]){const U=G[j].findIndex(L=>L.id===H.id);U!==-1?G[j][U]={...G[j][U],...H}:G[j]=[...G[j],H]}else G[j]=[H]}),G})}).subscribe(),F=()=>{document.hidden||(g(),w(),_(),E())};return document.addEventListener("visibilitychange",F),()=>{P.unsubscribe(),document.removeEventListener("visibilitychange",F)}},[]);const g=async()=>{try{const b=Intl.DateTimeFormat().resolvedOptions().timeZone;let{data:P,error:F}=await z.rpc("partidosmanana",{zona_horario:b});if(F)console.log("Error",F);else{const I=P.map(T=>({fechaActual:T.fechaactual,horaActual:T.horaactual,horaLocal:T.data.hora_local,...T.data}));e(S(I)),l(!1)}}catch(b){console.error("Error fetching data",b)}},E=async()=>{const{data:b,error:P}=await z.from("Fixture2023").select("*").eq("partidoPlayOff","Ida");P?console.error("Error fetching data: ",P):d(b)},S=b=>{const P={};return b.forEach(F=>{const I=F.torneo;P[I]||(P[I]=[]),P[I].push(F)}),Object.values(P).forEach(F=>{F.sort((I,T)=>I.hora&&T.hora?I.hora.localeCompare(T.hora):0)}),P},w=async()=>{let{data:b,error:P}=await z.from("CanalesTv").select("*");P?console.log("Error",P):o(b)},_=async()=>{let{data:b,error:P}=await z.from("Equipos").select("*");P?console.log("Error",P):r(b)},h=(b,P)=>{m("/videos",{state:{url:b,data:P}})},m=Rt();if(a)return i("div",{className:"d-flex justify-content-center",style:{marginTop:250},children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})});const A=["MUNDIAL","FFMUNDIAL","COPAAMERICA","PRIMERAA","PLAYOFFA","LIBERTADORES","LIBERTADORESFEM","COPADEORO","COPAOROFEM","COPADEPLATA","UEFACLASIFICACION","COPAARGENTINA","COPAARGENTINAFEM","PRIMERAB","PLAYOFFB","LNFS","PLAYOFFLNFS","AMISTOSOINT","PLAYOFFC","PRIMERAC","DESEMPATEC","CAMPEOND","PLAYOFFD","PRIMERAD1","DESEMPATED1","PRIMERAD2",,"PRIMERAAFEM","PLAYOFFAFEM","PRIMERABFEM","PLAYOFFBFEM","INTEGRACION","PRIMERACFEM","PLAYOFFCFEM","PLAYOFFSURU","AufPRIMERA","PLAYOFFARGENLIGAZ1","ARGENLIGAZ1","ARGENLIGAZ2","PLAYOFFARGENLIGAZ2","PLAYOFFARGENLIGABZ1","ARGENLIGABZ1","ARGENLIGABZ2","PLAYOFFARGENLIGABZ2","PLAYOFFUEFACLASIFICACION","COPAASIA","FFCOPAASIA","COPAAFRICA","FFCOPAAFRICA","CONCACAF","FFCONCACAF","LNFA"],k={};for(let b in t)t[b].length>0&&(k[b]=t[b][0].organizador);function R(b){return b==="Afa"||b==="Argenliga"?i("img",{style:{marginRight:3},src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina"}):b==="Auf"?i("img",{style:{marginRight:3},src:"https://flagcdn.com/w20/uy.png",srcSet:"https://flagcdn.com/w40/uy.png 2x",width:"20",alt:"Uruguay"}):b==="Rfef"?i("img",{style:{marginRight:3},src:"https://flagcdn.com/w20/es.png",srcSet:"https://flagcdn.com/w40/es.png 2x",width:"20",alt:"España"}):i(Ft,{})}const O=b=>b==="PRIMERAA"||b==="PLAYOFFA"?"PRIMERA A":b==="PRIMERAB"||b==="PLAYOFFB"?"PRIMERA B":b==="PRIMERAC"||b==="PLAYOFFC"?"PRIMERA C":b==="PRIMERAD1"||b==="PLAYOFFD"?"PRIMERA D1":b==="PRIMERAD2"||b==="PLAYOFFD"?"PRIMERA D2":b==="PRIMERAAFEM"||b==="PLAYOFFAFEM"?"PRIMERA A FEM":b==="PRIMERABFEM"||b==="PLAYOFFBFEM"?"PRIMERA B FEM":b==="PRIMERACFEM"||b==="PLAYOFFCFEM"?"PRIMERA C FEM":b==="PLAYOFFSURU"||b==="PLAYOFFSURU"?"URUGUAY":b==="ARGENLIGAZ1"||b==="PLAYOFFARGENLIGAZ1"?"ARGENLIGA A Z1":b==="ARGENLIGAZ2"||b==="PLAYOFFARGENLIGAZ2"?"ARGENLIGA A Z2":b==="AMISTOSOINT"?"AMISTOSO INT":b==="LNFA"?"LNFA":b==="COPAAMERICA"||b==="FFCOPAAMERICA"?"COPA AMÉRICA":b==="LIBERTADORES"||b==="FFLIBERTADORES"?"COPA LIBERTADORES":b==="LIBERTADORESFEM"||b==="FFLIBERTADORESFEM"?"COPA LIBERTADORES FEM":b==="COPADEORO"||b==="FFCOPADEORO"?"COPA DE ORO":b==="COPADEPLATA"||b==="FFCOPADEPLATA"?"COPA DE PLATA":b==="UEFACLASIFICACION"||b==="FFUEFACLASIFICACION"||b==="PLAYOFFUEFACLASIFICACION"?"UEFA CLASIFICACIÓN":b==="COPAASIA"||b==="FFCOPAASIA"?"COPA ASIA":b==="COPAAFRICA"||b==="FFCOPAAFRICA"?"COPA AFRICA":b==="CONCACAF"||b==="FFCONCACAF"?"CONCACAF":b==="ARGENLIGABZ1"||b==="PLAYOFFARGENLIGABZ1"?"ARGENLIGA B Z1":b==="ARGENLIGABZ2"||b==="PLAYOFFARGENLIGABZ2"?"ARGENLIGA B Z2":b==="DESEMPATEC"?"PRIMERA C":b==="CAMPEOND"?"PRIMERA D":b==="DESEMPATED1"?"PRIMERA D1":b==="MUNDIAL"||b==="FFMUNDIAL"?"MUNDIAL":b==="AufPRIMERA"?"PRIMERA A":b==="INTEGRACION"?"INTEGRACIÓN":b==="COPAARGENTINA"?"COPA ARGENTINA":b==="COPAARGENTINAFEM"?"COPA ARGENTINA FEM":b==="COPAOROFEM"?"COPA DE ORO FEM":b==="LNFS"||b==="PLAYOFFLNFS"?"LNFS ESPAÑA":b,N={PRIMERAA:"/primeraa",PRIMERAB:"/primerab",PRIMERAC:"/primerac",PRIMERAD1:"/primerad1",PRIMERAD2:"/primerad2",ARGENLIGAZ1:"/argenligazona1",ARGENLIGAZ2:"/argenligazona2",ARGENLIGABZ1:"/argenligabzona1",ARGENLIGABZ2:"/argenligabzona2",PRIMERAAFEM:"/primeraafemenino",PRIMERABFEM:"/primerabfemenino",PRIMERACFEM:"/primeracfemenino",PLAYOFFA:"/primeraa",PLAYOFFB:"/primerab",PLAYOFFC:"/primerac",PLAYOFFD:"/primerad1",PLAYOFFD:"/primerad2",PLAYOFFAFEM:"/primeraafemenino",PLAYOFFBFEM:"/primerabfemenino",PLAYOFFCFEM:"/primeracfemenino",PLAYOFFSURU:"/uruguay",PLAYOFFARGENLIGAZ1:"/argenligazona1",PLAYOFFARGENLIGAZ2:"/argenligazona2",PLAYOFFARGENLIGABZ1:"/argenligabzona1",PLAYOFFARGENLIGABZ2:"/argenligabzona2",AMISTOSOINT:"/amistososinternacionalesfutsal",LNFA:"/lnfafutsal",COPAAMERICA:"/copaamericafutsal",LIBERTADORES:"/copalibertadoresfutsal",FFLIBERTADORES:"/copalibertadoresfutsal",LIBERTADORESFEM:"/copalibertadoresfemeninafutsal",FFLIBERTADORESFEM:"/copalibertadoresfemeninafutsal",COPADEORO:"/copadeorofutsal",COPADEPLATA:"/copadeplatafutsal",UEFACLASIFICACION:"/uefaclasificacionmunadialfutsal",PLAYOFFUEFACLASIFICACION:"/uefaclasificacionmunadialfutsal",COPAAFRICA:"/copaafricafutsal",FFCOPAAFRICA:"/copaafricafutsal",COPAASIA:"/copaasiafutsal",FFCOPAASIA:"/copaasiafutsal",CONCACAF:"/concacaffutsal",FFCONCACAF:"/concacaffutsal",DESEMPATEC:"/primerac",CAMPEOND:"/primerad",DESEMPATED1:"/primerad1",DESEMPATED2:"/primerad2",AufPRIMERA:"/uruguay",INTEGRACION:"/integracion",COPAARGENTINA:"/copaargentinafutsal",COPAARGENTINAFEM:"/copaargentinafemeninafutsal",MUNDIAL:"/mundialfutsal",FFMUNDIAL:"/mundialfutsal",LNFS:"/españafutsal"},y=b=>b==="PRIMERAAFEM"||b==="PRIMERABFEM"||b==="PRIMERACFEM"||b==="PLAYOFFAFEM"||b==="PLAYOFFBFEM"||b==="PLAYOFFCFEM"||b==="LIBERTADORESFEM"||b==="FFLIBERTADORESFEM"||b==="COPAARGENTINAFEM"||b==="COPAOROFEM"?"#350070":"#001C31",v=["LIBERTADORESFEM","FFLIBERTADORESFEM","LIBERTADORES","FFLIBERTADORES"];return i(ee,{children:p(ae,{className:"anchoInicio mb-5",children:[p(Xe,{children:[i("title",{children:" SEGUNDOPALO - Futsal AFA Primera A, B, C, D - Fixture completo con tabla de posiciones"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera A, B, C, D : tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),i(V,{children:p($,{style:{display:"flex",justifyContent:"center"},children:[p("a",{href:"/",className:"btn btn-secondary btn-sm fw-bolder ",style:{display:"flex",flexDirection:"column",borderRadius:"15px 0px 0px 15px"},children:[i(Wq,{style:{marginLeft:10}}),"HOY"]}),p("h6",{className:"text-center text-white fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:15,display:"flex",alignItems:"center",justifyContent:"center",height:"100%",backgroundColor:"#001c31",width:"100%"},children:[" PARTIDOS ",i("br",{})," MAÑANA"]})]})}),i(V,{children:i("div",{className:"mt-1 mb-1 ",children:i(et,{})})}),t&&Object.entries(t).length===0?p(ae,{className:"mt-5",style:{display:"flex",justifyContent:"center",flexDirection:"column",backgroundColor:"#001c31"},children:[i(V,{children:i($,{children:i("p",{className:"text-center text-white mt-4 fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"1em"},children:"MAÑANA NO HAY PARTIDOS, TE INVITAMOS A REVISAR LAS TABLAS DE POSICIONES"})})}),i(V,{children:p($,{style:{display:"flex",justifyContent:"center"},children:[i(ve,{href:"/primeraa",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA A"})}),i(ve,{to:"/primerab",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA B"})}),i(ve,{to:"/primerac",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA C"})}),i(ve,{to:"/primerad1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA D1"})}),i(ve,{to:"/primerad2",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA D2"})})]})}),i(V,{children:i($,{className:"mt-4",style:{display:"flex",justifyContent:"center"},children:i(ve,{to:"/uruguay",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"PRIMERA URUGUAY"})})})}),i(V,{children:p($,{className:"mt-4",style:{display:"flex",justifyContent:"center"},children:[i(ve,{to:"/argenligazona1",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"ARGENLIGA Z1"})}),i(ve,{to:"/argenligazona2",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"ARGENLIGA Z2"})}),i(ve,{to:"/laambaelite",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"white"},children:"LAAMBA"})})]})}),i(V,{children:i($,{className:"mt-5 mb-5",style:{display:"flex",justifyContent:"center"},children:i(ve,{to:"/pruebajugadoresfutsal",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:"new-section-button m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:15,backgroundColor:"white"},children:"VER PRUEBAS JUGADORES"})})})})]}):p(ae,{style:{display:"flex",justifyContent:"center",flexDirection:"column"},children:[i(V,{children:i($,{className:"mt-1 mb-1",style:{display:"flex",justifyContent:"center"},children:i(ve,{href:"/futuro",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:p("button",{className:"new-section-button m-1 btn text-dark fw-bolder btn-sm",style:{fontSize:15,backgroundColor:"#f2b700",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},onClick:()=>window.location.href="/futuro",children:[i("span",{children:"SEGUND⚽PALO - FUTURO"}),i("span",{style:{fontSize:"13px"},children:"(INFERIORES)"})]})})})}),i(V,{children:i($,{className:" mb-1",style:{display:"flex",justifyContent:"center"},children:i(ve,{to:"/rankingfifa",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:"new-section-button m-1 btn text-white fw-bolder btn-sm",style:{fontSize:15,backgroundColor:"#045694",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",borderColor:"white"},children:i("span",{children:"RANKING SELECCIONES FIFA"})})})})})]}),Object.entries(t).sort((b,P)=>{const F=b[0],I=P[0],T=A.indexOf(F),q=A.indexOf(I);return T-q}).map(([b,P])=>i(ee,{children:i($,{children:p(Ie,{bordered:!0,className:"border border-dark ",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{style:{backgroundColor:"white"},children:p(Fe.Fragment,{children:[i("tr",{children:i("td",{className:"text-center text-white tituloPartidos fw-bolder",style:{fontSize:15,backgroundColor:y(b),fontFamily:"Roboto Condensed, sans-serif"},colSpan:"6",children:p("a",{href:N[b],style:{color:"white",textDecoration:"none"},children:[R(k[b])," ",O(b)," ",R(k[b])]})})}),P.map(F=>{var pe,ye,Pe,Me,He,ie,Se;const I=F.equipolocal,T=F.equipovisitante,q=F.transmision,W=(pe=n.find(he=>he.nombre===I))==null?void 0:pe.escudos,G=(ye=n.find(he=>he.nombre===T))==null?void 0:ye.escudos,H=(Pe=s.find(he=>he.idTv===q))==null?void 0:Pe.logo,j=F.hora,U=j===null?"":Re(j,"HH:mm:ss").format("HH:mm"),L=u===F.id&&F.estado==="Jugandose"?"#dc3545":"white",K=u===F.id&&F.estado==="Jugandose"?"white":"black",Y=(Me=n.find(he=>he.nombre===I))==null?void 0:Me.pais,te=(He=n.find(he=>he.nombre===T))==null?void 0:He.pais,J=he=>`https://flagcdn.com/w20/${he.toLowerCase()}.png`,Q=he=>`https://flagcdn.com/w40/${he.toLowerCase()}.png 2x`,oe=he=>v.includes(b)&&he?i(ee,{children:i("div",{children:i("img",{style:{marginBottom:5,marginLeft:3,width:"15px",height:"10px"},src:J(he),srcSet:Q(he),alt:he})})}):null;return p(Fe.Fragment,{children:[i("tr",{children:F.fechapendiente!==null&&F.fechapendiente>=1?p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:["Pendiente Fecha ",F.fechapendiente]}):null}),i("tr",{children:F.faseCopas!==null?i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:F.faseCopas}):null}),i("tr",{children:F.partidoPlayOff==="Vuelta"&&F.torneo!=="PLAYOFFA"?p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:["Ida ",c.filter(he=>he.equipolocal===F.equipovisitante&&he.equipovisitante===F.equipolocal).map(he=>he.golesvisitante),"-",c.filter(he=>he.equipolocal===F.equipovisitante&&he.equipovisitante===F.equipolocal).map(he=>he.goleslocal)]}):F.partidoPlayOff==="Vuelta"&&F.torneo==="PLAYOFFA"?p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:["Vuelta- serie a favor de ",c.filter(he=>he.equipolocal===F.equipovisitante&&he.equipovisitante===F.equipolocal).map(he=>he.ganador)]}):null}),i("tr",{children:F.partidoPlayOff==="Ida"?i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:"Ida"}):null}),p("tr",{children:[F.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder ",style:{fontSize:13,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):F.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",F.motivossuspension,")"]})]}):F.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:F.estado}):F.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Parc ",H&&i("img",{src:H,alt:q,style:{width:"18px",height:"18px"}})]}):F.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif"},children:[F.tiempodelpartido,H&&i("img",{src:H,alt:q,style:{width:"18px",height:"18px",marginLeft:"2px"}}),F.crono==="Si"&&F.tiempodelpartido!=="ET"?i("div",{style:{fontSize:"11px"},children:F.reloj!==null?i(gA,{tiempoInicial:F.reloj}):i(mA,{partidoId:F.id,tiempodelpartido:F.tiempodelpartido,crono:F.crono,estado:F.estado})}):null]}):F.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[p("div",{style:{display:"flex",justifyContent:"center"},children:[U," ",H&&i("img",{src:H,alt:q,style:{width:"18px",height:"18px"}})]}),i("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:F.estadio})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[p("div",{className:"d-flex justify-content-center",children:[oe(Y),W&&i("img",{src:W,alt:I,style:{width:"15px",height:"15px"}})]}),i("span",{style:{height:"auto"},children:I})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:15,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:L,color:K,width:"auto"},children:[F.estado!=="Pendiente"?F.goleslocal:null,F.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+F.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:15,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:L,color:K},children:[F.estado!=="Pendiente"?F.golesvisitante:null,F.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+F.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[p("div",{className:"d-flex justify-content-center",children:[oe(te),G&&i("img",{src:G,alt:T,style:{width:"15px",height:"15px"}})]}),i("span",{style:{height:"auto"},children:T})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[F.linkgoles===null||F.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(F.linkgoles,{id:F.id,estado:F.estado,equipolocal:F.equipolocal,equipovisitante:F.equipovisitante,goleslocal:F.goleslocal,penaleslocal:F.penaleslocal,penalesvisitante:F.penalesvisitante,golesvisitante:F.golesvisitante,escudoLocal:W,escudoVisitante:G,tiempodelpartido:F.tiempodelpartido,hora:U,fecha:F.fecha,goleadoresLocal:F.goleadoresLocal,goleadoresVisitante:F.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"19px",color:"black"}})}),F.linkvivo===null||F.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{var he,Je;h(F.linkvivo,{id:F.id,estado:F.estado,equipolocal:F.equipolocal,equipovisitante:F.equipovisitante,goleslocal:F.goleslocal,penaleslocal:F.penaleslocal,penalesvisitante:F.penalesvisitante,golesvisitante:F.golesvisitante,escudoLocal:W,escudoVisitante:G,tiempodelpartido:F.tiempodelpartido,hora:U,fecha:F.fecha,goleadoresLocal:F.goleadoresLocal,goleadoresVisitante:F.goleadoresVisitante,estadio:F.estadio,transmision:(he=s.find(Ct=>Ct.idTv===F.transmision))==null?void 0:he.nombre,imgCanalTv:(Je=s.find(Ct=>Ct.idTv===F.transmision))==null?void 0:Je.logo}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Ya,{style:{fontSize:"19px",color:"red"}})})]})})]},F.id),F.estado!=="Pendiente"&&(F.goleadoresLocal||F.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(ie=F.goleadoresLocal)==null?void 0:ie.split(",").map((he,Je)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[Je>0&&"-",he.trim().slice(0,-1)]},Je))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(Se=F.goleadoresVisitante)==null?void 0:Se.split(",").map((he,Je)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[Je>0&&"-",he.trim().slice(0,-1)]},Je))})})]})]},F.id)}),i("tr",{className:"seccionTorneo",style:{borderColor:"transparent",backgroundColor:"black"},children:i("td",{className:"text-center fw-bolder ",style:{padding:"0px 0",borderColor:"transparent"},colSpan:"3",children:i("div",{style:{backgroundColor:"#003d63",color:"white",fontSize:"10px",fontFamily:"Roboto Condensed, sans-serif",border:"none",padding:"0px 0",borderColor:"transparent"},children:p("a",{href:N[b],style:{color:"white",textDecoration:"none",display:"block"},children:["Seccion ",i("br",{})," ",i("span",{style:{fontSize:"10px"},children:O(b)})]})})})})]},b)})]})},b)})),i(V,{className:"mt-5",children:i($,{children:i(pve,{equipos:n})})}),i(V,{children:i($,{className:"d-flex justify-content-center",children:i(ve,{to:"/calendario",style:{fontFamily:"Roboto Condensed, sans-serif"},children:i("button",{className:" m-1 btn text-white fw-bolder btn-sm ",style:{fontSize:10,backgroundColor:"#001c31",fontSize:13},children:"CALENDARIO EXTENDIDO"})})})})]})})},PD=()=>{const[t,e]=C.useState([]),[n,r]=C.useState(!0),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),{dataEquipos:u}=nr();C.useEffect(()=>{f(),g(),E(),S();const w=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},h=>{f()}).subscribe(),_=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},h=>{getDataEquipos()}).subscribe();return()=>{w.unsubscribe(),_.unsubscribe()}},[]);const f=async()=>{try{const{data:w,error:_}=await z.from("Fixture2023").select("*").eq("torneo","PRIMERAB").eq("añoTorneo",2024);_?console.error("Error",_):(e(w),r(!1))}catch(w){console.error("Error",w.message)}},g=async()=>{try{const{data:w,error:_}=await z.from("CanalesTv").select("*");_?console.error("Error",_):(o(w),r(!1))}catch(w){console.error("Error",w.message)}},E=async()=>{try{const{data:w,error:_}=await z.from("Goleadores").select("*").eq("torneo","PRIMERAB").eq("añoGoleadores",2024);_?console.error("Error",_):l(w)}catch(w){console.error("Error",w.message)}},S=async()=>{try{const{data:w,error:_}=await z.from("listado_2024").select("*").eq("torneo","PLAYOFFB");_?console.error("Error",_):(d(w),r(!1))}catch(w){console.error("Error",w.message)}};return n?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL AFA PRIMERA B- PRIMERA - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera B: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"FUTSAL AFA PRIMERA B",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{className:"bannerParaPc",children:i(cs,{})})}),i(V,{children:i($,{className:"",children:i(et,{})})}),i(V,{children:i($,{md:12})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:u})}),p($,{md:6,children:[i(ls,{}),i(Tn,{dataFixture:t,dataEquipos:u,canalesTv:s}),i(Vt,{goleadores:a,dataEquipos:u})]})]})]})]})},mve=({dataEquipos:t,dataFixture:e,canalesTvPlayoff:n})=>{const[r,s]=C.useState(!0),[o,a]=C.useState([]),[l,c]=C.useState([]),[d,u]=C.useState([]),[f,g]=C.useState([]),E=e||[];console.log("fx",E),C.useEffect(()=>{c(t),u(n),a(S(e)),s(!1)},[t,e]);const S=k=>{const R={};k.forEach(N=>{const y="DESEMPATE DESAFILIACIÓN",v=N.llavePlayOff;N.partidoPlayOff,R[y]||(R[y]={}),R[y][v]||(R[y][v]=[]),R[y][v].push(N)});const O={};return Object.keys(R).sort().forEach(N=>{O[N]={},Object.keys(R[N]).sort().forEach(y=>{R[N][y].sort((v,b)=>v.partidoPlayOff<b.partidoPlayOff?-1:v.partidoPlayOff>b.partidoPlayOff?1:0),O[N][y]=R[N][y]})}),O},w=S(E),_=Object.fromEntries(Object.entries(w).map(([k,R])=>{const O=Object.fromEntries(Object.entries(R).map(([N,y])=>{const v=y.filter(b=>b.equipolocal!=="A conf"||b.equipovisitante!=="A conf");return[N,v]}).filter(([N,y])=>y.length>0));return[k,O]}).filter(([k,R])=>Object.keys(R).length>0)),h=(k,R)=>{m("/videos",{state:{url:k,data:R}})},m=Rt();if(r)return i("div",{className:"d-flex justify-content-center",style:{marginTop:250},children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})});const A=["Desempate"];return i(ee,{children:p(ae,{className:"anchoPlayoff",children:[Object.entries(_).sort((k,R)=>{const O=k[0],N=R[0],y=A.indexOf(O),v=A.indexOf(N);return y-v}).map(([k,R])=>i(ee,{children:p(ae,{className:" mt-1",children:[p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"18px"},children:[" ",k.toUpperCase()]}),i($,{children:Object.entries(R).map(([O,N])=>i(ee,{children:i($,{md:12,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{children:Array.isArray(N)&&N.map(y=>{var U,L,K,Y,te;const v=y.equipolocal,b=y.equipovisitante,P=y.transmision,F=Array.isArray(l)?(U=l.find(J=>J.nombre===v))==null?void 0:U.escudos:void 0,I=Array.isArray(l)?(L=l.find(J=>J.nombre===b))==null?void 0:L.escudos:void 0,T=(K=d.find(J=>J.idTv===P))==null?void 0:K.logo,q=y.hora?se(y.hora,"HH:mm:ss").format("HH:mm"):"A conf",W=f===y.id&&y.estado==="Jugandose"?"#dc3545":"white",G=f===y.id&&y.estado==="Jugandose"?"white":"black",H=se(y.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("DD/MM"),j=se(y.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("dddd").toUpperCase();return p(Fe.Fragment,{children:[y.fecha!==null?i("tr",{children:p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[j," ",H]})}):i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"FECHA Y HORA A CONFIRMAR"}),i("tr",{children:i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:y.partidoPlayOff})}),p("tr",{children:[y.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder",style:{fontSize:9,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):y.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",y.motivossuspension,")"]})]}):y.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:y.estado}):y.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Parc ",T&&i("img",{src:T,alt:P,style:{width:"20px",height:"20px"}})]}):y.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:[y.tiempodelpartido," ",T&&i("img",{src:T,alt:P,style:{width:"20px",height:"20px"}})]}):y.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[y.hora===""?i(ee,{children:"A conf"}):q," ",T&&i("img",{src:T,alt:P,style:{width:"20px",height:"20px"}}),i("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"}})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[F&&i("img",{src:F,alt:v,style:{width:"15px",height:"15px"}})," ",i("span",{style:{height:"auto"},children:v!==""?v:"A conf"})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:W,color:G,width:"auto"},children:[y.estado!=="Pendiente"?y.goleslocal:null,y.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+y.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:W,color:G},children:[y.estado!=="Pendiente"?y.golesvisitante:null,y.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+y.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[I&&i("img",{src:I,alt:b,style:{width:"15px",height:"15px"}})," ",p("span",{style:{height:"auto"},children:[" ",b!==""?b:"A conf"]})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[y.linkgoles===null||y.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(y.linkgoles,{id:y.id,estado:y.estado,equipolocal:y.equipolocal,equipovisitante:y.equipovisitante,goleslocal:y.goleslocal,penaleslocal:y.penaleslocal,penalesvisitante:y.penalesvisitante,golesvisitante:y.golesvisitante,escudoLocal:F,escudoVisitante:I,tiempodelpartido:y.tiempodelpartido,hora:q,fecha:y.fecha,goleadoresLocal:y.goleadoresLocal,goleadoresVisitante:y.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})}),y.linkvivo===null||y.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(y.linkvivo,{id:y.id,estado:y.estado,equipolocal:y.equipolocal,equipovisitante:y.equipovisitante,goleslocal:y.goleslocal,penaleslocal:y.penaleslocal,penalesvisitante:y.penalesvisitante,golesvisitante:y.golesvisitante,escudoLocal:F,escudoVisitante:I,tiempodelpartido:y.tiempodelpartido,hora:q,goleadoresLocal:y.goleadoresLocal,goleadoresVisitante:y.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(PiTelevisionDuotone,{style:{fontSize:"19px",color:"red"}})})]})})]},y.id),(y.goleadoresLocal||y.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(Y=y.goleadoresLocal)==null?void 0:Y.split(",").map((J,Q)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[Q>0&&"-",J.trim().slice(0,-1)]},Q))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(te=y.goleadoresVisitante)==null?void 0:te.split(",").map((J,Q)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[Q>0&&"-",J.trim().slice(0,-1)]},Q))})})]})]},y.id)})})]})})}))},k)]})})),i(V,{})]})})},sj=({dataEquipos:t,dataFixture:e,canalesTvPlayoff:n})=>{const[r,s]=C.useState(!0),[o,a]=C.useState([]),[l,c]=C.useState([]),[d,u]=C.useState([]),[f,g]=C.useState([]),E=e||[];C.useEffect(()=>{c(t),u(n),a(S(e)),s(!1)},[t,e]);const S=k=>{const R={};k.forEach(N=>{const y="DEFINICIÓN CAMPEÓN",v=N.llavePlayOff;N.partidoPlayOff,R[y]||(R[y]={}),R[y][v]||(R[y][v]=[]),R[y][v].push(N)});const O={};return Object.keys(R).sort().forEach(N=>{O[N]={};const y=["Ida","Vuelta","Tercer partido"];Object.keys(R[N]).sort().forEach(v=>{R[N][v].sort((b,P)=>y.indexOf(b.partidoPlayOff)-y.indexOf(P.partidoPlayOff)),O[N][v]=R[N][v]})}),O},w=S(E),_=Object.fromEntries(Object.entries(w).map(([k,R])=>{const O=Object.fromEntries(Object.entries(R).map(([N,y])=>{const v=y.filter(b=>b.equipolocal!=="A conf"||b.equipovisitante!=="A conf");return[N,v]}).filter(([N,y])=>y.length>0));return[k,O]}).filter(([k,R])=>Object.keys(R).length>0)),h=(k,R)=>{m("/videos",{state:{url:k,data:R}})},m=Rt();if(r)return i("div",{className:"d-flex justify-content-center",style:{marginTop:250},children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})});const A=["Final","Semi final","Cuartos de final"];return p(ae,{className:"anchoPlayoff",children:[Object.entries(_).sort((k,R)=>{const O=k[0],N=R[0],y=A.indexOf(O),v=A.indexOf(N);return y-v}).map(([k,R])=>i(ee,{children:p(ae,{className:" mt-1",children:[p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"18px"},children:[" ",k.toUpperCase()]}),i($,{children:Object.entries(R).map(([O,N])=>i(ee,{children:i($,{md:12,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{children:Array.isArray(N)&&N.map(y=>{var U,L,K,Y,te;const v=y.equipolocal,b=y.equipovisitante,P=y.transmision,F=Array.isArray(l)?(U=l.find(J=>J.nombre===v))==null?void 0:U.escudos:void 0,I=Array.isArray(l)?(L=l.find(J=>J.nombre===b))==null?void 0:L.escudos:void 0,T=(K=d.find(J=>J.idTv===P))==null?void 0:K.logo,q=y.hora?se(y.hora,"HH:mm:ss").format("HH:mm"):"A conf",W=f===y.id&&y.estado==="Jugandose"?"#dc3545":"white",G=f===y.id&&y.estado==="Jugandose"?"white":"black",H=se(y.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("DD/MM"),j=se(y.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("dddd").toUpperCase();return p(Fe.Fragment,{children:[y.fecha!==null?i("tr",{children:p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[j," ",H]})}):i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"FECHA Y HORA A CONFIRMAR"}),i("tr",{children:i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:y.partidoPlayOff})}),p("tr",{children:[y.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder",style:{fontSize:9,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):y.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",y.motivossuspension,")"]})]}):y.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:y.estado}):y.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Parc ",T&&i("img",{src:T,alt:P,style:{width:"20px",height:"20px"}})]}):y.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:[y.tiempodelpartido," ",T&&i("img",{src:T,alt:P,style:{width:"20px",height:"20px"}})]}):y.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[y.hora===""?i(ee,{children:"A conf"}):q," ",T&&i("img",{src:T,alt:P,style:{width:"20px",height:"20px"}}),i("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"}})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[F&&i("img",{src:F,alt:v,style:{width:"15px",height:"15px"}})," ",i("span",{style:{height:"auto"},children:v!==""?v:"A conf"})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:W,color:G,width:"auto"},children:[y.estado!=="Pendiente"?y.goleslocal:null,y.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+y.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:W,color:G},children:[y.estado!=="Pendiente"?y.golesvisitante:null,y.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+y.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[I&&i("img",{src:I,alt:b,style:{width:"15px",height:"15px"}})," ",p("span",{style:{height:"auto"},children:[" ",b!==""?b:"A conf"]})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[y.linkgoles===null||y.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(y.linkgoles,{id:y.id,estado:y.estado,equipolocal:y.equipolocal,equipovisitante:y.equipovisitante,goleslocal:y.goleslocal,penaleslocal:y.penaleslocal,penalesvisitante:y.penalesvisitante,golesvisitante:y.golesvisitante,escudoLocal:F,escudoVisitante:I,tiempodelpartido:y.tiempodelpartido,hora:q,fecha:y.fecha,goleadoresLocal:y.goleadoresLocal,goleadoresVisitante:y.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})}),y.linkvivo===null||y.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(y.linkvivo,{id:y.id,estado:y.estado,equipolocal:y.equipolocal,equipovisitante:y.equipovisitante,goleslocal:y.goleslocal,penaleslocal:y.penaleslocal,penalesvisitante:y.penalesvisitante,golesvisitante:y.golesvisitante,escudoLocal:F,escudoVisitante:I,tiempodelpartido:y.tiempodelpartido,hora:q,goleadoresLocal:y.goleadoresLocal,goleadoresVisitante:y.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Ya,{style:{fontSize:"19px",color:"red"}})})]})})]},y.id),(y.goleadoresLocal||y.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(Y=y.goleadoresLocal)==null?void 0:Y.split(",").map((J,Q)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[Q>0&&"-",J.trim().slice(0,-1)]},Q))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(te=y.goleadoresVisitante)==null?void 0:te.split(",").map((J,Q)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[Q>0&&"-",J.trim().slice(0,-1)]},Q))})})]})]},y.id)})})]})})}))},k)]})})),i(V,{})]})},gve=()=>{const[t,e]=C.useState([]),[n,r]=C.useState(!0),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]),[g,E]=C.useState([]),{dataEquipos:S}=nr();C.useEffect(()=>{w(),_(),h(),m(),A(),k();const R=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},N=>{m(),A(),k()}).subscribe(),O=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},N=>{getDataEquipos()}).subscribe();return()=>{R.unsubscribe(),O.unsubscribe()}},[]);const w=async()=>{try{const{data:R,error:O}=await z.from("listado_2024").select("*").eq("torneo","PRIMERAD1");O?console.error("Error",O):(e(R),r(!1))}catch(R){console.error("Error",R.message)}},_=async()=>{try{const{data:R,error:O}=await z.from("CanalesTv").select("*");O?console.error("Error",O):(o(R),r(!1))}catch(R){console.error("Error",R.message)}},h=async()=>{try{const{data:R,error:O}=await z.from("Goleadores").select("*").eq("torneo","PRIMERAD1").eq("añoGoleadores",2024);O?console.error("Error",O):l(R)}catch(R){console.error("Error",R.message)}},m=async()=>{try{const{data:R,error:O}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFD").eq("añoTorneo",2024);O?console.error("Error",O):(d(R),r(!1))}catch(R){console.error("Error",R.message)}},A=async()=>{try{const{data:R,error:O}=await z.from("Fixture2023").select("*").eq("torneo","CAMPEOND").eq("añoTorneo",2024);O?console.error("Error",O):(f(R),r(!1))}catch(R){console.error("Error",R.message)}},k=async()=>{try{const{data:R,error:O}=await z.from("Fixture2023").select("*").eq("torneo","DESEMPATED1").eq("añoTorneo",2024);O?console.error("Error",O):(E(R),r(!1))}catch(R){console.error("Error",R.message)}};return n?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL AFA PRIMERA D ZONA A- PRIMERA - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera D: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"FUTSAL AFA PRIMERA D1",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{className:"bannerParaPc",children:i(cs,{})})}),i(V,{children:i($,{className:"",children:i(et,{})})}),p(V,{children:[i($,{md:12,className:"text-center d-flex justify-content-center mb-2",children:i(sj,{dataFixture:u,dataEquipos:S,canalesTvPlayoff:s})}),p($,{md:12,children:[i(Fo,{dataFixture:c,dataEquipos:S,canalesTvPlayoff:s}),i(mve,{dataFixture:g,dataEquipos:S,canalesTvPlayoff:s})]})]}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:S})}),p($,{md:6,children:[i(ls,{}),i(Tn,{dataFixture:t,dataEquipos:S,canalesTv:s}),i(Vt,{goleadores:a,dataEquipos:S})]})]})]})]})},yve=()=>{const[t,e]=C.useState([]),[n,r]=C.useState(!0),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]),{dataEquipos:g}=nr();C.useEffect(()=>{E(),S(),w(),_(),h();const m=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},k=>{_(),h()}).subscribe(),A=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},k=>{getDataEquipos()}).subscribe();return()=>{m.unsubscribe(),A.unsubscribe()}},[]);const E=async()=>{try{const{data:m,error:A}=await z.from("listado_2024").select("*").eq("torneo","PRIMERAD2");A?console.error("Error",A):(e(m),r(!1))}catch(m){console.error("Error",m.message)}},S=async()=>{try{const{data:m,error:A}=await z.from("CanalesTv").select("*");A?console.error("Error",A):(o(m),r(!1))}catch(m){console.error("Error",m.message)}},w=async()=>{try{const{data:m,error:A}=await z.from("Goleadores").select("*").eq("torneo","PRIMERAD2").eq("añoGoleadores",2024);A?console.error("Error",A):l(m)}catch(m){console.error("Error",m.message)}},_=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFD").eq("añoTorneo",2024);A?console.error("Error",A):(f(m),r(!1))}catch(m){console.error("Error",m.message)}},h=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").eq("torneo","CAMPEOND").eq("añoTorneo",2024);A?console.error("Error",A):(d(m),console.log(m),r(!1))}catch(m){console.error("Error",m.message)}};return n?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL AFA PRIMERA D ZONA B- PRIMERA - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera D: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"FUTSAL AFA PRIMERA D2",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{className:"bannerParaPc",children:i(cs,{})})}),i(V,{children:i($,{className:"",children:i(et,{})})}),p(V,{children:[i($,{md:12,className:"text-center d-flex justify-content-center mb-2",children:i(sj,{dataFixture:c,dataEquipos:g,canalesTvPlayoff:s})}),"*",i($,{md:12,children:i(Fo,{dataFixture:u,dataEquipos:g,canalesTvPlayoff:s})})]}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:g})}),p($,{md:6,children:[i(ls,{}),i(Tn,{dataFixture:t,dataEquipos:g,canalesTv:s}),i(Vt,{goleadores:a,dataEquipos:g})]})]})]})]})},bve=()=>{const[t,e]=C.useState([]),[n,r]=C.useState(!0),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),{dataEquipos:u}=nr();C.useEffect(()=>{f(),g(),E(),S();const w=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},h=>{S()}).subscribe(),_=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},h=>{getDataEquipos()}).subscribe();return()=>{w.unsubscribe(),_.unsubscribe()}},[]);const f=async()=>{try{const{data:w,error:_}=await z.from("listado_2024").select("*").eq("torneo","ARGENLIGAZ1");_?console.error("Error",_):(e(w),r(!1))}catch(w){console.error("Error",w.message)}},g=async()=>{try{const{data:w,error:_}=await z.from("CanalesTv").select("*");_?console.error("Error",_):(o(w),r(!1))}catch(w){console.error("Error",w.message)}},E=async()=>{try{const{data:w,error:_}=await z.from("Goleadores").select("*").eq("torneo","ARGENLIGAZ1").eq("añoGoleadores",2024);_?console.error("Error",_):l(w)}catch(w){console.error("Error",w.message)}},S=async()=>{try{const{data:w,error:_}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFARGENLIGAZ1").eq("añoTorneo",2024);_?console.error("Error",_):(d(w),r(!1))}catch(w){console.error("Error",w.message)}};return n?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL ARGENLIGA - PRIMERA - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal ARGENLIGA Primera ZONA 1: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"FUTSAL ARGENLIGA Z1",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{className:"bannerParaPc",children:i(cs,{})})}),i(V,{children:i($,{className:"",children:i(et,{})})}),i(V,{children:i($,{md:12,children:i(Fo,{dataFixture:c,dataEquipos:u,canalesTvPlayoff:s})})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:u})}),p($,{md:6,children:[i(ls,{}),i(Tn,{dataFixture:t,dataEquipos:u,canalesTv:s}),i(Vt,{goleadores:a,dataEquipos:u})]})]})]})]})},vve=()=>{const[t,e]=C.useState([]),[n,r]=C.useState(!0),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),{dataEquipos:u}=nr();C.useEffect(()=>{f(),g(),E(),S();const w=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},h=>{S()}).subscribe(),_=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},h=>{getDataEquipos()}).subscribe();return()=>{w.unsubscribe(),_.unsubscribe()}},[]);const f=async()=>{try{const{data:w,error:_}=await z.from("listado_2024").select("*").eq("torneo","ARGENLIGAZ2");_?console.error("Error",_):(e(w),r(!1))}catch(w){console.error("Error",w.message)}},g=async()=>{try{const{data:w,error:_}=await z.from("CanalesTv").select("*");_?console.error("Error",_):(o(w),r(!1))}catch(w){console.error("Error",w.message)}},E=async()=>{try{const{data:w,error:_}=await z.from("Goleadores").select("*").eq("torneo","ARGENLIGAZ2").eq("añoGoleadores",2024);_?console.error("Error",_):l(w)}catch(w){console.error("Error",w.message)}},S=async()=>{try{const{data:w,error:_}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFARGENLIGAZ2").eq("añoTorneo",2024);_?console.error("Error",_):(d(w),r(!1))}catch(w){console.error("Error",w.message)}};return n?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL ARGENLIGA - PRIMERA - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal ARGENLIGA Primera ZONA 1: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"FUTSAL ARGENLIGA Z2",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{className:"bannerParaPc",children:i(cs,{})})}),i(V,{children:i($,{className:"",children:i(et,{})})}),i(V,{children:i($,{md:12,children:i(Fo,{dataFixture:c,dataEquipos:u,canalesTvPlayoff:s})})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:u})}),p($,{md:6,children:[i(ls,{}),i(Tn,{dataFixture:t,dataEquipos:u,canalesTv:s}),i(Vt,{goleadores:a,dataEquipos:u})]})]})]})]})};function OD(t){return Pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Calendar"},child:[{tag:"path",attr:{d:`M18.438,4.954H16.5c0-0.346,0-0.691,0-1.036c0-0.124,0-0.248,0-0.372c0-0.262-0.23-0.512-0.5-0.5 c-0.271,0.012-0.5,0.22-0.5,0.5c0,0.469,0,0.939,0,1.408h-7c0-0.346,0-0.691,0-1.036c0-0.124,0-0.248,0-0.372 c0-0.262-0.23-0.512-0.5-0.5c-0.271,0.012-0.5,0.22-0.5,0.5c0,0.469,0,0.939,0,1.408H5.562c-1.378,0-2.5,1.122-2.5,2.5v11 c0,1.379,1.122,2.5,2.5,2.5h12.875c1.379,0,2.5-1.121,2.5-2.5v-11C20.938,6.076,19.816,4.954,18.438,4.954z M5.562,5.954H7.5 c0,0.073,0,0.147,0,0.22c0,0.124,0,0.248,0,0.372c0,0.262,0.23,0.512,0.5,0.5c0.271-0.012,0.5-0.22,0.5-0.5c0-0.197,0-0.394,0-0.592 h7c0,0.073,0,0.147,0,0.22c0,0.124,0,0.248,0,0.372c0,0.262,0.23,0.512,0.5,0.5c0.271-0.012,0.5-0.22,0.5-0.5 c0-0.197,0-0.394,0-0.592h1.937c0.827,0,1.5,0.673,1.5,1.5v1.584H4.062V7.454C4.062,6.627,4.735,5.954,5.562,5.954z M18.438,19.954 H5.562c-0.827,0-1.5-0.673-1.5-1.5v-8.416h15.875v8.416C19.938,19.281,19.265,19.954,18.438,19.954z`},child:[]}]}]})(t)}function _ve(t){return Pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Menu_Fries"},child:[{tag:"path",attr:{d:"M20.437,19.937c0.276,0 0.5,0.224 0.5,0.5c0,0.276 -0.224,0.5 -0.5,0.5l-16.874,0.002c-0.276,-0 -0.5,-0.224 -0.5,-0.5c-0,-0.276 0.224,-0.5 0.5,-0.5l16.874,-0.002Z"},child:[]},{tag:"path",attr:{d:"M20.437,11.5c0.276,-0 0.5,0.224 0.5,0.5c0,0.276 -0.224,0.5 -0.5,0.5l-10,0.001c-0.276,-0 -0.5,-0.224 -0.5,-0.5c-0,-0.276 0.224,-0.5 0.5,-0.5l10,-0.001Z"},child:[]},{tag:"path",attr:{d:"M20.437,3.062c0.276,-0 0.5,0.224 0.5,0.5c0,0.276 -0.224,0.5 -0.5,0.5l-16.874,0.001c-0.276,-0 -0.5,-0.224 -0.5,-0.5c-0,-0.276 0.224,-0.5 0.5,-0.5l16.874,-0.001Z"},child:[]}]}]})(t)}const wve=()=>{C.useState([]);const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]),[g,E]=C.useState([]),[S,w]=C.useState(!0),_=async()=>{const q=se().format("YYYY-MM-DD");let{data:W,error:G}=await z.from("Fixture2023").select("*").eq("fecha",q);G?console.log("Error",G):(e(N(W)),w(!1))},h=async()=>{const q=se().subtract(1,"days").format("YYYY-MM-DD");let{data:W,error:G}=await z.from("Fixture2023").select("*").eq("fecha",q);G?console.log("Error",G):(r(N(W)),w(!1))},m=async()=>{const q=se().add(1,"days").format("YYYY-MM-DD");let{data:W,error:G}=await z.from("Fixture2023").select("*").eq("fecha",q);G?console.log("Error",G):(o(N(W)),w(!1))},A=async()=>{const q=se().add(2,"days").format("YYYY-MM-DD");let{data:W,error:G}=await z.from("Fixture2023").select("*").eq("fecha",q);G?console.log("Error",G):(l(N(W)),w(!1))},k=async()=>{const q=se().add(3,"days").format("YYYY-MM-DD");let{data:W,error:G}=await z.from("Fixture2023").select("*").eq("fecha",q);G?console.log("Error",G):(d(N(W)),w(!1))},R=async()=>{const q=se().add(4,"days").format("YYYY-MM-DD");let{data:W,error:G}=await z.from("Fixture2023").select("*").eq("fecha",q);G?console.log("Error",G):(f(N(W)),w(!1))},O=async()=>{const q=se().add(5,"days").format("YYYY-MM-DD");let{data:W,error:G}=await z.from("Fixture2023").select("*").eq("fecha",q);G?console.log("Error",G):(E(N(W)),w(!1))};C.useEffect(()=>{_(),h(),m(),A(),k(),R(),O()},[]);const N=q=>{const W={},G={FFCOPAAMERICA:"COPA AMERICA FASE FINAL",COPAAMERICA:"COPA AMERICA",AMISTOSOINT:"AMISTOSO INTERNACIONAL",AMISTOSO:"AMISTOSO",PRIMERAA:"PRIMERA A",PRIMERAB:"PRIMERA B",PRIMERAC:"PRIMERA C",PRIMERAD1:"PRIMERA D1",PRIMERAD2:"PRIMERA D2",ARGENLIGAZ1:"ARGENLIGA Z1",ARGENLIGAZ2:"ARGENLIGA Z2",AufPRIMERA:"LIGA URUGUAY",CAMPEOND:"PRIMERA D",COPADEORO:"COPA DE ORO",COPADEPLATA:"COPA DE PLATA",DESEMPATEC:"PRIMERA C",DESEMPATED1:"PRIMERA D1",DESEMPATED2:"PRIMERA D2",LAAMBA:"PRIMERA LAAMBA",PLAYOFFARGENLIGAZ1:"PLAYOFF ARGENLIGA Z1",PLAYOFFARGENLIGAZ2:"PLAYOFF ARGENLIGA Z2",PLAYOFFARGENLIGABZ1:"PLAYOFF ARGENLIGA B Z1",PLAYOFFARGENLIGABZ2:"PLAYOFF ARGENLIGA B Z2",PLAYOFFA:"PLAYOFF PRIMERA A",PLAYOFFB:"PLAYOFF PRIMERA B",PLAYOFFC:"PLAYOFF PRIMERA C",PLAYOFFD:"PLAYOFF PRIMERA D",PLAYOFFSURU:"PLAYOFF LIGA URUGUAY",UEFACLASIFICACION:"UEFA CLASIFICACION",CONCACAFCLASIFICACION:"CONCACAF CLASIFICACION",PRIMERAAFEM:"PRIMERA A FEM",PRIMERABFEM:"PRIMERA B FEM",PRIMERACFEM:"PRIMERA C FEM",LNFA:"LIGA NACIONAL",FFLNFA:"FASE FINAL LIGA NACIONAL",INTEGRACION:"TORNEO INTEGRACION",LIBERTADORES:"COPA LIBERTADORES",FFLIBERTADORES:"COPA LIBERTADORES",COPAARGENTINA:"COPA ARGENTINA",AMISTOSOINT:"AMISTOSO INTERNACIONAL",LIBERTADORESFEM:"COPA LIBERTADORES FEM",FFLIBERTADORESFEM:"COPA LIBERTADORES FEM",PLAYOFFAFEM:"PLAYOFF PRIMERA A FEM",PLAYOFFBFEM:"PLAYOFF PRIMERA B FEM",PLAYOFFCFEM:"PLAYOFF PRIMERA C FEM"};return q.forEach(H=>{let j=G[H.torneo]||H.torneo;W[j]||(W[j]=[]),W[j].push(H)}),Object.values(W).forEach(H=>{H.sort((j,U)=>!j.hora||!U.hora?0:j.hora.localeCompare(U.hora))}),W};if(S)return i("div",{className:"d-flex justify-content-center",style:{marginTop:250},children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})});const y=se().format(" DD [de] MMMM"),v=se().subtract(1,"days").format(" DD [de] MMMM"),b=se().add(1,"days").format(" DD [de] MMMM").replace("dd","DD"),P=se().add(2,"days").format("dddd DD [de] MMMM").replace(/^\w/,q=>q.toUpperCase()),F=se().add(3,"days").format("dddd DD [de] MMMM").replace(/^\w/,q=>q.toUpperCase()),I=se().add(4,"days").format("dddd DD [de] MMMM").replace(/^\w/,q=>q.toUpperCase()),T=se().add(5,"days").format("dddd DD [de] MMMM").replace(/^\w/,q=>q.toUpperCase());return p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL ARGENTINO AFA - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera A: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo mb-5",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i(OD,{style:{marginRight:10,fontSize:25}}),"CALENDARIO",i(OD,{style:{marginLeft:10,fontSize:25}})]})})}),i(V,{children:i($,{children:i(et,{})})}),p(ae,{className:"",children:[i(V,{className:"bg-secondary text-white fw-bolder mt-4",style:{fontFamily:"Roboto Condensed, sans-serif"},children:p($,{className:"d-flex justify-content-center border border-dark",md:1,style:{flexDirection:"column",width:"100%"},children:[p("p",{className:"text-center bg-dark",style:{fontSize:"20px",textTransform:"uppercase"},children:["Ayer ",v]}),Object.entries(n).length>0?Object.entries(n).map(([q,W])=>p("div",{className:"d-flex justify-content-center ",style:{flexDirection:"column",width:"100%"},children:[i("span",{className:"text-center mt-3 ",style:{backgroundColor:"#001c31"},children:q}),W.map(G=>p("div",{className:"d-flex justify-content-center mt-2",children:[i("span",{className:"bg-success",style:{marginRight:4},children:G.hora?G.hora.substring(0,5):""})," ",G.equipolocal," vs ",G.equipovisitante]},G.id))]},q)):i("div",{className:"d-flex justify-content-center",children:"No hay partidos"})]})}),i(V,{className:"text-white fw-bolder mt-4",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#5ac382"},children:p($,{className:"d-flex justify-content-center border border-dark",md:1,style:{flexDirection:"column",width:"100%"},children:[p("p",{className:"text-center text-dark",style:{fontSize:"20px",textTransform:"uppercase"},children:["Hoy ",y]}),Object.entries(t).length>0?Object.entries(t).map(([q,W])=>p("div",{className:"d-flex justify-content-center",style:{flexDirection:"column",width:"100%"},children:[i("span",{className:"text-center mt-3 ",style:{backgroundColor:"#001c31"},children:q}),W.map(G=>p("div",{className:"d-flex justify-content-center mt-2 text-dark",children:[i("span",{className:"bg-secondary",style:{marginRight:4},children:G.hora?G.hora.substring(0,5):""})," ",G.equipolocal," vs ",G.equipovisitante]},G.id))]},q)):i("div",{className:"d-flex justify-content-center",children:"No hay partidos"})]})}),i(V,{className:" text-white fw-bolder mt-4",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#81a209"},children:p($,{className:"d-flex justify-content-center border border-dark",md:1,style:{flexDirection:"column",width:"100%"},children:[p("p",{className:"text-center text-dark",style:{fontSize:"20px",textTransform:"uppercase"},children:["Mañana ",b]}),Object.entries(s).length>0?Object.entries(s).map(([q,W])=>p("div",{className:"d-flex justify-content-center",style:{flexDirection:"column",width:"100%"},children:[i("span",{className:"text-center",style:{backgroundColor:"#001c31"},children:q}),W.map(G=>p("div",{className:"d-flex justify-content-center mt-2 text-white",children:[i("span",{className:"bg-dark",style:{marginRight:4},children:G.hora?G.hora.substring(0,5):""})," ",G.equipolocal," vs ",G.equipovisitante]},G.id))]},q)):i("div",{className:"d-flex justify-content-center text-dark ",children:"No hay partidos"})]})}),i(V,{className:" text-white fw-bolder mt-4",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#81a209"},children:p($,{className:"d-flex justify-content-center border border-dark",md:1,style:{flexDirection:"column",width:"100%"},children:[i("p",{className:"text-center text-dark",style:{fontSize:"20px",textTransform:"uppercase"},children:P}),Object.entries(a).length>0?Object.entries(a).map(([q,W])=>p("div",{className:"d-flex justify-content-center",style:{flexDirection:"column",width:"100%"},children:[i("span",{className:"text-center",style:{backgroundColor:"#001c31"},children:q}),W.map(G=>p("div",{className:"d-flex justify-content-center mt-2 text-white",children:[i("span",{className:"bg-dark",style:{marginRight:4},children:G.hora?G.hora.substring(0,5):""})," ",G.equipolocal," vs ",G.equipovisitante]},G.id))]},q)):i("div",{className:"d-flex justify-content-center text-dark",children:"No hay partidos"})]})}),i(V,{className:" text-white fw-bolder mt-4",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#81a209"},children:p($,{className:"d-flex justify-content-center border border-dark",md:1,style:{flexDirection:"column",width:"100%"},children:[i("p",{className:"text-center text-dark",style:{fontSize:"20px",textTransform:"uppercase"},children:F}),Object.entries(c).length>0?Object.entries(c).map(([q,W])=>p("div",{className:"d-flex justify-content-center",style:{flexDirection:"column",width:"100%"},children:[i("span",{className:"text-center",style:{backgroundColor:"#001c31"},children:q}),W.map(G=>p("div",{className:"d-flex justify-content-center mt-2 text-white",children:[i("span",{className:"bg-dark",style:{marginRight:4},children:G.hora?G.hora.substring(0,5):""})," ",G.equipolocal," vs ",G.equipovisitante]},G.id))]},q)):i("div",{className:"d-flex justify-content-center text-dark",children:"No hay partidos"})]})}),i(V,{className:" text-white fw-bolder mt-4",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#81a209"},children:p($,{className:"d-flex justify-content-center border border-dark",md:1,style:{flexDirection:"column",width:"100%"},children:[i("p",{className:"text-center text-dark",style:{fontSize:"20px",textTransform:"uppercase"},children:I}),Object.entries(u).length>0?Object.entries(u).map(([q,W])=>p("div",{className:"d-flex justify-content-center",style:{flexDirection:"column",width:"100%"},children:[i("span",{className:"text-center",style:{backgroundColor:"#001c31"},children:q}),W.map(G=>p("div",{className:"d-flex justify-content-center mt-2 text-white",children:[i("span",{className:"bg-dark",style:{marginRight:4},children:G.hora?G.hora.substring(0,5):""})," ",G.equipolocal," vs ",G.equipovisitante]},G.id))]},q)):i("div",{className:"d-flex justify-content-center text-dark",children:"No hay partidos"})]})}),i(V,{className:" text-white fw-bolder mt-4",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#81a209"},children:p($,{className:"d-flex justify-content-center border border-dark",md:1,style:{flexDirection:"column",width:"100%"},children:[i("p",{className:"text-center text-dark",style:{fontSize:"20px",textTransform:"uppercase"},children:T}),Object.entries(g).length>0?Object.entries(g).map(([q,W])=>p("div",{className:"d-flex justify-content-center",style:{flexDirection:"column",width:"100%"},children:[i("span",{className:"text-center",style:{backgroundColor:"#001c31"},children:q}),W.map(G=>p("div",{className:"d-flex justify-content-center mt-2 text-white",children:[i("span",{className:"bg-dark",style:{marginRight:4},children:G.hora?G.hora.substring(0,5):""})," ",G.equipolocal," vs ",G.equipovisitante]},G.id))]},q)):i("div",{className:"d-flex justify-content-center text-dark",children:"No hay partidos"})]})})]})]})]})},xve=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]);C.useState([]),C.useState([]),C.useEffect(()=>{c(),d(),u();const f=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},E=>{c()}).subscribe(),g=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},E=>{d()}).subscribe();return()=>{f.unsubscribe(),g.unsubscribe()}},[]);const c=async()=>{try{const{data:f,error:g}=await z.from("Fixture2023").select("*").eq("torneo","COPADEPLATA").eq("añoTorneo",2023);g?console.error("Error",g):(e(f),o(!1))}catch(f){console.error("Error",f.message)}},d=async()=>{try{const{data:f,error:g}=await z.from("Equipos").select("*").eq("genero","Masculino");g?console.error("Error",g):(r(f),o(!1))}catch(f){console.error("Error",f.message)}},u=async()=>{try{const{data:f,error:g}=await z.from("CanalesTv").select("*");g?console.error("Error",g):(l(f),o(!1))}catch(f){console.error("Error",f.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL AFA COPA DE PLATA- PRIMERA - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera A: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"COPA DE PLATA",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{children:i(et,{})})}),i(V,{children:i($,{md:12})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:n})}),i($,{md:6,children:i(Tn,{dataFixture:t,dataEquipos:n,canalesTv:a})})]})]})]})},Cve=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},A=>{E()}).subscribe();return()=>{h.unsubscribe(),m.unsubscribe()}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","AufPRIMERA").eq("añoTorneo",2023);m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino").eq("organizador","Auf");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","AufPRIMERA").eq("añoGoleadores",2023);m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFSURU").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTBOL DE SALA URUGUAY - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo URUGUAYO : tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Uruguay!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/uy.png",srcSet:"https://flagcdn.com/w40/uy.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"FÚTBOL SALA URUGUAY",i("img",{src:"https://flagcdn.com/w20/uy.png",srcSet:"https://flagcdn.com/w40/uy.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{children:i(et,{})})}),i(V,{children:i($,{md:12,children:i(Fo,{dataFixture:u,dataEquipos:n,canalesTvPlayoff:a})})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:n})}),p($,{md:6,children:[i(Tn,{dataFixture:t,dataEquipos:n,canalesTv:a}),i(Vt,{goleadores:c,dataEquipos:n})]})]})]})]})},Eve="/assets/mensajecolaboracion-fe9161a3.png",Sve=()=>p(ae,{className:"tamañoTorneo",children:[i(V,{children:i($,{className:"d-flex justify-content-center mb-3 align-items-center",children:i(ve,{to:"/",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:" m-1 btn text-white fw-bolder btn-sm ",style:{fontSize:17,backgroundColor:"#001c31"},children:"Regresar a SegundoPalo"})})})}),i(V,{children:i($,{children:i("img",{src:Eve,alt:"mensaje de colaboracion",className:"img-fluid"})})})]}),Ave=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},f=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},f=>{l()}).subscribe(),u=()=>{document.hidden||(a(),l())};return document.addEventListener("visibilitychange",u,!1),()=>{c.unsubscribe(),d.unsubscribe(),document.removeEventListener("visibilitychange",u,!1)}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","CONCACAF").eq("añoTorneo",2024).eq("grupoCopas","A");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},Nve=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},k=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},k=>{E()}).subscribe(),A=()=>{document.hidden||(g(),E())};return document.addEventListener("visibilitychange",A,!1),()=>{h.unsubscribe(),m.unsubscribe(),document.removeEventListener("visibilitychange",A,!1)}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","CONCACAF").eq("añoTorneo",2024).eq("grupoCopas","B");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","PRIMERAA");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},Rve=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},k=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},k=>{E()}).subscribe(),A=()=>{document.hidden||(g(),E())};return document.addEventListener("visibilitychange",A,!1),()=>{h.unsubscribe(),m.unsubscribe(),document.removeEventListener("visibilitychange",A,!1)}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","CONCACAF").eq("añoTorneo",2024).eq("grupoCopas","C");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","PRIMERAA");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})};function TA({dataFixture:t,dataEquipos:e}){const[n,r]=C.useState([]),s=t.reduce((d,u)=>{const f=u.grupoCopas,g=u.jornada;return d[f]||(d[f]={}),d[f][g]||(d[f][g]=[]),d[f][g].push(u),d},{}),o=Object.keys(s).sort();C.useEffect(()=>{const u=e.filter(f=>f.organizador==="Fifa").map(f=>({escudo:f.escudos,equipo:f.nombre}));r(u)},[e]);const a=(d,u)=>{l("/videos",{state:{url:d,data:u}})},l=Rt();function c(d,u){const f=d.hora?se(d.hora,"HH:mm:ss"):se(),g=u.hora?se(u.hora,"HH:mm:ss"):se();return f.diff(g)}return i(ee,{children:i(ae,{children:o.map(d=>{const u=Object.keys(s[d]),f=[];for(let g=0;g<u.length;g+=2)f.push(u.slice(g,g+2));return f.map((g,E)=>i(V,{children:g.map(S=>{const w=s[d][S].find(h=>h.libre),_=s[d][S].sort(c);return i($,{md:6,xs:6,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[p("thead",{style:{color:"transparent",borderColor:"transparent"},children:[p("tr",{children:[i("th",{style:{width:"17%"}}),i("th",{style:{width:"8%"}}),i("th",{style:{width:"8%"}}),i("th",{style:{width:"17%"}}),i("th",{style:{width:"10%"}})]}),i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"11px"},children:[" Fecha ",S]})})]}),p("tbody",{children:[_.map(h=>{const m=n.find(y=>y.equipo===h.equipolocal),A=n.find(y=>y.equipo===h.equipovisitante);let k="A confirmar";h.fecha&&(k=se(h.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("ddd DD/MM").toUpperCase().replace(".",""));const R=h.estado==="Jugandose"?"red":"white",O=h.estado==="Jugandose"?"white":"black";let N="";return h.hora&&(N=se(h.hora,"HH:mm:ss").format("HH:mm")),p(Fe.Fragment,{children:[i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder ",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:[" ",k," - ",N]})}),p("tr",{className:"align-middle",children:[p("td",{className:"bg-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"12px"},children:[m&&i("img",{src:m.escudo,alt:m.equipo,width:"12",height:"12"})," ",h.equipolocal.substring(0,3).toUpperCase()]}),i("td",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:R,color:O},children:h.estado==="Finalizado"||h.estado==="Jugandose"?h.goleslocal:""}),i("td",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:R,color:O},children:h.estado==="Finalizado"||h.estado==="Jugandose"?h.golesvisitante:""}),p("td",{className:"bg-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"12px"},children:[h.equipovisitante.substring(0,3).toUpperCase()," ",A&&i("img",{src:A.escudo,alt:A.equipo,width:"12",height:"12"})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:h.linkgoles===null||h.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{a(h.linkgoles,{id:h.id,estado:h.estado,equipolocal:h.equipolocal,equipovisitante:h.equipovisitante,goleslocal:h.goleslocal,penaleslocal:h.penaleslocal,penalesvisitante:h.penalesvisitante,golesvisitante:h.golesvisitante,escudoLocal:m,escudoVisitante:A,tiempodelpartido:h.tiempodelpartido,hora:N,goleadoresLocal:h.goleadoresLocal,goleadoresVisitante:h.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})})})]})]},h.id)}),w&&i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[" Libre: ",w.libre]})})]})]})},S)})},E))})})})}const Pve=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},u=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},u=>{l()}).subscribe();return()=>{c.unsubscribe(),d.unsubscribe()}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","CONCACAF").eq("añoTorneo",2024).eq("grupoCopas","A");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(TA,{dataFixture:t,dataEquipos:n})})},Ove=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},A=>{E()}).subscribe();return()=>{h.unsubscribe(),m.unsubscribe()}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","CONCACAF").eq("añoTorneo",2024).eq("grupoCopas","B");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","PRIMERAA");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(TA,{dataFixture:t,dataEquipos:n})})},Fve=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},A=>{E()}).subscribe();return()=>{h.unsubscribe(),m.unsubscribe()}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","CONCACAF").eq("añoTorneo",2024).eq("grupoCopas","C");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","PRIMERAA");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(TA,{dataFixture:t,dataEquipos:n})})},Dve=({dataEquipos:t,dataFixture:e})=>{const s=(o=>{const a=o.reduce((l,c)=>{const d=c.llavePlayOff;return l[d]||(l[d]=[]),l[d].push(c),l},{});return Object.entries(a).map(([l,c])=>({llave:l,partidos:c}))})(e||[]);return i(ee,{children:i(ae,{className:"bracket-container",children:i(ae,{className:"bracket",children:i(V,{children:p($,{children:[p("div",{className:"round quarterfinals",children:[p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="1"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° A"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° B"]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="2"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° C"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° D"]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]}),p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="3"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° B"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° A"]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="4"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° D"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° C"]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})]}),i("div",{className:"round semifinals",children:p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="5"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="6"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})}),i("div",{className:"round finals",children:i("div",{className:"winners",children:i("div",{className:"matchups",children:i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="7"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))})})})})]})})})})})},kve=({dataEquipos:t,dataFixture:e,canalesTvPlayoff:n})=>{var A;const[r,s]=C.useState(!0),[o,a]=C.useState([]),[l,c]=C.useState([]),[d,u]=C.useState([]),[f,g]=C.useState([]),E=e||[];C.useEffect(()=>{c(t),u(n),a(S(e)),s(!1)},[t,e]);const S=k=>{const R={};k.forEach(N=>{const y=N.faseCopas,v=N.llavePlayOff;R[y]||(R[y]={}),R[y][v]||(R[y][v]=[]),R[y][v].push(N)});const O={};return Object.keys(R).sort().forEach(N=>{O[N]={};const y=["Ida","Vuelta","Tercer partido"];Object.keys(R[N]).sort().forEach(v=>{R[N][v].sort((b,P)=>y.indexOf(b.partidoPlayOff)-y.indexOf(P.partidoPlayOff)),O[N][v]=R[N][v]})}),O},w=S(E),_=(k,R)=>{h("/videos",{state:{url:k,data:R}})},h=Rt(),m=["Final","3 puesto","Semi final","Cuartos de final","Octavos de final","16avos","32avos","5 puesto","7 puesto","5 a 8 puesto","9 puesto","11 puesto","2° Fase","1° Fase"];return(A=E[0])==null||A.torneo,p(ae,{className:"anchoPlayoff",children:[Object.entries(w).sort((k,R)=>{const O=k[0],N=R[0],y=m.indexOf(O),v=m.indexOf(N);return y-v}).map(([k,R])=>i(ee,{children:p(ae,{className:" mt-1",children:[p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"15px"},children:[" ",k.toUpperCase()]}),i($,{children:Object.entries(R).map(([O,N])=>{const y=N[0].equipolocal,v=N[0].equipovisitante;return y||v!=="A conf"?i(ee,{children:i($,{md:12,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{children:Array.isArray(N)&&N.map(b=>{var K,Y,te,J,Q;const P=b.equipolocal,F=b.equipovisitante,I=b.transmision,T=Array.isArray(l)?(K=l.find(oe=>oe.nombre===P))==null?void 0:K.escudos:void 0,q=Array.isArray(l)?(Y=l.find(oe=>oe.nombre===F))==null?void 0:Y.escudos:void 0,W=(te=d.find(oe=>oe.idTv===I))==null?void 0:te.logo,G=b.hora?se(b.hora,"HH:mm:ss").format("HH:mm"):"A conf",H=f===b.id&&b.estado==="Jugandose"?"#dc3545":"white",j=f===b.id&&b.estado==="Jugandose"?"white":"black",U=se(b.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("DD/MM"),L=se(b.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("dddd").toUpperCase();return p(Fe.Fragment,{children:[b.fecha!==null?i("tr",{children:p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[L," ",U]})}):i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"FECHA Y HORA A CONFIRMAR"}),i("tr",{children:i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:b.partidoPlayOff})}),p("tr",{children:[b.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder",style:{fontSize:9,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):b.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",b.motivossuspension,")"]})]}):b.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:b.estado}):b.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Parc ",W&&i("img",{src:W,alt:I,style:{width:"20px",height:"20px"}})]}):b.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:[b.tiempodelpartido," ",W&&i("img",{src:W,alt:I,style:{width:"20px",height:"20px"}})]}):b.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[b.hora===""?i(ee,{children:"A conf"}):G," ",W&&i("img",{src:W,alt:I,style:{width:"20px",height:"20px"}}),i("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"}})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[T&&i("img",{src:T,alt:P,style:{width:"15px",height:"15px"}})," ",i("span",{style:{height:"auto"},children:P!==""?P:"A conf"})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:H,color:j,width:"auto"},children:[b.estado!=="Pendiente"?b.goleslocal:null,b.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+b.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:H,color:j},children:[b.estado!=="Pendiente"?b.golesvisitante:null,b.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+b.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[T&&i("img",{src:q,alt:F,style:{width:"15px",height:"15px"}})," ",p("span",{style:{height:"auto"},children:[" ",F!==""?F:"A conf"]})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[b.linkgoles===null||b.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{_(b.linkgoles,{id:b.id,estado:b.estado,equipolocal:b.equipolocal,equipovisitante:b.equipovisitante,goleslocal:b.goleslocal,penaleslocal:b.penaleslocal,penalesvisitante:b.penalesvisitante,golesvisitante:b.golesvisitante,escudoLocal:T,escudoVisitante:q,tiempodelpartido:b.tiempodelpartido,hora:G,goleadoresLocal:b.goleadoresLocal,goleadoresVisitante:b.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})}),b.linkvivo===null||b.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{_(b.linkvivo,{id:b.id,estado:b.estado,equipolocal:b.equipolocal,equipovisitante:b.equipovisitante,goleslocal:b.goleslocal,penaleslocal:b.penaleslocal,penalesvisitante:b.penalesvisitante,golesvisitante:b.golesvisitante,escudoLocal:T,escudoVisitante:q,tiempodelpartido:b.tiempodelpartido,hora:G,goleadoresLocal:b.goleadoresLocal,goleadoresVisitante:b.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Ns,{style:{fontSize:"12px"}})})]})})]},b.id),(b.goleadoresLocal||b.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(J=b.goleadoresLocal)==null?void 0:J.split(",").map((oe,pe)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[pe>0&&"-",oe.trim().slice(0,-1)]},pe))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(Q=b.goleadoresVisitante)==null?void 0:Q.split(",").map((oe,pe)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[pe>0&&"-",oe.trim().slice(0,-1)]},pe))})})]})]},b.id)})})]})})}):null})},k)]})})),i(V,{})]})},Tve=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState([]);C.useState(!0);const[a,l]=C.useState([]),[c,d]=C.useState([]);C.useEffect(()=>{u(),f(),g(),E(),S();const w=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},_=>{E()}).subscribe();return()=>{w.unsubscribe()}},[]);const u=async()=>{try{const{data:w,error:_}=await z.from("Goleadores").select("*").eq("torneo","CONCACAF").eq("añoGoleadores",2024);_?console.error("Error",_):e(w)}catch(w){console.error("Error",w.message)}},f=async()=>{try{const{data:w,error:_}=await z.from("Equipos").select("*").eq("genero","Masculino");_?console.error("Error",_):r(w)}catch(w){console.error("Error",w.message)}},g=async()=>{try{const{data:w,error:_}=await z.from("Fixture2023").select("*").eq("torneo","FFCONCACAF").eq("añoTorneo",2024);_?console.error("Error",_):setPlayoff(w)}catch(w){console.error("Error",w.message)}},E=async()=>{try{const{data:w,error:_}=await z.from("Fixture2023").select("*").eq("torneo","FFCONCACAF").eq("añoTorneo",2024);_?console.error("Error",_):d(w)}catch(w){console.error("Error",w.message)}},S=async()=>{try{const{data:w,error:_}=await z.from("CanalesTv").select("*");_?console.error("Error",_):l(w)}catch(w){console.error("Error",w.message)}};return p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL - CONCACAF - FIXTURES - PARTIDOS"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de LA CONCACAF DE Futsal AFA , fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo mb-5",children:[i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i(Ft,{style:{marginRight:3}})," CONCACAF ",i(Ft,{style:{marginLeft:3}})]})}),i(V,{children:i($,{md:12,children:i(et,{})})}),i(V,{children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"FASE FINAL"})})}),i(V,{children:i($,{className:"text-center d-flex justify-content-center mb-2 mt-2",style:{overflowY:"auto"},children:i(Dve,{dataFixture:c,dataEquipos:n})})}),i(V,{}),i(V,{children:i($,{md:12,children:i(kve,{dataFixture:c,dataEquipos:n,canalesTvPlayoff:a})})}),i(V,{children:i($,{md:12,children:p("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:["FASE DE GRUPOS ",i("br",{})," ",i("span",{style:{fontSize:"11px"},children:"Clasifican al mundial los semifinalistas "})]})})}),p(V,{children:[p($,{md:6,children:[i(Ave,{}),i(Pve,{})]}),p($,{md:6,children:[i(Nve,{}),i(Ove,{})]}),p($,{md:6,children:[i(Rve,{}),i(Fve,{})]})]}),p(V,{children:[i($,{md:6,className:"mb-5",children:i(Vt,{goleadores:t,dataEquipos:n})}),i($,{md:6,className:"mb-5",children:i(TE,{asitencia:s,dataEquipos:n})})]})]})]})},ji="/assets/SPFUTURO-a4070702.png";function Ive(t){return Pt({tag:"svg",attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M16.999 1h-2.257c0.001-0.168 0.008-0.328 0.008-0.5v-0.5h-12.5v0.5c0 0.16 0.004 0.333 0.005 0.5h-2.254l-0.001 0.499c-0.003 1.086 0.062 2.199 0.195 3.31 0.352 2.937 1.271 6.341 2.795 7.087 0.194 0.096 0.395 0.144 0.596 0.144 0.238 0 0.479-0.068 0.707-0.206l0.209-0.14c0.833 1.277 1.97 2.139 3.498 2.298v2.008h-2.953v1h7v-1h-3.047v-1.997c1.415-0.149 2.585-0.935 3.493-2.312l0.234 0.155c0.216 0.13 0.447 0.194 0.681 0.194 0.201 0 0.404-0.048 0.602-0.145 1.524-0.746 2.443-4.15 2.795-7.087 0.133-1.11 0.198-2.224 0.195-3.31l-0.001-0.498zM3.988 10.834l-0.229 0.154c-0.112 0.066-0.204 0.070-0.328 0.010-0.785-0.385-1.808-2.675-2.243-6.309-0.108-0.9-0.169-1.802-0.184-2.689h1.273c0.097 2.924 0.513 6.468 1.792 8.956l-0.081-0.122zM8.5 13.041c-4.54 0-5.199-8.050-5.247-12.041h10.494c-0.049 4.721-0.838 12.041-5.247 12.041zM15.812 4.689c-0.436 3.634-1.458 5.924-2.243 6.309-0.123 0.061-0.216 0.058-0.308 0.003l-0.25-0.167-0.116 0.174c1.079-2.038 1.707-5.066 1.831-9.008h1.271c-0.016 0.887-0.077 1.789-0.185 2.689z"},child:[]}]})(t)}function Mve(t){return Pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"},child:[]}]})(t)}function FD(t){return Pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M405.333 64H106.667C83.198 64 64 83.198 64 106.667v298.666C64 428.802 83.198 448 106.667 448h298.666C428.802 448 448 428.802 448 405.333V106.667C448 83.198 428.802 64 405.333 64z"},child:[]}]})(t)}const Lve=({dataFixture:t,dataEquipos:e})=>{const n=e||[],r=t||[],s={},o={},a={},l={},c={},d={},u={},f={},g=new Set;r.forEach(P=>{P.equipolocal!=="A conf"&&g.add(P.equipolocal),P.equipovisitante!=="A conf"&&g.add(P.equipovisitante)}),n.forEach(P=>{const F=P.nombre;g.has(F)&&(s[F]=0,o[F]=0,d[F]=0,u[F]=0,f[F]=0,a[F]=0,l[F]=0,c[F]=0)}),r.forEach(P=>{if(P.estado==="Finalizado"||P.estado==="Jugandose"){const F=P.equipolocal,I=P.equipovisitante;if(P.resolucion==="PP ambos 0-1")o[F]+=1,o[I]+=1,c[F]+=1,c[I]+=1,u[F]+=1,u[I]+=1,f[F]-=1,f[I]-=1;else if(P.resolucion==="PP ambos 0-3")o[F]+=1,o[I]+=1,c[F]+=1,c[I]+=1,u[F]+=3,u[I]+=3,f[F]-=3,f[I]-=3;else{const T=P.goleslocal,q=P.golesvisitante;o[F]+=1,o[I]+=1,d[F]+=T,d[I]+=q,u[F]+=q,u[I]+=T,f[F]+=T-q,f[I]+=q-T,T>q?(s[F]+=3,a[F]+=1,c[I]+=1):T<q?(s[I]+=3,a[I]+=1,c[F]+=1):(s[F]+=1,s[I]+=1,l[F]+=1,l[I]+=1)}}});const E=Object.entries(s).sort((P,F)=>{if(F[1]!==P[1])return F[1]-P[1];const I=f[P[0]]||0,T=f[F[0]]||0;if(I!==T)return T-I;const q=d[P[0]]||0,W=d[F[0]]||0;return W!==q?W-q:P[0].localeCompare(F[0])}),S=P=>{const F=n.find(I=>I.nombre===P);return F?F.escudos:""},w=r.length>0?r[0].organizador+` PRIMERA "${r[0].division}"`:"",_=r.length>0?r[0].categoria:"",h=r.length>0?r[0].organizador:"",m=r.length>0?r[0].genero:"",A=r.length>0?r[0].division:"",k=m==="Femenino"?"#e074bf":"#015496",O=r.filter(P=>P.organizador==="Afa"&&P.genero==="Masculino"&&P.division==="A"&&(P.categoria==="6ta"||P.categoria==="7ma"||P.categoria==="8va")).length>0?"none":"block",N=r.filter(P=>P.organizador==="Afa"&&P.genero==="Masculino"&&P.division==="A"&&(P.categoria==="3ra"||P.categoria==="4ta"||P.categoria==="5ta")),y=r.filter(P=>P.organizador==="Afa"&&P.genero==="Masculino"&&P.division==="B"),v=N.length>0?p(ee,{children:[" ",i(FD,{style:{color:"gray"}})," Clasifican a los Playoff "]}):"",b=y.length>0?p(ee,{children:[" ",i(FD,{style:{color:"gray"}})," Campeón"]}):"";return i(ee,{children:p(ae,{className:"contenedorTablaInferiores",style:{marginTop:"150px",display:O},children:[i(V,{children:i($,{style:{display:"flex",justifyContent:"center"},children:i("span",{style:{color:"black",fontFamily:"Montserrat",fontSize:"25px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bolder",marginRight:10},children:w})})}),i(V,{children:i($,{className:"mt-2",style:{display:"flex",justifyContent:"center"},children:p("span",{style:{color:"black",fontFamily:"Montserrat",fontSize:"35px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bolder",textDecoration:"underline"},children:[_,". DIVISIÓN"]})})}),i(V,{children:i($,{className:"",style:{display:"flex",justifyContent:"center"},children:i("span",{style:{color:k,fontFamily:"Montserrat",fontSize:"16px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bolder",textDecoration:"underline"},children:m})})}),i(V,{children:i($,{className:"mt-2",style:{display:"flex",justifyContent:"center"},children:i("span",{style:{color:"black",fontFamily:"Montserrat",fontSize:"25px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bolder"},children:"TABLA DE POSICIONES"})})}),h!=="Argenliga"?i(ee,{}):i(ee,{}),i(V,{children:i($,{className:"text-center mt-1",children:i(et,{})})}),i(V,{children:i($,{className:"text-center mt-3",children:i(Cr,{to:"/formulariofuturo",children:i(Qe,{variant:"dark",className:"fw-bolder titileo",style:{fontSize:"12px",fontFamily:"Montserrat"},children:"¡Colabora con los resultados!"})})})}),i(V,{children:i($,{className:"mt-3",children:p("div",{style:{position:"relative"},children:[i("img",{src:ji,alt:"Marca de agua",style:{position:"absolute",opacity:.2,width:"90%",left:"5%",height:"80%",top:"3%"}}),p(Ie,{bordered:!0,responsive:!0,variant:"dark",size:"sm",style:{borderColor:"gray"},children:[i("thead",{children:p("tr",{className:"bg-dark text-white",style:{fontSize:12,fontFamily:"Montserrat"},children:[i("th",{className:"text-center text-white",colSpan:1,style:{width:"3%"},children:"#"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:11},children:"Equipo"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PTS"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PJ"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PG"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PE"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PP"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"GF"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"GC"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"DG"})]})}),i("tbody",{children:E.map(([P,F],I)=>{const T=A==="A"&&m==="Masculino"&&I<8||A==="B"&&m==="Masculino"&&I===0?"gray":"black",q=(A==="A"&&m==="Masculino"&&I<8,"white");return p("tr",{children:[i("td",{className:"fw-bolder ",style:{fontSize:12,backgroundColor:T,color:q},children:I+1}),p("td",{children:[i("img",{className:"me-1",src:S(P),alt:P,style:{width:"17px",height:"17px",borderRadius:"15%",margin:"0",backgroundColor:"white"}}),i("span",{className:"fontPosiciones",style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:12},children:P})]}),i("td",{className:"text-center",style:{fontSize:14,fontWeight:700,color:"#f2b700"},children:F}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:o[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:a[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:l[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:c[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:d[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:u[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:f[P]})]},P)})})]}),p("span",{className:"fontPosiciones mb-2",style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:14},children:[v,b]}),h==="Argenliga"?i(ee,{children:i("span",{className:"fontPosiciones",style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:12},children:"Datos oficiales de @Argenliga."})}):i(ee,{})]})})})]})})},zve=({dataFixture:t,dataEquipos:e})=>{const n=e||[],r=t||[],[s,o]=C.useState([]);C.useEffect(()=>{for(let S=r.length;S>=1;S--)if(r.filter(_=>_.jornada===S&&_.estado==="Finalizado").length>0){o(S);return}o(1)},[r]);const a=r.reduce((S,w)=>{const _=w.jornada,h=w.fecha,m=w.equipolocal,A=w.equipovisitante;return S[_]=S[_]||{},S[_][h]=S[_][h]||{partidos:[]},S[_][h].partidos.push({...w,equipoLocal:m,equipoVisitante:A}),S},{}),l=()=>{a[s+1]&&o(s+1)},c=()=>{a[s-1]&&o(s-1)},u=r.filter(S=>S.organizador==="Afa"&&S.genero==="Masculino"&&S.division==="A"&&(S.categoria==="6ta"||S.categoria==="7ma"||S.categoria==="8va")).length>0?"none":"block",f=r.length>0?r[0].organizador:"",E=Object.keys(a).map((S,w)=>i(Qe,{variant:"dark",size:"sm",onClick:()=>o(Number(S)),style:{width:5,borderRadius:5,borderColor:"transparent",fontFamily:"Roboto Condensed, sans-serif",fontSize:10,display:"flex",justifyContent:"center",alignItems:"center",margin:2,backgroundColor:Number(S)===s?"black":"gray",color:"white"},children:i("span",{className:"fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:`${S}`})},w));return p(ae,{className:"contenedorTablaInferiores mb-5",style:{marginTop:"50px",display:u},children:[i(V,{children:i($,{className:"text-center mb-1",children:i(et,{})})}),i(V,{children:i($,{style:{display:"flex",justifyContent:"center"},children:i("span",{style:{color:"black",fontFamily:"Montserrat",fontSize:"25px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bold"},children:"Fixture"})})}),i(V,{children:p($,{className:"mt-2",children:[p("div",{style:{display:"flex",justifyContent:"center",marginBottom:20},children:[i("div",{children:i(qb,{style:{color:"black",cursor:"pointer",width:"30px",height:"30px"},onClick:c})}),i("div",{style:{display:"flex",justifyContent:"center",flexWrap:"wrap"},children:E}),i("div",{children:i(zb,{style:{color:"black",cursor:"pointer",width:"30px",height:"30px"},onClick:l})})]}),i("div",{className:"bg-dark",style:{display:"flex",justifyContent:"center",marginBottom:0},children:p("span",{style:{color:"white",fontFamily:"Montserrat",fontSize:"18px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bold"},children:["Fecha ",s]})}),p("div",{style:{position:"relative"},children:[i("img",{src:ji,alt:"Marca de agua",style:{position:"absolute",opacity:"20%",width:"90%",left:"5%",height:"80%",top:"3%"}}),p(Ie,{striped:!0,bordered:!0,hover:!0,responsive:!0,variant:"dark",size:"sm",style:{borderColor:"gray"},children:[i("thead",{style:{width:"27%",backgroundColor:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{className:"text-center",style:{width:"27%",backgroundColor:"transparent",borderColor:"transparent"}}),i("th",{className:"text-center",style:{width:"27%",backgroundColor:"transparent",borderColor:"transparent"}}),i("th",{className:"text-center",style:{width:"27%",backgroundColor:"transparent",borderColor:"transparent"}})]})}),i("tbody",{children:a[s]&&Object.keys(a[s]).map((S,w)=>i(Fe.Fragment,{children:a[s][S].partidos.map((_,h)=>{let m,A;return n.forEach(k=>{k.nombre===_.equipolocal&&(m=k.escudos),k.nombre===_.equipovisitante&&(A=k.escudos)}),p("tr",{children:[i("td",{className:"text-center fw-bolder",style:{fontFamily:"Montserrat",fontSize:12},children:p("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignContent:"center",alignItems:"center"},children:[i("img",{className:"me-1",src:m,alt:_.equipolocal,style:{width:"15px",height:"15px",borderRadius:"50%",margin:"0"}}),_.equipolocal]})}),i("td",{className:"text-center fw-bolder",style:{fontFamily:"Montserrat",color:"#f2b700"},children:_.estado==="Finalizado"?[_.goleslocal!==null?_.goleslocal:i("span",{style:{fontSize:"10px"},children:"Puntos perdidos ambos equipos"})," - ",_.golesvisitante!==null?_.golesvisitante:""]:"-"}),i("td",{className:"text-center fw-bolder",style:{fontFamily:"Montserrat",fontSize:12},children:p("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignContent:"center",alignItems:"center"},children:[i("img",{src:A,alt:_.equipovisitante,style:{width:"15px",height:"15px",borderRadius:"50%",margin:"0"}}),_.equipovisitante]})})]},h)})},w))})]}),f==="Argenliga"?i(ee,{children:i("span",{className:"fontPosiciones",style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:12},children:"Datos oficiales de @Argenliga."})}):i(ee,{})]})]})}),f!=="Argenliga"?i(ee,{children:i(V,{children:i($,{className:"text-center mt-3",children:i(Cr,{to:"/formulariofuturo",children:i(Qe,{variant:"dark",className:"fw-bolder titileo",style:{fontSize:"12px",fontFamily:"Montserrat"},children:"¡Colabora con los resultados!"})})})})}):i(ee,{}),i(V,{children:i($,{children:i("div",{style:{display:"flex",justifyContent:"center",marginBottom:20,marginTop:"25px"},children:i("p",{style:{fontFamily:"Montserrat",fontWeight:"bolder"},children:"© 2023 SEGUNDOPALO"})})})})]})},qve="/assets/Sploading3-ad0a6e46.gif";function oj({show:t,handleClose:e,dataFixture:n}){const s=n||[];return i(Ut,{show:t,onHide:e,centered:!0,className:"bg-dark text-dark",style:{fontFamily:"Montserrat",fontWeight:"bold"},children:p(ae,{className:"bg-dark text-white",children:[i(Ut.Header,{closeButton:!0,children:i(Ut.Title,{children:i("span",{className:"fontPosiciones text-white mt-2",style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:20},children:'Reglamento "Copa Futuro"'})})}),i(Ut.Body,{className:"text-center",style:{color:"#FED372"},children:"FORMA DE DISPUTA "}),i(Ut.Body,{className:"text-center",children:s==="BAfa"?i(ee,{children:"Para la disputa de esta copa, se confeccionará una Tabla General de Posiciones 2024, en donde se sumarán los puntos totales que los clubes hayan acumulado con sus Categorías (3ra., 4ta., 5ta., 6ta., 7ma. y 8va.) en el Campeonato de Categorías Inferiores de Primera División “B”."}):s==="AAfa"?i(ee,{children:"Para la disputa de esta copa, se confeccionará una Tabla General de Posiciones 2024 (Suma de puntos de los Torneos “Apertura” 2024 y “Clausura” 2024), en donde se sumarán los puntos totales que los clubes hayan acumulado con sus Categorías (6ta., 7ma. y 8va.) en el Campeonato de Categorías Inferiores de Primera División 2024."}):""}),p(Ut.Body,{children:["-",i("span",{style:{textTransform:"uppercase",color:"#FED372"},children:"Etapa Preliminar"}),": la disputarán los cuatro (4) equipos ubicados del 15° al 18° puesto de la Tabla General de Posiciones 2024 antes mencionada. Los clubes serán ordenados del 1 al 4, quedando los siguientes enfrentamientos: 1 c. 4 y 2 c. 3. Se disputará a un solo partido, en cancha neutral, a ser determinada oportunamente por A.F.A. Estos encuentros se jugarán en el siguiente orden: ",s==="BAfa"?i(ee,{children:"8º, 7º, 6º, 5º, 4º y 3º."}):s==="AAfa"?i(ee,{children:"6º, 7º y 8º."}):""," Categorías. El club que obtenga mayor cantidad de puntos, sumadas todas las Categorías, pasará a los Octavos de Final. En caso de empate en puntos se considerará la diferencia de goles, y de subsistir la igualdad, la definición se operará mediante la ejecución de tiros desde el punto de penal en el último partido de la jornada (",s==="BAfa"?i(ee,{children:"3ra Categoría"}):s==="AAfa"?i(ee,{children:"8va. Categoría"}):"",")."]}),p(Ut.Body,{children:["- ",i("span",{style:{textTransform:"uppercase",color:"#FED372"},children:"Octavos de Final"}),": la disputarán los catorce (14) equipos ubicados del 1° al 14° puesto de la Tabla General de Posiciones 2024 más los dos (2) clubes vencedores de la Etapa Preliminar.Los clubes serán ordenados del 1 al 16, quedando los siguientes enfrentamientos: 1 c. 16, 2 c. 15, 3 c. 14, 4 c. 13, 5 c. 12, 6 c. 11, 7 c. 10 y 8 c. 9."]}),p(Ut.Body,{children:["-",i("span",{style:{textTransform:"uppercase",color:"#FED372"},children:"Cuartos de Final "}),": lo disputarán los ganadores de los Octavos de Final.Los clubes serán ordenados nuevamente del 1 al 8, según la Tabla General de Posiciones 2024 quedando los siguientes enfrentamientos: 1 c. 8, 2 c. 7, 3 c. 6 y 4 c. 5."]}),p(Ut.Body,{children:["-",i("span",{style:{textTransform:"uppercase",color:"#FED372"},children:"Semifinales"}),": lo disputarán los ganadores de los Cuartos de Final.Los clubes serán ordenados nuevamente del 1 al 4, según la Tabla General de Posiciones quedando los siguientes enfrentamientos: 1 c. 4 y 2 c. 3."]}),p(Ut.Body,{children:["-",i("span",{style:{textTransform:"uppercase",color:"#FED372"},children:"Final"}),": la disputarán los ganadores de las Semifinales."]}),i(Ut.Body,{className:"text-center",style:{color:"#FED372"},children:"ACLARACIONES"}),p(Ut.Body,{className:"text-center",children:[" Las instancias de Octavos de Final, Cuartos de Final y Semifinales se disputarán a dos partidos, local y visitante, (en el siguiente orden de categorías ",s==="BAfa"?i(ee,{children:"8va, 7ma, 6ta, 5ta, 4ta y 3ra"}):s==="AAfa"?i(ee,{children:"6ta., 7ma. y 8va."}):""," ), ejerciendo la condición de local en los segundos partidos, el Club mejor ubicado en la Tabla General de Posiciones 2024 con respecto a su rival. El club que obtenga la mayor cantidad de puntos en ambos partidos, sumadas todas las categorías, pasará a la siguiente instancia. En caso de empate en puntos al término de los segundos partidos, se considerará la diferencia de goles, y de subsistir la igualdad, la definición se operará mediante la ejecución de tiros desde el punto de penal en el último partido de la jornada (8va Categoría). ",i("br",{}),"La Final, se disputará a un solo partido, en cancha neutral, a ser determinada oportunamente por A.F.A. Estos encuentros se jugarán en el siguiente orden: ",s==="BAfa"?i(ee,{children:"8º, 7º, 6º, 5º, 4º y 3º."}):s==="AAfa"?i(ee,{children:"6º, 7º y 8º."}):""," Categorías. El club que obtenga mayor cantidad de puntos, sumadas todas las categorías, será proclamado Campeón de la “Copa Futuro de Inferiores” 2024. En caso de empate en puntos se considerará la diferencia de goles, y de subsistir la igualdad, la definición se operará mediante la ejecución de tiros desde el punto de penal en el último partido de la jornada ",s==="BAfa"?i(ee,{children:"(3ra. Categoría)."}):s==="AAfa"?i(ee,{children:" (8va. Categoría). "}):""]}),i(Ut.Footer,{children:i(Qe,{variant:"secondary",onClick:e,style:{backgroundColor:"#FED372",color:"black",fontWeight:"bold"},children:"Cerrar"})})]})})}const jve=({onShowModal:t})=>{const[e,n]=C.useState([]),[r,s]=C.useState([]),[o,a]=C.useState(!1),[l,c]=C.useState(!1),d=async()=>{try{const{data:P,error:F}=await z.from("Equipos").select("*").eq("genero","Masculino");F?console.error("Error",F):s(P)}catch(P){console.error("Error",P.message)}},u=async()=>{try{const{data:P,error:F}=await z.from("Inferiores").select("*").eq("organizador","Afa").eq("genero","Masculino").eq("division","A").in("categoria",["6ta","7ma","8va"]);n(P)}catch(P){console.error("Error",P.message)}};C.useEffect(()=>{d(),u()},[]);const f=r||[],g=e||[],E={},S={},w={},_={},h={},m={},A={},k={},R=new Set;g.forEach(P=>{P.equipolocal!=="A conf"&&R.add(P.equipolocal),P.equipovisitante!=="A conf"&&R.add(P.equipovisitante)}),f.forEach(P=>{const F=P.nombre;R.has(F)&&(E[F]=0,S[F]=0,m[F]=0,A[F]=0,k[F]=0,w[F]=0,_[F]=0,h[F]=0)}),g.forEach(P=>{if(P.estado==="Finalizado"||P.estado==="Jugandose"){const F=P.equipolocal,I=P.equipovisitante;if(P.resolucion==="PP ambos 0-1")S[F]+=1,S[I]+=1,h[F]+=1,h[I]+=1,A[F]+=1,A[I]+=1,k[F]-=1,k[I]-=1;else if(P.resolucion==="PP ambos 0-3")S[F]+=1,S[I]+=1,h[F]+=1,h[I]+=1,A[F]+=3,A[I]+=3,k[F]-=3,k[I]-=3;else{const T=P.goleslocal,q=P.golesvisitante;S[F]+=1,S[I]+=1,m[F]+=T,m[I]+=q,A[F]+=q,A[I]+=T,k[F]+=T-q,k[I]+=q-T,T>q?(E[F]+=3,w[F]+=1,h[I]+=1):T<q?(E[I]+=3,w[I]+=1,h[F]+=1):(E[F]+=1,E[I]+=1,_[F]+=1,_[I]+=1)}}});const O=Object.entries(E).sort((P,F)=>{if(F[1]!==P[1])return F[1]-P[1];const I=k[P[0]]||0,T=k[F[0]]||0;if(I!==T)return T-I;const q=m[P[0]]||0,W=m[F[0]]||0;return W!==q?W-q:P[0].localeCompare(F[0])}),N=P=>{const F=f.find(I=>I.nombre===P);return F?F.escudos:""};g.length>0&&g[0].organizador+` PRIMERA "${g[0].division}"`,g.length>0&&g[0].categoria;const y=g.length>0?g[0].organizador:"";return g.length>0&&g[0].genero,i(ee,{children:p(ae,{style:{marginTop:"50px"},children:[i("div",{style:{display:"flex",justifyContent:"center"},children:i(Qe,{className:"fw-bolder",onClick:()=>a(!o),variant:"dark",style:{fontSize:"12px",fontFamily:"Montserrat",backgroundColor:o?"white":"black",color:o?"black":"white"},children:o?"Ocultar Tabla General":"Ver Tabla General"})}),o&&p(ee,{children:[i(V,{children:i($,{className:"mt-4 bg-dark",style:{display:"flex",justifyContent:"center"},children:p("div",{style:{display:"flex",justifyContent:"center",flexDirection:"column"},children:[i("span",{className:"text-center",style:{color:"white",fontFamily:"Montserrat",fontSize:"25px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bolder"},children:"TABLA GENERAL"}),i("span",{className:"fontPosiciones text-white mt-2",style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:14},children:"Suma de puntos de los Torneos “Apertura” y “Clausura” (6ta, 7ma, 8va)"}),i(Qe,{variant:"secondary",className:"fontPosiciones text-dark mt-2 btn-sm",onClick:()=>{c(!0)},style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:14,backgroundColor:"#FED372",color:"black"},children:"Ver Reglamento Copa Futuro"}),i(oj,{dataFixture:"AAfa",show:l,handleClose:()=>{c(!1)}})]})})}),i(V,{children:i($,{className:" bg-dark",children:p("div",{style:{position:"relative"},children:[i("img",{src:ji,alt:"Marca de agua",style:{position:"absolute",opacity:.2,width:"90%",left:"5%",height:"80%",top:"3%"}}),p(Ie,{className:"mt-2",striped:!0,bordered:!0,hover:!0,responsive:!0,variant:"dark",size:"sm",style:{borderColor:"gray"},children:[i("thead",{children:p("tr",{className:"bg-dark text-white",style:{fontSize:12,fontFamily:"Montserrat"},children:[i("th",{className:"text-center text-white",colSpan:1,style:{width:"3%"},children:"#"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:11},children:"Equipo"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PTS"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PJ"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PG"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PE"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PP"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"GF"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"GC"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"DG"})]})}),i("tbody",{children:O.map(([P,F],I)=>p("tr",{children:[i("td",{style:{fontSize:12},children:I+1}),p("td",{children:[i("img",{className:"me-1",src:N(P),alt:P,style:{width:"17px",height:"17px",borderRadius:"50%",margin:"0"}}),i("span",{className:"fontPosiciones",style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:12},children:P})]}),i("td",{className:"text-center",style:{fontSize:14,fontWeight:700,color:"#f2b700"},children:F}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:S[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:w[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:_[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:h[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:m[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:A[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:k[P]})]},P))})]}),y==="Argenliga"?i(ee,{children:i("span",{className:"fontPosiciones",style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:12},children:"Datos oficiales de @Argenliga."})}):i(ee,{})]})})})]})]})})},$ve=({dataFixture:t,dataEquipos:e})=>{C.useState(!1);const n=e||[],r=t||[],s={},o={},a={},l={},c={},d={},u={},f={},g=new Set;r.forEach(_=>{g.add(_.equipolocal),g.add(_.equipovisitante)}),n.forEach(_=>{const h=_.nombre;g.has(h)&&(s[h]=0,o[h]=0,d[h]=0,u[h]=0,f[h]=0,a[h]=0,l[h]=0,c[h]=0)}),r.forEach(_=>{if(_.estado==="Finalizado"){const h=_.equipolocal,m=_.equipovisitante,A=_.goleslocal,k=_.golesvisitante;o[h]+=1,o[m]+=1,d[h]+=A,d[m]+=k,u[h]+=k,u[m]+=A,f[h]+=A-k,f[m]+=k-A,A>k?(s[h]+=3,a[h]+=1,c[m]+=1):A<k?(s[m]+=3,a[m]+=1,c[h]+=1):(s[h]+=1,s[m]+=1,l[h]+=1,l[m]+=1)}});const E=Object.entries(s).sort((_,h)=>{if(h[1]!==_[1])return h[1]-_[1];const m=f[_[0]]||0,A=f[h[0]]||0;if(m!==A)return A-m;const k=d[_[0]]||0;return(d[h[0]]||0)-k}),S=_=>{const h=n.find(m=>m.nombre===_);return h?h.escudos:""};r.length>0&&r[0].organizador+` PRIMERA "${r[0].division}"`,r.length>0&&r[0].categoria;const w=r.length>0?r[0].organizador:"";return r.length>0&&r[0].genero,i(ee,{children:p(ae,{className:"contenedorTablaInferiores",style:{marginTop:"150px"},children:[i(V,{children:i($,{className:"mt-4 bg-dark",style:{display:"flex",justifyContent:"center"},children:i("span",{style:{color:"white",fontFamily:"Montserrat",fontSize:"25px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bolder"},children:"APERTURA"})})}),i(V,{children:i($,{className:"bg-dark",children:p("div",{style:{position:"relative"},children:[i("img",{src:ji,alt:"Marca de agua",style:{position:"absolute",opacity:.2,width:"90%",left:"5%",height:"80%",top:"3%"}}),p(Ie,{striped:!0,bordered:!0,hover:!0,responsive:!0,variant:"dark",size:"sm",style:{borderColor:"gray"},children:[i("thead",{children:p("tr",{className:"bg-dark text-white",style:{fontSize:12,fontFamily:"Montserrat"},children:[i("th",{className:"text-center text-white",colSpan:1,style:{width:"3%"},children:"#"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:11},children:"Equipo"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PTS"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PJ"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PG"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PE"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PP"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"GF"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"GC"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"DG"})]})}),i("tbody",{children:E.map(([_,h],m)=>p("tr",{children:[i("td",{style:{fontSize:12},children:m+1}),p("td",{children:[i("img",{className:"me-1",src:S(_),alt:_,style:{width:"17px",height:"17px",borderRadius:"50%",margin:"0"}}),i("span",{className:"fontPosiciones",style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:12},children:_})]}),i("td",{className:"text-center",style:{fontSize:14,fontWeight:700,color:"#f2b700"},children:h}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:o[_]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:a[_]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:l[_]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:c[_]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:d[_]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:u[_]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:f[_]})]},_))})]}),w==="Argenliga"?i(ee,{children:i("span",{className:"fontPosiciones",style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:12},children:"Datos oficiales de @Argenliga."})}):i(ee,{})]})})})]})})},Bve=({dataFixture:t,dataEquipos:e})=>{const n=e||[],r=t||[],s={},o={},a={},l={},c={},d={},u={},f={},g=new Set;r.forEach(R=>{R.equipolocal!=="A conf"&&g.add(R.equipolocal),R.equipovisitante!=="A conf"&&g.add(R.equipovisitante)}),n.forEach(R=>{const O=R.nombre;g.has(O)&&(s[O]=0,o[O]=0,d[O]=0,u[O]=0,f[O]=0,a[O]=0,l[O]=0,c[O]=0)}),r.forEach(R=>{if(R.estado==="Finalizado"||R.estado==="Jugandose"){const O=R.equipolocal,N=R.equipovisitante;if(R.resolucion==="PP ambos 0-1")o[O]+=1,o[N]+=1,c[O]+=1,c[N]+=1,u[O]+=1,u[N]+=1,f[O]-=1,f[N]-=1;else if(R.resolucion==="PP ambos 0-3")o[O]+=1,o[N]+=1,c[O]+=1,c[N]+=1,u[O]+=3,u[N]+=3,f[O]-=3,f[N]-=3;else{const y=R.goleslocal,v=R.golesvisitante;o[O]+=1,o[N]+=1,d[O]+=y,d[N]+=v,u[O]+=v,u[N]+=y,f[O]+=y-v,f[N]+=v-y,y>v?(s[O]+=3,a[O]+=1,c[N]+=1):y<v?(s[N]+=3,a[N]+=1,c[O]+=1):(s[O]+=1,s[N]+=1,l[O]+=1,l[N]+=1)}}});const E=Object.entries(s).sort((R,O)=>{if(O[1]!==R[1])return O[1]-R[1];const N=f[R[0]]||0,y=f[O[0]]||0;if(N!==y)return y-N;const v=d[R[0]]||0,b=d[O[0]]||0;return b!==v?b-v:R[0].localeCompare(O[0])}),S=R=>{const O=n.find(N=>N.nombre===R);return O?O.escudos:""},w=r.filter(R=>(R.categoria==="6ta"||R.categoria==="7ma"||R.categoria==="8va")&&R.division==="A"&&R.organizador==="Afa"&&R.genero==="Masculino");w.filter(R=>R.jornada<=17),w.filter(R=>R.jornada>17);const _=r.length>0?r[0].organizador+` PRIMERA "${r[0].division}"`:"",h=r.length>0?r[0].categoria:"",m=r.length>0?r[0].organizador:"",A=r.length>0?r[0].genero:"";return i(ee,{children:p(ae,{className:"contenedorTablaInferiores",style:{marginTop:"150px"},children:[i(V,{children:i($,{style:{display:"flex",justifyContent:"center"},children:i("span",{style:{color:"black",fontFamily:"Montserrat",fontSize:"25px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bolder",marginRight:10},children:_})})}),i(V,{children:i($,{className:"mt-2",style:{display:"flex",justifyContent:"center"},children:p("span",{style:{color:"black",fontFamily:"Montserrat",fontSize:"35px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bolder",textDecoration:"underline"},children:[h,". DIVISIÓN"]})})}),i(V,{children:i($,{className:"",style:{display:"flex",justifyContent:"center"},children:i("span",{style:{color:A==="Femenino"?"#e074bf":"#015496",fontFamily:"Montserrat",fontSize:"16px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bolder",textDecoration:"underline"},children:A})})}),i(V,{children:i($,{className:"mt-2",style:{display:"flex",justifyContent:"center"},children:i("span",{style:{color:"black",fontFamily:"Montserrat",fontSize:"25px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bolder"},children:"TABLA DE POSICIONES"})})}),i(V,{children:i($,{className:" ",style:{display:"flex",justifyContent:"center"},children:i(jve,{})})}),m!=="Argenliga"?i(ee,{children:i(V,{children:i($,{className:"text-center mt-3",children:i(Cr,{to:"/formulariofuturo",children:i(Qe,{variant:"dark",className:"fw-bolder titileo",style:{fontSize:"12px",fontFamily:"Montserrat"},children:"¡Colabora con los resultados!"})})})})}):i(ee,{}),m!=="Argenliga"?i(ee,{children:i(V,{children:i($,{className:"text-center mt-3",children:i(et,{})})})}):i(ee,{}),i(V,{children:i($,{className:"mt-4 bg-dark",style:{display:"flex",justifyContent:"center"},children:i("span",{style:{color:"white",fontFamily:"Montserrat",fontSize:"25px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bolder"},children:"CLAUSURA"})})}),i(V,{children:i($,{className:"mt-3",children:p("div",{style:{position:"relative"},children:[i("img",{src:ji,alt:"Marca de agua",style:{position:"absolute",opacity:.2,width:"90%",left:"5%",height:"80%",top:"3%"}}),p(Ie,{striped:!0,bordered:!0,hover:!0,responsive:!0,variant:"dark",size:"sm",style:{borderColor:"gray"},children:[i("thead",{children:p("tr",{className:"bg-dark text-white",style:{fontSize:12,fontFamily:"Montserrat"},children:[i("th",{className:"text-center text-white",colSpan:1,style:{width:"3%"},children:"#"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:11},children:"Equipo"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PTS"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PJ"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PG"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PE"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PP"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"GF"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"GC"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"DG"})]})}),i("tbody",{children:E.map(([R,O],N)=>p("tr",{children:[i("td",{style:{fontSize:12},children:N+1}),p("td",{children:[i("img",{className:"me-1",src:S(R),alt:R,style:{width:"17px",height:"17px",borderRadius:"50%",margin:"0"}}),i("span",{className:"fontPosiciones",style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:12},children:R})]}),i("td",{className:"text-center",style:{fontSize:14,fontWeight:700,color:"#f2b700"},children:O}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:o[R]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:a[R]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:l[R]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:c[R]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:d[R]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:u[R]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:f[R]})]},R))})]}),m==="Argenliga"?i(ee,{children:i("span",{className:"fontPosiciones",style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:12},children:"Datos oficiales de @Argenliga."})}):i(ee,{})]})})})]})})},Uve=({dataFixture:t,dataEquipos:e})=>{const n=e||[],r=t||[],[s,o]=C.useState([]);C.useEffect(()=>{for(let g=r.length;g>=1;g--)if(r.filter(S=>S.jornada===g&&S.estado==="Finalizado").length>0){o(g);return}o(1)},[r]);const a=r.reduce((g,E)=>{const S=E.jornada,w=E.fecha,_=E.equipolocal,h=E.equipovisitante;return g[S]=g[S]||{},g[S][w]=g[S][w]||{partidos:[]},g[S][w].partidos.push({...E,equipoLocal:_,equipoVisitante:h}),g},{}),l=()=>{a[s+1]&&o(s+1)},c=()=>{a[s-1]&&o(s-1)},d=r.length>0?r[0].organizador:"",f=Object.keys(a).map((g,E)=>i(Qe,{variant:"dark",size:"sm",onClick:()=>o(Number(g)),style:{backgroundColor:Number(g)===s?"black":"gray",color:"white",width:5,borderRadius:5,borderColor:"transparent",fontFamily:"Roboto Condensed, sans-serif",fontSize:10,display:"flex",justifyContent:"center",alignItems:"center",margin:2},children:i("span",{className:"fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:`${g}`})},E));return p(ae,{className:"contenedorTablaInferiores mb-5",style:{marginTop:"50px"},children:[d!=="Argenliga"?i(ee,{children:i(V,{children:i($,{className:"text-center mt-3",children:i(et,{})})})}):i(ee,{}),i(V,{children:i($,{style:{display:"flex",justifyContent:"center"},children:i("span",{style:{color:"black",fontFamily:"Montserrat",fontSize:"25px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bold"},children:"Fixture"})})}),i(V,{children:p($,{className:"mt-2",children:[p("div",{style:{display:"flex",justifyContent:"center",marginBottom:20},children:[i("div",{children:i(qb,{style:{color:"black",cursor:"pointer",width:"30px",height:"30px"},onClick:c})}),i("div",{style:{display:"flex",justifyContent:"center",flexWrap:"wrap"},children:f}),i("div",{children:i(zb,{style:{color:"black",cursor:"pointer",width:"30px",height:"30px"},onClick:l})})]}),i("div",{className:"bg-dark",style:{display:"flex",justifyContent:"center",marginBottom:0},children:p("span",{style:{color:"white",fontFamily:"Montserrat",fontSize:"18px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bold"},children:["Fecha ",s]})}),p("div",{style:{position:"relative"},children:[i("img",{src:ji,alt:"Marca de agua",style:{position:"absolute",opacity:"20%",width:"90%",left:"5%",height:"80%",top:"3%"}}),p(Ie,{striped:!0,bordered:!0,hover:!0,responsive:!0,variant:"dark",size:"sm",style:{borderColor:"gray"},children:[i("thead",{style:{width:"27%",backgroundColor:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{className:"text-center",style:{width:"27%",backgroundColor:"transparent",borderColor:"transparent"}}),i("th",{className:"text-center",style:{width:"27%",backgroundColor:"transparent",borderColor:"transparent"}}),i("th",{className:"text-center",style:{width:"27%",backgroundColor:"transparent",borderColor:"transparent"}})]})}),i("tbody",{children:a[s]&&Object.keys(a[s]).map((g,E)=>i(Fe.Fragment,{children:a[s][g].partidos.map((S,w)=>{let _,h;return n.forEach(m=>{m.nombre===S.equipolocal&&(_=m.escudos),m.nombre===S.equipovisitante&&(h=m.escudos)}),p("tr",{children:[i("td",{className:"text-center fw-bolder",style:{fontFamily:"Montserrat",fontSize:12},children:p("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignContent:"center",alignItems:"center"},children:[i("img",{className:"me-1",src:_,alt:S.equipolocal,style:{width:"15px",height:"15px",borderRadius:"50%",margin:"0"}}),S.equipolocal]})}),i("td",{className:"text-center fw-bolder",style:{fontFamily:"Montserrat",color:"#f2b700"},children:S.estado==="Finalizado"?`${S.goleslocal} - ${S.golesvisitante}`:"-"}),i("td",{className:"text-center fw-bolder",style:{fontFamily:"Montserrat",fontSize:12},children:p("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignContent:"center",alignItems:"center"},children:[i("img",{src:h,alt:S.equipovisitante,style:{width:"15px",height:"15px",borderRadius:"50%",margin:"0"}}),S.equipovisitante]})})]},w)})},E))})]}),d==="Argenliga"?i(ee,{children:i("span",{className:"fontPosiciones",style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:12},children:"Datos oficiales de @Argenliga."})}):i(ee,{})]})]})}),d!=="Argenliga"?i(ee,{children:i(V,{children:i($,{className:"text-center mt-3",children:i(Cr,{to:"/formulariofuturo",children:i(Qe,{variant:"dark",className:"fw-bolder titileo",style:{fontSize:"12px",fontFamily:"Montserrat"},children:"¡Colabora con los resultados!"})})})})}):i(ee,{}),i(V,{children:i($,{children:i("div",{style:{display:"flex",justifyContent:"center",marginBottom:20,marginTop:"25px"},children:i("p",{style:{fontFamily:"Montserrat",fontWeight:"bolder"},children:"© 2023 SEGUNDOPALO"})})})})]})},Yve=({dataFixture:t,dataEquipos:e})=>{const n=e||[],r=t||[],[s,o]=C.useState([]);C.useEffect(()=>{for(let g=r.length;g>=1;g--)if(r.filter(S=>S.jornada===g&&S.estado==="Finalizado").length>0){o(g);return}o(1)},[r]);const a=r.reduce((g,E)=>{const S=E.jornada,w=E.fecha,_=E.equipolocal,h=E.equipovisitante;return g[S]=g[S]||{},g[S][w]=g[S][w]||{partidos:[]},g[S][w].partidos.push({...E,equipoLocal:_,equipoVisitante:h}),g},{}),l=()=>{a[s+1]&&o(s+1)},c=()=>{a[s-1]&&o(s-1)},d=r.length>0?r[0].organizador:"",f=Object.keys(a).map((g,E)=>i(Qe,{variant:"dark",size:"sm",onClick:()=>o(Number(g)),style:{backgroundColor:Number(g)===s?"black":"gray",color:"white",width:5,borderRadius:5,borderColor:"transparent",fontFamily:"Roboto Condensed, sans-serif",fontSize:10,display:"flex",justifyContent:"center",alignItems:"center",margin:2},children:i("span",{className:"fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:`${g}`})},E));return p(ae,{className:"contenedorTablaInferiores mb-5",style:{marginTop:"50px"},children:[d!=="Argenliga"?i(ee,{children:i(V,{children:i($,{className:"text-center mt-3",children:i(et,{})})})}):i(ee,{}),i(V,{children:i($,{style:{display:"flex",justifyContent:"center"},children:i("span",{style:{color:"black",fontFamily:"Montserrat",fontSize:"25px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bold"},children:"Fixture"})})}),i(V,{children:p($,{className:"mt-2",children:[p("div",{style:{display:"flex",justifyContent:"center",marginBottom:20},children:[i("div",{children:i(qb,{style:{color:"black",cursor:"pointer",width:"30px",height:"30px"},onClick:c})}),i("div",{style:{display:"flex",justifyContent:"center",flexWrap:"wrap"},children:f}),i("div",{children:i(zb,{style:{color:"black",cursor:"pointer",width:"30px",height:"30px"},onClick:l})})]}),i("div",{className:"bg-dark",style:{display:"flex",justifyContent:"center",marginBottom:0},children:p("span",{style:{color:"white",fontFamily:"Montserrat",fontSize:"18px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bold"},children:["Fecha ",s]})}),p("div",{style:{position:"relative"},children:[i("img",{src:ji,alt:"Marca de agua",style:{position:"absolute",opacity:"20%",width:"90%",left:"5%",height:"80%",top:"3%"}}),p(Ie,{striped:!0,bordered:!0,hover:!0,responsive:!0,variant:"dark",size:"sm",style:{borderColor:"gray"},children:[i("thead",{style:{width:"27%",backgroundColor:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{className:"text-center",style:{width:"27%",backgroundColor:"transparent",borderColor:"transparent"}}),i("th",{className:"text-center",style:{width:"27%",backgroundColor:"transparent",borderColor:"transparent"}}),i("th",{className:"text-center",style:{width:"27%",backgroundColor:"transparent",borderColor:"transparent"}})]})}),i("tbody",{children:a[s]&&Object.keys(a[s]).map((g,E)=>i(Fe.Fragment,{children:a[s][g].partidos.map((S,w)=>{let _,h;return n.forEach(m=>{m.nombre===S.equipolocal&&(_=m.escudos),m.nombre===S.equipovisitante&&(h=m.escudos)}),p("tr",{children:[i("td",{className:"text-center fw-bolder",style:{fontFamily:"Montserrat",fontSize:12},children:p("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignContent:"center",alignItems:"center"},children:[i("img",{className:"me-1",src:_,alt:S.equipolocal,style:{width:"15px",height:"15px",borderRadius:"50%",margin:"0"}}),S.equipolocal]})}),i("td",{className:"text-center fw-bolder",style:{fontFamily:"Montserrat",color:"#f2b700"},children:S.estado==="Finalizado"?`${S.goleslocal} - ${S.golesvisitante}`:"-"}),i("td",{className:"text-center fw-bolder",style:{fontFamily:"Montserrat",fontSize:12},children:p("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignContent:"center",alignItems:"center"},children:[i("img",{src:h,alt:S.equipovisitante,style:{width:"15px",height:"15px",borderRadius:"50%",margin:"0"}}),S.equipovisitante]})})]},w)})},E))})]}),d==="Argenliga"?i(ee,{children:i("span",{className:"fontPosiciones",style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:12},children:"Datos oficiales de @Argenliga."})}):i(ee,{})]})]})})]})},Hve=({onShowModal:t})=>{const[e,n]=C.useState([]),[r,s]=C.useState([]),[o,a]=C.useState(!1),[l,c]=C.useState(!1),d=async()=>{try{const{data:P,error:F}=await z.from("Equipos").select("*").eq("genero","Masculino");F?console.error("Error",F):s(P)}catch(P){console.error("Error",P.message)}},u=async()=>{try{const P=["3ra","4ta","5ta","6ta","7ma","8va"],F=[];for(let I of P){const{data:T,error:q}=await z.from("Inferiores").select("*").eq("organizador","Afa").eq("genero","Masculino").eq("division","B").eq("categoria",I);q?console.error("Error",q):F.push(...T)}n(F)}catch(P){console.error("Error",P.message)}};C.useEffect(()=>{d(),u()},[]);const f=r||[],g=e||[],E={},S={},w={},_={},h={},m={},A={},k={},R=new Set;g.forEach(P=>{P.equipolocal!=="A conf"&&R.add(P.equipolocal),P.equipovisitante!=="A conf"&&R.add(P.equipovisitante)}),f.forEach(P=>{const F=P.nombre;R.has(F)&&(E[F]=0,S[F]=0,m[F]=0,A[F]=0,k[F]=0,w[F]=0,_[F]=0,h[F]=0)}),g.forEach(P=>{if(P.estado==="Finalizado"||P.estado==="Jugandose"){const F=P.equipolocal,I=P.equipovisitante;if(P.resolucion==="PP ambos 0-1")S[F]+=1,S[I]+=1,h[F]+=1,h[I]+=1,A[F]+=1,A[I]+=1,k[F]-=1,k[I]-=1;else if(P.resolucion==="PP ambos 0-3")S[F]+=1,S[I]+=1,h[F]+=1,h[I]+=1,A[F]+=3,A[I]+=3,k[F]-=3,k[I]-=3;else{const T=P.goleslocal,q=P.golesvisitante;S[F]+=1,S[I]+=1,m[F]+=T,m[I]+=q,A[F]+=q,A[I]+=T,k[F]+=T-q,k[I]+=q-T,T>q?(E[F]+=3,w[F]+=1,h[I]+=1):T<q?(E[I]+=3,w[I]+=1,h[F]+=1):(E[F]+=1,E[I]+=1,_[F]+=1,_[I]+=1)}}});const O=Object.entries(E).sort((P,F)=>{if(F[1]!==P[1])return F[1]-P[1];const I=k[P[0]]||0,T=k[F[0]]||0;if(I!==T)return T-I;const q=m[P[0]]||0,W=m[F[0]]||0;return W!==q?W-q:P[0].localeCompare(F[0])}),N=P=>{const F=f.find(I=>I.nombre===P);return F?F.escudos:""};g.length>0&&g[0].organizador+` PRIMERA "${g[0].division}"`,g.length>0&&g[0].categoria;const y=g.length>0?g[0].organizador:"";return g.length>0&&g[0].genero,i(ee,{children:p(ae,{className:"contenedorTablaInferiores",style:{},children:[i("div",{style:{display:"flex",justifyContent:"center"},children:i(Qe,{className:"fw-bolder",onClick:()=>a(!o),variant:"dark",style:{fontSize:"12px",fontFamily:"Montserrat",backgroundColor:o?"white":"black",color:o?"black":"white"},children:o?"Ocultar Tabla General":"Ver Tabla General"})}),o&&p(ee,{children:[i(V,{children:i($,{className:"mt-4 bg-dark",style:{display:"flex",justifyContent:"center"},children:p("div",{style:{display:"flex",justifyContent:"center",flexDirection:"column"},children:[i("span",{className:"text-center",style:{color:"white",fontFamily:"Montserrat",fontSize:"25px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bolder"},children:"TABLA GENERAL"}),p("span",{className:"fontPosiciones text-white mt-2",style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:14},children:["Suma de puntos” (3ra, 4ta, 5ta, 6ta, 7ma, 8va) ",i("br",{}),"Una vez finalizado el Campeonato de Categorías Inferiores de Primera División “B” 2024 se jugará la “Copa Futuro Inferiores” "]}),i(Qe,{variant:"secondary",className:"fontPosiciones text-dark mt-2 btn-sm",onClick:()=>{c(!0)},style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:14,backgroundColor:"#FED372",color:"black"},children:"Ver Reglamento Copa Futuro"}),i(oj,{dataFixture:"BAfa",show:l,handleClose:()=>{c(!1)}})]})})}),i(V,{children:i($,{className:" bg-dark",children:p("div",{style:{position:"relative"},children:[i("img",{src:ji,alt:"Marca de agua",style:{position:"absolute",opacity:.2,width:"90%",left:"5%",height:"80%",top:"3%"}}),p(Ie,{className:"mt-2",striped:!0,bordered:!0,hover:!0,responsive:!0,variant:"dark",size:"sm",style:{borderColor:"gray"},children:[i("thead",{children:p("tr",{className:"bg-dark text-white",style:{fontSize:12,fontFamily:"Montserrat"},children:[i("th",{className:"text-center text-white",colSpan:1,style:{width:"3%"},children:"#"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:11},children:"Equipo"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PTS"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PJ"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PG"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PE"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"PP"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"GF"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"GC"}),i("th",{className:"text-center anchoPosiciones text-white",style:{fontSize:10},children:"DG"})]})}),i("tbody",{children:O.map(([P,F],I)=>p("tr",{children:[i("td",{style:{fontSize:12},children:I+1}),p("td",{children:[i("img",{className:"me-1",src:N(P),alt:P,style:{width:"17px",height:"17px",borderRadius:"50%",margin:"0"}}),i("span",{className:"fontPosiciones",style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:12},children:P})]}),i("td",{className:"text-center",style:{fontSize:14,fontWeight:700,color:"#f2b700"},children:F}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:S[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:w[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:_[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:h[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:m[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:A[P]}),i("td",{className:"text-white text-center",style:{fontSize:12,color:"#330",fontFamily:"Montserrat"},children:k[P]})]},P))})]}),y==="Argenliga"?i(ee,{children:i("span",{className:"fontPosiciones",style:{fontFamily:"Montserrat",fontWeight:"bold",fontSize:12},children:"Datos oficiales de @Argenliga."})}):i(ee,{})]})})})]})]})})},Gve=({ligas:t})=>{const e=Rt(),n=["A","B","C","D1","D2","Z1","Z2","B1","B2"],r=s=>["Masculino","Femenino"].flatMap(a=>t[s][a]?Object.keys(t[s][a]).sort((l,c)=>n.indexOf(l)-n.indexOf(c)).map((l,c)=>i(Wn,{className:"mb-3 bg-dark",style:{background:"linear-gradient(45deg, #1d2124, #2b271e)",border:"3px solid #343a40"},children:p(Wn.Body,{style:{display:"flex",justifyContent:"center",flexDirection:"column"},children:[i(Wn.Title,{className:"text-center fw-bolder text-white",children:s.toUpperCase()}),i(Wn.Subtitle,{className:"mb-2 text-center text-white ",children:a}),p(Wn.Text,{className:"text-center fw-bolder text-white",children:["Division: ",l]}),i("div",{style:{display:"flex",justifyContent:"center",flexWrap:"wrap",gap:"10px"},children:t[s][a][l].map((d,u)=>i(Qe,{onClick:()=>e(`/futuro/${s}/${a}/${l}/${d}`),className:"btn btn-sm bg-warning text-white fw-bolder border-white",style:{width:"80px",padding:"5px 10px",background:s==="Afa"&&l==="A"?"linear-gradient(45deg, #553099, #104d80)":s==="Afa"&&l==="B"?"linear-gradient(45deg, #997d2e, #995722)":s==="Afa"&&l==="C"?"linear-gradient(45deg, #992020, #995722)":s==="Afa"&&(l==="D1"||l==="D2")?"linear-gradient(45deg, #005066, #467334)":"linear-gradient(45deg, #343a40, #4a4530)"},children:d},`${s}-${a}-${l}-${u}`))})]})},`${s}-${a}-${l}`)):[]);return p(ae,{className:"contenedorTablaInferiores",style:{marginTop:"150px",fontFamily:"Montserrat"},children:[i("div",{children:i(et,{})}),p("div",{className:"",children:[Object.keys(t).filter(s=>s==="Afa").map(s=>r(s)),Object.keys(t).filter(s=>s!=="Afa").map(s=>r(s))]})]})},Wve=({organizador:t,genero:e,division:n,categorias:r=[]})=>i(ae,{className:"contenedorTablaInferiores",style:{marginTop:"150px",fontFamily:"Montserrat"},children:i(Wn,{className:"mb-3 bg-dark",style:{background:"linear-gradient(45deg, #1d2124, #2b271e)",border:"3px solid #343a40"},children:p(Wn.Body,{style:{display:"flex",justifyContent:"center",flexDirection:"column"},children:[i(Wn.Title,{className:"text-center fw-bolder text-white",children:t.toUpperCase()}),i(Wn.Subtitle,{className:"mb-2 text-center text-white ",children:e}),p(Wn.Text,{className:"text-center fw-bolder text-white",children:["Division: ",n]}),i("div",{style:{display:"flex",justifyContent:"center",flexWrap:"wrap",gap:"10px"},children:r.map((s,o)=>i(Qe,{className:"fw-bolder text-white",style:{width:"100px",padding:"5px 10px",background:t==="Afa"&&n==="A"?"linear-gradient(45deg, #553099, #104d80)":t==="Afa"&&n==="B"?"linear-gradient(45deg, #997d2e, #995722)":t==="Afa"&&n==="C"?"linear-gradient(45deg, #992020, #995722)":t==="Afa"&&(n==="D1"||n==="D2")?"linear-gradient(45deg, #005066, #467334)":"linear-gradient(45deg, #343a40, #4a4530)"},as:Cr,to:`/futuro/${t}/${e}/${n}/${s}`,children:s},o))})]})})});function DD(){var G,H;const[t,e]=C.useState(!1),[n,r]=C.useState(!1),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState({}),[u,f]=C.useState({}),[g,E]=C.useState(null),[S,w]=C.useState(!0),{dataEquipos:_}=nr(),h=Ss(),m=async()=>{try{const j=["1ra","3ra","4ta","5ta","6ta","7ma","8va","Unica"],U=["A","B","C","D1","D2","Z1","Z2","B1","B2"],L=[];for(let J of j)for(let Q of U)L.push(z.from("Inferiores").select("*").eq("categoria",J).eq("division",Q));const Y=(await Promise.all(L)).flatMap(({data:J})=>J);return Y.sort((J,Q)=>j.indexOf(J.categoria)-j.indexOf(Q.categoria)),Y.reduce((J,Q)=>(J[Q.organizador]||(J[Q.organizador]={}),J[Q.organizador][Q.genero]||(J[Q.organizador][Q.genero]={}),J[Q.organizador][Q.genero][Q.division]||(J[Q.organizador][Q.genero][Q.division]=[]),J[Q.organizador][Q.genero][Q.division].includes(Q.categoria)||J[Q.organizador][Q.genero][Q.division].push(Q.categoria),J),{})}catch(j){return console.error("Error",j),{}}},A=async(j,U,L,K)=>{try{const{data:Y}=await z.from("Inferiores").select("*").eq("organizador",j).eq("genero",U).eq("division",L).eq("categoria",K);l(Y)}catch(Y){console.error("Error al cargar los datos de la tabla de posiciones:",Y.message)}},k=async(j,U,L,K)=>{w(!0),E(K),await A(j,U,L,K),r(Y=>({...Y,[j]:!1})),d(Y=>({...Y,[L]:!1})),f(Y=>({...Y,[U]:!1})),e(!1),setTimeout(()=>{w(!1)},1e3),window.scrollTo(0,0)};C.useEffect(()=>{(async()=>{w(!0);try{const U=await m();o(U);const K=window.location.pathname.split("/");if(K.length===6){const Y=K[2],te=K[3],J=K[4],Q=K[5];await k(Y,te,J,Q)}}catch(U){console.error("Error fetching data:",U)}finally{w(!1)}})()},[]),C.useEffect(()=>{(async()=>{const L=window.location.pathname.split("/");if(L.length===6){const K=L[2],Y=L[3],te=L[4],J=L[5];await k(K,Y,te,J)}})()},[h]);const R=()=>e(!0),O=()=>e(!1);if(C.useEffect(()=>(document.body.classList.add("inferiores-page"),()=>{document.body.classList.remove("inferiores-page")}),[]),S)return i("div",{className:"d-flex justify-content-center",style:{height:"100vh",marginTop:"250px"},children:i("img",{className:"",src:qve,alt:"Loading...",width:356,height:356})});a.length>0&&a[0].genero;const N=a.filter(j=>(j.categoria==="6ta"||j.categoria==="7ma"||j.categoria==="8va")&&j.division==="A"&&j.organizador==="Afa"&&j.genero==="Masculino"&&j.jornada>=1&&j.jornada<=17),y=a.filter(j=>(j.categoria==="6ta"||j.categoria==="7ma"||j.categoria==="8va")&&j.division==="A"&&j.organizador==="Afa"&&j.genero==="Masculino"&&j.jornada>=18&&j.jornada<=34),v=a.filter(j=>(j.categoria==="3ra"||j.categoria==="4ta"||j.categoria==="5ta"||j.categoria==="6ta"||j.categoria==="7ma"||j.categoria==="8va")&&j.division==="B"&&j.organizador==="Afa"&&j.genero==="Masculino"),b=a.filter(j=>(j.categoria==="1ra"||j.categoria==="3ra"||j.categoria==="4ta"||j.categoria==="5ta"||j.categoria==="6ta"||j.categoria==="7ma"||j.categoria==="8va")&&j.division==="A"&&j.organizador==="Argenliga"&&j.genero==="Femenino"),P=N.filter(j=>j.jornada<=17),F=y.filter(j=>j.jornada>17);b.filter(j=>j.jornada<=14),b.filter(j=>j.jornada>14);const I=F.map(j=>({...j,jornada:j.jornada-17})),T=g?a[0].organizador:"",q=g?a[0].genero:"",W=g?a[0].division:"";return g&&a[0].categoria,p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO | FUTSAL AFA INFERIORES - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Inferiores del Futsal AFA y Argenliga: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),i(mo,{className:"bg-dark fixed-top",style:{margin:"0 auto"},children:p(ae,{className:"d-flex justify-content-arround",fluid:!0,style:{height:"100px"},children:[i(Rhe,{style:{color:"white",cursor:"pointer",width:"40px",height:"40px"},onClick:R}),i(mo.Brand,{className:"mr-auto",children:i(Cr,{to:"/futuro",onClick:()=>E(null),children:i("img",{src:ji,className:"d-inline-block align-top logoSpFuturo margenMenuSPFuturo",alt:"React Bootstrap logo"})})}),i(mo.Brand,{className:"mr-auto",children:i("a",{href:"/",children:i("img",{src:jle,className:"d-inline-block align-top logoSpenFuturo",alt:"React Bootstrap logo"})})}),p(ff,{show:t,onHide:O,className:"bg-dark",children:[i(ff.Header,{variant:"white",closeButton:!0,children:i(ff.Title,{style:{color:"white",fontFamily:"Montserrat",fontSize:"25px",lineHeight:"32px",textTransform:"uppercase",fontWeight:"bold",marginTop:"50px"},children:"LIGAS"})}),i(ff.Body,{style:{display:"flex",flexDirection:"column",justifyContent:"space-between",height:"100%"},children:p("div",{children:[Object.keys(s).sort((j,U)=>j==="Afa"?-1:U==="Afa"?1:j.localeCompare(U)).map((j,U)=>p("div",{children:[p(Cr,{className:"text-white d-block py-2",style:{fontSize:"25px",textTransform:"uppercase",fontFamily:"Montserrat",fontWeight:"bold"},to:"/futuro",onClick:()=>r(L=>({...L,[j]:!L[j]})),children:[i("span",{style:{fontWeight:"bold",marginRight:"15px"},children:i(Ive,{})}),j,i(I0,{style:{marginBottom:"7px"}})]}),n[j]&&Object.keys(s[j]).sort((L,K)=>L==="Masculino"?-1:K==="Masculino"?1:L.localeCompare(K)).map((L,K)=>p("div",{children:[p(Cr,{className:"fw-bolder d-block py-2",style:{fontSize:"25px",color:"white",fontWeight:"bolder"},to:"/futuro",onClick:()=>f(Y=>({...Y,[`${j}-${L}`]:!Y[`${j}-${L}`]})),children:[L,i(I0,{style:{marginBottom:"7px"}})]}),u[`${j}-${L}`]&&Object.keys(s[j][L]).map((Y,te)=>p("div",{children:[p(Cr,{className:"text-white d-block py-2",style:{fontSize:"25px"},to:"/futuro",onClick:()=>d(J=>({...J,[`${j}-${L}-${Y}`]:!J[`${j}-${L}-${Y}`]})),children:[i("span",{className:"fw-bolder",style:{color:"white",fontFamily:"Montserrat",fontSize:"20px",marginRight:"5px",textTransform:"uppercase",marginLeft:"15px"},children:"Primera"}),i("span",{className:"fw-bolder",style:{color:"white",fontFamily:"Montserrat",fontSize:"20px",marginRight:"5px",textTransform:"uppercase",marginLeft:"15px"},children:'"'+Y+'"'}),i(I0,{style:{marginBottom:"7px"}})]}),c[`${j}-${L}-${Y}`]&&s[j][L][Y].map((J,Q)=>i("div",{style:{display:"flex",flexDirection:"column"},children:i(Cr,{className:"fw-bolder",to:`/futuro/${j}/${L}/${Y}/${J}`,style:{color:"white",fontFamily:"Montserrat",fontSize:"18px",marginTop:"15px",textDecoration:"underline",marginLeft:"50px"},onClick:()=>k(j,L,Y,J),children:J},Q)},Q))]},te))]},K))]},U)),p("div",{style:{display:"flex",flexDirection:"column",justifyContent:"start"},children:[i(Cr,{to:"/rankinghinchasfutsal",children:i(Qe,{variant:"dark",className:"fw-bolder text-white ",style:{fontSize:"12px",fontFamily:"Montserrat",backgroundColor:"#FF4500",marginTop:"100px"},children:"FORO-RANKING HINCHAS"})}),i(Cr,{to:"/formulariofuturo",children:i(Qe,{variant:"dark",className:"fw-bolder text-dark ",style:{fontSize:"12px",fontFamily:"Montserrat",backgroundColor:"white",marginTop:"5px"},children:"¡Colabora con los resultados!"})})]}),p("div",{className:" mb-3 mt-5 ",children:[i("a",{href:"https://www.instagram.com/segundopalo_ok/",target:"_blank",children:i(hw,{style:{color:"white",fontSize:"32px"}})}),i("a",{href:"https://twitter.com/segundopalo_ok/",target:"_blank",children:i(pw,{style:{color:"white",fontSize:"32px",marginLeft:15}})})]}),p("div",{className:"mt-3",children:[i("p",{className:"text-white",style:{fontSize:"12px",fontFamily:"Montserrat"},children:"info©segundopalo.com.ar "}),i("p",{style:{fontSize:10},children:"© 2023 SEGUNDOPALO "})]})]})})]})]})}),g?p(ee,{children:[T&&q&&W&&i(Wve,{organizador:T,genero:q,division:W,categorias:((H=(G=s[T])==null?void 0:G[q])==null?void 0:H[W])||[]}),g&&i(Lve,{dataFixture:a,dataEquipos:_}),v.length>0&&i(Hve,{}),N.length>0&&i(Bve,{dataFixture:y,dataEquipos:_}),N.length>0&&i(Yve,{dataFixture:I,dataEquipos:_}),N.length>0&&i($ve,{dataFixture:N,dataEquipos:_}),N.length>0&&i(Uve,{dataFixture:P,dataEquipos:_}),g&&i(zve,{dataFixture:a,dataEquipos:_})]}):i(Gve,{ligas:s})]})}const Vve=["Afa"],Kve=["A","B","C","D1","D2"],Zve=["3ra","4ta","5ta","6ta","7a","8va"],Jve=["Delegado","Coordinador","Entrenador","Jugador","Familiar","Otro"],Xve=()=>{const[t,e]=C.useState(""),[n,r]=C.useState(""),[s,o]=C.useState(""),[a,l]=C.useState(""),[c,d]=C.useState(""),[u,f]=C.useState(""),[g,E]=C.useState(""),[S,w]=C.useState([]),[_,h]=C.useState(""),[m,A]=C.useState(""),[k,R]=C.useState(""),[O,N]=C.useState({}),[y,v]=C.useState(!1),b=I=>{if(I.preventDefault(),!F())return;const T=`*Liga:* ${t} *Division:* ${n} *Categoria:* ${a} *Jornada:* ${k} *Resultado:* ${u} ${_} - ${g} ${m} *Aclaracion:* ${c} *Soy:* ${s}`,W=`https://wa.me/5491164957425?text=${encodeURIComponent(T)}`;window.open(W),e(""),r(""),l(""),f(""),E(""),h(""),A(""),d(""),R(""),o("")};C.useEffect(()=>(document.body.classList.add("inferiores-page"),()=>{document.body.classList.remove("inferiores-page")}),[]);const P=async()=>{try{const{data:I,error:T}=await z.from("Equipos").select("*").neq("organizador","Fifa").order("nombre",{ascending:!0});T?console.error("Error",T):w(I)}catch(I){console.error("Error",I.message)}};C.useEffect(()=>{P()},[]);const F=()=>{const I={};return n||(I.division=!0),t||(I.liga=!0),a||(I.categoria=!0),k||(I.jornada=!0),u||(I.equipoLocal=!0),g||(I.equipoVisitante=!0),_||(I.golesLocal=!0),m||(I.golesVisitante=!0),s||(I.tipoColaborador=!0),N(I),Object.keys(I).length===0};return C.useEffect(()=>{v(!0)},[]),p(ee,{children:[p(Ut,{show:y,onHide:()=>v(!1),children:[i(Ut.Header,{closeButton:!0,children:i(Ut.Title,{children:"Información"})}),i(Ut.Body,{children:"Por el momento envíos de resultados únicamente de AFA"}),i(Ut.Footer,{children:i(Qe,{variant:"secondary",onClick:()=>v(!1),children:"Cerrar"})})]}),p(ae,{className:"contenedorTablaInferiores",style:{marginTop:"150px",fontFamily:"Montserrat",fontWeight:"bold"},children:[i(V,{children:i($,{className:"text-center mb-4",children:i("h4",{className:"fw-bolder",style:{whiteSpace:"nowrap"},children:"Formulario de Resultados"})})}),i(V,{children:i($,{className:"text-center mb-4",children:i("h6",{className:"fw-bolder",children:"¡Hola! ¡Bienvenido al formulario de Segund⚽Palo Futuro!"})})}),i(V,{children:i($,{className:"text-center mb-4",children:i("h6",{className:"",children:"Nos llena de alegría que estés interesado en colaborar con los resultados para mantener actualizada la tabla de posiciones. Es crucial confirmar la veracidad de los resultados, ya que estos podrían tener un impacto directo en dicha tabla. ¡Gracias por tu colaboración!"})})}),p(Ae,{onSubmit:b,children:[i(V,{children:i($,{children:p(Ae.Group,{controlId:"tipoColaborador",children:[i(Ae.Label,{children:"Soy"}),p(Ae.Select,{value:s,onChange:I=>{o(I.target.value),N(T=>({...T,tipoColaborador:!1}))},children:[i("option",{value:"",children:"Selecciona una opción"}),Jve.map((I,T)=>i("option",{value:I,children:I},T))]}),O.tipoColaborador&&i("div",{style:{color:"red",fontSize:"10px"},children:"Campo obligatorio"})]})})}),p(V,{className:"mt-3",children:[i($,{children:p(Ae.Group,{controlId:"liga",children:[i(Ae.Label,{children:"Liga"}),p(Ae.Select,{value:t,onChange:I=>{e(I.target.value),N(T=>({...T,liga:!1}))},children:[i("option",{value:"",children:"Selecciona una liga"}),Vve.map((I,T)=>i("option",{value:I,children:I},T))]}),O.liga&&i("div",{style:{color:"red",fontSize:"10px"},children:"Campo obligatorio"})]})}),i($,{children:p(Ae.Group,{controlId:"division",children:[i(Ae.Label,{children:"Division"}),p(Ae.Select,{value:n,onChange:I=>{r(I.target.value),N(T=>({...T,division:!1}))},children:[i("option",{value:"",children:"Selecciona una división"}),Kve.map((I,T)=>i("option",{value:I,children:I},T))]}),O.division&&i("div",{style:{color:"red",fontSize:"10px"},children:"Campo obligatorio"})]})})]}),p(V,{className:"mt-3",children:[i($,{children:p(Ae.Group,{controlId:"categoria",children:[i(Ae.Label,{children:"Categoria"}),p(Ae.Select,{value:a,onChange:I=>{l(I.target.value),N(T=>({...T,categoria:!1}))},children:[i("option",{value:"",children:"Selecciona una categoría"}),Zve.map((I,T)=>i("option",{value:I,children:I},T))]}),O.categoria&&i("div",{style:{color:"red",fontSize:"10px"},children:"Campo obligatorio"})]})}),i($,{children:p(Ae.Group,{controlId:"jornada",children:[i(Ae.Label,{children:"Jornada"}),i(Ae.Control,{type:"number",min:"0",value:k,onChange:I=>R(I.target.value),placeholder:"Ingrese la Jornada del torneo"})]})})]}),p(V,{className:"mt-3",children:[i($,{md:8,children:p(Ae.Group,{controlId:"equipoLocal",children:[i(Ae.Label,{children:"Equipo Local"}),p(Ae.Select,{value:u,onChange:I=>{f(I.target.value),N(T=>({...T,equipoLocal:!1}))},children:[i("option",{value:"",children:"Selecciona un equipo local"}),S.map((I,T)=>i("option",{value:I.nombre,children:I.nombre},T))]}),O.equipoLocal&&i("div",{style:{color:"red",fontSize:"10px"},children:"Campo obligatorio"})]})}),i($,{md:4,children:p(Ae.Group,{controlId:"golesLocal",children:[i(Ae.Label,{children:"Goles Local"}),i(Ae.Control,{type:"number",min:"0",value:_,onChange:I=>{h(I.target.value),N(T=>({...T,golesLocal:!1}))},placeholder:"Ingrese los goles del equipo local"}),O.golesLocal&&i("div",{style:{color:"red",fontSize:"10px"},children:"Campo obligatorio"})]})})]}),p(V,{className:"mt-3",children:[i($,{md:8,children:p(Ae.Group,{controlId:"equipoVisitante",children:[i(Ae.Label,{children:"Equipo Visitante"}),p(Ae.Select,{value:g,onChange:I=>{E(I.target.value),N(T=>({...T,equipoVisitante:!1}))},children:[i("option",{value:"",children:"Selecciona un equipo visitante"}),S.map((I,T)=>i("option",{value:I.nombre,children:I.nombre},T))]}),O.equipoVisitante&&i("div",{style:{color:"red",fontSize:"10px"},children:"Campo obligatorio"})]})}),i($,{md:4,children:p(Ae.Group,{controlId:"golesVisitante",children:[i(Ae.Label,{children:"Goles Visitante"}),i(Ae.Control,{type:"number",min:"0",value:m,onChange:I=>{A(I.target.value),N(T=>({...T,golesLocal:!1}))},placeholder:"Ingrese los goles del equipo local"}),O.golesVisitante&&i("div",{style:{color:"red",fontSize:"10px"},children:"Campo obligatorio"})]})})]}),i(V,{className:"mt-3",children:i($,{children:p(Ae.Group,{controlId:"aclaracion",children:[i(Ae.Label,{children:"Aclaracion"}),i(Ae.Control,{as:"textarea",value:c,onChange:I=>d(I.target.value),placeholder:"Escriba alguna aclaración si lo desea:"})]})})}),p(V,{className:"mt-3 mb-5",children:[i($,{className:"text-center",children:i(Cr,{to:"/futuro",children:i(Qe,{variant:"dark",className:"fw-bolder",style:{fontSize:"12px"},children:"Volver a la Tablas de Posiciones"})})}),i($,{className:"text-center",children:p(Qe,{variant:"success",type:"submit",className:"fw-bolder",children:["Enviar ",i(uL,{})]})})]})]})]})]})},Qve=()=>{const[t,e]=C.useState([]),[n,r]=C.useState(!0),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),{dataEquipos:u}=nr();C.useEffect(()=>{f(),g(),E(),S();const w=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},h=>{S()}).subscribe(),_=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},h=>{getDataEquipos()}).subscribe();return()=>{w.unsubscribe(),_.unsubscribe()}},[]);const f=async()=>{try{const{data:w,error:_}=await z.from("listado_2024").select("*").eq("torneo","PRIMERAC");_?console.error("Error",_):(e(w),r(!1))}catch(w){console.error("Error",w.message)}},g=async()=>{try{const{data:w,error:_}=await z.from("CanalesTv").select("*");_?console.error("Error",_):(o(w),r(!1))}catch(w){console.error("Error",w.message)}},E=async()=>{try{const{data:w,error:_}=await z.from("Goleadores").select("*").eq("torneo","PRIMERAC").eq("añoGoleadores",2024);_?console.error("Error",_):l(w)}catch(w){console.error("Error",w.message)}},S=async()=>{try{const{data:w,error:_}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFC").eq("añoTorneo",2024);_?console.error("Error",_):(d(w),console.log("playoffc",w),r(!1))}catch(w){console.error("Error",w.message)}};return n?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL AFA PRIMERA C- PRIMERA - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera C: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"FUTSAL AFA PRIMERA C",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{className:"bannerParaPc",children:i(cs,{})})}),i(V,{children:i($,{className:"",children:i(et,{})})}),i(V,{children:i($,{md:12,children:i(Fo,{dataFixture:c,dataEquipos:u,canalesTvPlayoff:s})})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:u})}),p($,{md:6,children:[i(ls,{}),i(Tn,{dataFixture:t,dataEquipos:u,canalesTv:s}),i(Vt,{goleadores:a,dataEquipos:u})]})]})]})]})},e0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState(!0),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),{dataEquipos:u}=nr();C.useEffect(()=>{f(),g(),E(),S();const w=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},h=>{f()}).subscribe(),_=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},h=>{getDataEquipos()}).subscribe();return()=>{w.unsubscribe(),_.unsubscribe()}},[]);const f=async()=>{try{const{data:w,error:_}=await z.from("listado_2024").select("*").eq("torneo","PRIMERAAFEM");_?console.error("Error",_):(e(w),r(!1))}catch(w){console.error("Error",w.message)}},g=async()=>{try{const{data:w,error:_}=await z.from("CanalesTv").select("*");_?console.error("Error",_):(o(w),r(!1))}catch(w){console.error("Error",w.message)}},E=async()=>{try{const{data:w,error:_}=await z.from("Goleadores").select("*").eq("torneo","PRIMERAAFEM").eq("añoGoleadores",2024);_?console.error("Error",_):l(w)}catch(w){console.error("Error",w.message)}},S=async()=>{try{const{data:w,error:_}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFAFEM").eq("añoTorneo",2024);_?console.error("Error",_):(d(w),r(!1))}catch(w){console.error("Error",w.message)}};return n?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL AFA PRIMERA A - FEMENINO - PRIMERA - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera A FEMENINO: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"FUTSAL AFA FEM PRIMERA A",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{className:"bannerParaPc",children:i(cs,{})})}),i(V,{children:i($,{className:"",children:i(et,{})})}),i(V,{children:i($,{md:12})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:u})}),p($,{md:6,children:[i(ls,{}),i(Tn,{dataFixture:t,dataEquipos:u,canalesTv:s}),i(Vt,{goleadores:a,dataEquipos:u})]})]})]})]})},t0e=()=>{const[t,e]=C.useState(!0);return C.useEffect(()=>{e(!0),setTimeout(()=>e(!1),1e3)},[]),t?i("div",{className:"d-flex justify-content-center",style:{marginTop:250},children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL - ORIGEN DE LOS GOLES - ESTADISTICAS"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera A, B, C, D : tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{children:p("h6",{className:"text-center text-white",style:{fontSize:20,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",alignItems:"center"},children:[i(qd,{style:{marginRight:"5px"}}),"ORIGEN DE LOS GOLES",i(qd,{style:{marginLeft:"5px"}})," "]})})}),i(V,{children:i($,{})}),i("div",{style:{position:"relative",width:"100%",paddingTop:"100.0000%",paddingBottom:0,marginBottom:"0.9em",overflow:"hidden",borderRadius:"8px",willChange:"transform",marginTop:"5em"},children:i("iframe",{style:{position:"absolute",width:"100%",height:"100%",top:0,left:0,border:"none",padding:0,margin:0,bottom:0},src:"https://www.canva.com/design/DAF9XgYIL1g/kIRgbGwrZNJ3l7RuoIoDIg/view?embed",allow:"fullscreen"})})]})]})},n0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState(!0),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),{dataEquipos:u}=nr();C.useEffect(()=>{f(),g(),E(),S();const w=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},h=>{S()}).subscribe(),_=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},h=>{getDataEquipos()}).subscribe();return()=>{w.unsubscribe(),_.unsubscribe()}},[]);const f=async()=>{try{const{data:w,error:_}=await z.from("listado_2024").select("*").eq("torneo","PRIMERABFEM");_?console.error("Error",_):(e(w),r(!1))}catch(w){console.error("Error",w.message)}},g=async()=>{try{const{data:w,error:_}=await z.from("CanalesTv").select("*");_?console.error("Error",_):(o(w),r(!1))}catch(w){console.error("Error",w.message)}},E=async()=>{try{const{data:w,error:_}=await z.from("Goleadores").select("*").eq("torneo","PRIMERABFEM").eq("añoGoleadores",2024);_?console.error("Error",_):l(w)}catch(w){console.error("Error",w.message)}},S=async()=>{try{const{data:w,error:_}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFBFEM").eq("añoTorneo",2024);_?console.error("Error",_):(d(w),r(!1))}catch(w){console.error("Error",w.message)}};return n?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL AFA PRIMERA B - FEMENINO - PRIMERA - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera A FEMENINO: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"FUTSAL AFA FEM PRIMERA B",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{className:"bannerParaPc",children:i(cs,{})})}),i(V,{children:i($,{className:"",children:i(et,{})})}),i(V,{children:i($,{md:12,children:i(Fo,{dataFixture:c,dataEquipos:u,canalesTvPlayoff:s})})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:u})}),p($,{md:6,children:[i(ls,{}),i(Tn,{dataFixture:t,dataEquipos:u,canalesTv:s}),i(Vt,{goleadores:a,dataEquipos:u})]})]})]})]})},r0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},u=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},u=>{l()}).subscribe();return()=>{c.unsubscribe(),d.unsubscribe()}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","LNFA").eq("añoTorneo",2024).eq("grupoCopas","A");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},s0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},A=>{E()}).subscribe();return()=>{h.unsubscribe(),m.unsubscribe()}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","LNFA").eq("añoTorneo",2024).eq("grupoCopas","B");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","PRIMERAA");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})};function Iv({dataFixture:t,dataEquipos:e}){const[n,r]=C.useState([]),s=t.reduce((d,u)=>{const f=u.grupoCopas,g=u.jornada;return d[f]||(d[f]={}),d[f][g]||(d[f][g]=[]),d[f][g].push(u),d},{}),o=Object.keys(s).sort();C.useEffect(()=>{const u=e.filter(f=>f.organizador==="Afa").map(f=>({escudo:f.escudos,equipo:f.nombre}));r(u)},[e]);const a=(d,u)=>{l("/videos",{state:{url:d,data:u}})},l=Rt();function c(d,u){const f=d.hora?se(d.hora,"HH:mm:ss"):se(),g=u.hora?se(u.hora,"HH:mm:ss"):se();return f.diff(g)}return i(ee,{children:i(ae,{children:o.map(d=>{const u=Object.keys(s[d]),f=[];for(let g=0;g<u.length;g+=2)f.push(u.slice(g,g+2));return f.map((g,E)=>i(V,{children:g.map(S=>{const w=s[d][S].find(h=>h.libre),_=s[d][S].sort(c);return i($,{md:6,xs:6,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[p("thead",{style:{color:"transparent",borderColor:"transparent"},children:[p("tr",{children:[i("th",{style:{width:"17%"}}),i("th",{style:{width:"8%"}}),i("th",{style:{width:"8%"}}),i("th",{style:{width:"17%"}}),i("th",{style:{width:"10%"}})]}),i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"11px"},children:[" Fecha ",S]})})]}),p("tbody",{children:[_.map(h=>{const m=n.find(y=>y.equipo===h.equipolocal),A=n.find(y=>y.equipo===h.equipovisitante);let k="A confirmar";h.fecha&&(k=se(h.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("ddd DD/MM").toUpperCase().replace(".",""));const R=h.estado==="Jugandose"?"red":"white",O=h.estado==="Jugandose"?"white":"black";let N="";return h.hora&&(N=se(h.hora,"HH:mm:ss").format("HH:mm")),p(Fe.Fragment,{children:[i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder ",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:[" ",k," - ",N]})}),p("tr",{className:"align-middle",children:[p("td",{className:"bg-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"12px"},children:[m&&i("img",{src:m.escudo,alt:m.equipo,width:"12",height:"12"})," ",h.equipolocal.substring(0,3).toUpperCase()]}),i("td",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:R,color:O},children:h.estado==="Finalizado"||h.estado==="Jugandose"?h.goleslocal:""}),i("td",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:R,color:O},children:h.estado==="Finalizado"||h.estado==="Jugandose"?h.golesvisitante:""}),p("td",{className:"bg-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"12px"},children:[h.equipovisitante.substring(0,3).toUpperCase()," ",A&&i("img",{src:A.escudo,alt:A.equipo,width:"12",height:"12"})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:h.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{a(h.linkgoles,{estado:h.estado,equipolocal:h.equipolocal,equipovisitante:h.equipovisitante,goleslocal:h.goleslocal,penaleslocal:h.penaleslocal,penalesvisitante:h.penalesvisitante,golesvisitante:h.golesvisitante,escudoLocal:m.escudo,escudoVisitante:A.escudo,tiempodelpartido:h.tiempodelpartido}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})})})]})]},h.id)}),w&&i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[" Libre: ",w.libre]})})]})]})},S)})},E))})})})}const o0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},u=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},u=>{l()}).subscribe();return()=>{c.unsubscribe(),d.unsubscribe()}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","LNFA").eq("añoTorneo",2024).eq("grupoCopas","A");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(Iv,{dataFixture:t,dataEquipos:n})})},i0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},A=>{E()}).subscribe();return()=>{h.unsubscribe(),m.unsubscribe()}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","LNFA").eq("añoTorneo",2024).eq("grupoCopas","B");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","PRIMERAA");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(Iv,{dataFixture:t,dataEquipos:n})})},a0e=({dataEquipos:t,dataFixture:e})=>{const s=(o=>{const a=o.reduce((l,c)=>{const d=c.llavePlayOff;return l[d]||(l[d]=[]),l[d].push(c),l},{});return Object.entries(a).map(([l,c])=>({llave:l,partidos:c}))})(e||[]);return i(ee,{children:i(ae,{className:"bracket-container",children:i(ae,{className:"bracket",children:i(V,{children:p($,{children:[p("div",{className:"round quarterfinals",children:[p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="1"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° A"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° B"]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="2"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° C"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° D"]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]}),p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="3"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° B"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° A"]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="4"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° D"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° C"]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})]}),i("div",{className:"round semifinals",children:p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="5"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="6"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})}),i("div",{className:"round finals",children:i("div",{className:"winners",children:i("div",{className:"matchups",children:i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="7"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))})})})})]})})})})})},l0e=({dataEquipos:t,dataFixture:e,canalesTvPlayoff:n})=>{var A;const[r,s]=C.useState(!0),[o,a]=C.useState([]),[l,c]=C.useState([]),[d,u]=C.useState([]),[f,g]=C.useState([]),E=e||[];C.useEffect(()=>{c(t),u(n),a(S(e)),s(!1)},[t,e]);const S=k=>{const R={};k.forEach(N=>{const y=N.faseCopas,v=N.llavePlayOff;R[y]||(R[y]={}),R[y][v]||(R[y][v]=[]),R[y][v].push(N)});const O={};return Object.keys(R).sort().forEach(N=>{O[N]={};const y=["Ida","Vuelta","Tercer partido"];Object.keys(R[N]).sort().forEach(v=>{R[N][v].sort((b,P)=>y.indexOf(b.partidoPlayOff)-y.indexOf(P.partidoPlayOff)),O[N][v]=R[N][v]})}),O},w=S(E),_=(k,R)=>{h("/videos",{state:{url:k,data:R}})},h=Rt(),m=["Final","3 puesto","Semi final","Cuartos de final","Octavos de final","16avos","32avos","5 puesto","7 puesto","5 a 8 puesto","9 puesto","11 puesto","2° Fase","1° Fase"];return(A=E[0])==null||A.torneo,p(ae,{className:"anchoPlayoff",children:[Object.entries(w).sort((k,R)=>{const O=k[0],N=R[0],y=m.indexOf(O),v=m.indexOf(N);return y-v}).map(([k,R])=>i(ee,{children:p(ae,{className:" mt-1",children:[p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"15px"},children:[" ",k.toUpperCase()]}),i($,{children:Object.entries(R).map(([O,N])=>{const y=N[0].equipolocal,v=N[0].equipovisitante;return y||v!=="A conf"?i(ee,{children:i($,{md:12,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{children:Array.isArray(N)&&N.map(b=>{var K,Y,te,J,Q;const P=b.equipolocal,F=b.equipovisitante,I=b.transmision,T=Array.isArray(l)?(K=l.find(oe=>oe.nombre===P))==null?void 0:K.escudos:void 0,q=Array.isArray(l)?(Y=l.find(oe=>oe.nombre===F))==null?void 0:Y.escudos:void 0,W=(te=d.find(oe=>oe.idTv===I))==null?void 0:te.logo,G=b.hora?se(b.hora,"HH:mm:ss").format("HH:mm"):"A conf",H=f===b.id&&b.estado==="Jugandose"?"#dc3545":"white",j=f===b.id&&b.estado==="Jugandose"?"white":"black",U=se(b.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("DD/MM"),L=se(b.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("dddd").toUpperCase();return p(Fe.Fragment,{children:[b.fecha!==null?i("tr",{children:p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[L," ",U]})}):i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"FECHA Y HORA A CONFIRMAR"}),i("tr",{children:i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:b.partidoPlayOff})}),p("tr",{children:[b.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder",style:{fontSize:9,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):b.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",b.motivossuspension,")"]})]}):b.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:b.estado}):b.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Parc ",W&&i("img",{src:W,alt:I,style:{width:"20px",height:"20px"}})]}):b.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:[b.tiempodelpartido," ",W&&i("img",{src:W,alt:I,style:{width:"20px",height:"20px"}})]}):b.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[b.hora===""?i(ee,{children:"A conf"}):G," ",W&&i("img",{src:W,alt:I,style:{width:"20px",height:"20px"}}),i("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"}})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[T&&i("img",{src:T,alt:P,style:{width:"15px",height:"15px"}})," ",i("span",{style:{height:"auto"},children:P!==""?P:"A conf"})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:H,color:j,width:"auto"},children:[b.estado!=="Pendiente"?b.goleslocal:null,b.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+b.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:H,color:j},children:[b.estado!=="Pendiente"?b.golesvisitante:null,b.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+b.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[T&&i("img",{src:q,alt:F,style:{width:"15px",height:"15px"}})," ",p("span",{style:{height:"auto"},children:[" ",F!==""?F:"A conf"]})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[b.linkgoles===null||b.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{_(b.linkgoles,{estado:b.estado,equipolocal:b.equipolocal,equipovisitante:b.equipovisitante,goleslocal:b.goleslocal,penaleslocal:b.penaleslocal,penalesvisitante:b.penalesvisitante,golesvisitante:b.golesvisitante,escudoLocal:T,escudoVisitante:q,tiempodelpartido:b.tiempodelpartido}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})}),b.linkvivo===null||b.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{_(b.linkvivo,{estado:b.estado,equipolocal:b.equipolocal,equipovisitante:b.equipovisitante,goleslocal:b.goleslocal,penaleslocal:b.penaleslocal,penalesvisitante:b.penalesvisitante,golesvisitante:b.golesvisitante,escudoLocal:T,escudoVisitante:q,tiempodelpartido:b.tiempodelpartido}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Ns,{style:{fontSize:"12px"}})})]})})]},b.id),(b.goleadoresLocal||b.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(J=b.goleadoresLocal)==null?void 0:J.split(",").map((oe,pe)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[pe>0&&"-",oe.trim().slice(0,-1)]},pe))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(Q=b.goleadoresVisitante)==null?void 0:Q.split(",").map((oe,pe)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[pe>0&&"-",oe.trim().slice(0,-1)]},pe))})})]})]},b.id)})})]})})}):null})},k)]})})),i(V,{})]})},c0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},u=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},u=>{l()}).subscribe();return()=>{c.unsubscribe(),d.unsubscribe()}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","LNFA").eq("añoTorneo",2024).eq("grupoCopas","C");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},d0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},u=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},u=>{l()}).subscribe();return()=>{c.unsubscribe(),d.unsubscribe()}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","LNFA").eq("añoTorneo",2024).eq("grupoCopas","D");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},u0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},u=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},u=>{l()}).subscribe();return()=>{c.unsubscribe(),d.unsubscribe()}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","LNFA").eq("añoTorneo",2024).eq("grupoCopas","C");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(Iv,{dataFixture:t,dataEquipos:n})})},f0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},u=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},u=>{l()}).subscribe();return()=>{c.unsubscribe(),d.unsubscribe()}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","LNFA").eq("añoTorneo",2024).eq("grupoCopas","D");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(Iv,{dataFixture:t,dataEquipos:n})})},h0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]);C.useState([]);const[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]);C.useEffect(()=>{u(),f(),g(),E(),S();const w=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},_=>{E()}).subscribe();return()=>{w.unsubscribe()}},[]);const u=async()=>{try{const{data:w,error:_}=await z.from("Goleadores").select("*").eq("torneo","LNFA").eq("añoGoleadores",2024);_?console.error("Error",_):e(w)}catch(w){console.error("Error",w.message)}},f=async()=>{try{const{data:w,error:_}=await z.from("Equipos").select("*").eq("genero","Masculino");_?console.error("Error",_):r(w)}catch(w){console.error("Error",w.message)}},g=async()=>{try{const{data:w,error:_}=await z.from("Fixture2023").select("*").eq("torneo","FFLNFA").eq("añoTorneo",2024);_?console.error("Error",_):o(w)}catch(w){console.error("Error",w.message)}},E=async()=>{try{const{data:w,error:_}=await z.from("Fixture2023").select("*").eq("torneo","FFLNFA").eq("añoTorneo",2024);_?console.error("Error",_):l(w)}catch(w){console.error("Error",w.message)}},S=async()=>{try{const{data:w,error:_}=await z.from("CanalesTv").select("*");_?console.error("Error",_):d(w)}catch(w){console.error("Error",w.message)}};return p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL -LNFA - LIGA NACIONAL FUTSAL ARGENTINA - FIXTURES - PARTIDOS"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de LA COPA LNFA DE Futsal , fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo mb-5",children:[i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"15px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina"}),"LIGA NACIONAL FUTSAL ARGENTINA (LNFA)",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina"})]})}),i(V,{children:i($,{md:12,children:i(et,{})})}),i(V,{children:i($,{md:12})}),i(V,{children:i($,{className:"text-center d-flex justify-content-center mb-2 mt-2",style:{overflowY:"auto"},children:i(a0e,{dataFixture:a,dataEquipos:n})})}),i(V,{}),i(V,{children:i($,{md:12,children:i(l0e,{dataFixture:a,dataEquipos:n,canalesTvPlayoff:c})})}),i(V,{children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"FASE DE GRUPOS"})})}),p(V,{children:[p($,{md:6,children:[i(r0e,{}),i(o0e,{})]}),p($,{md:6,children:[i(hr,{}),i(s0e,{}),i(i0e,{})]})]}),p(V,{children:[p($,{md:6,children:[i(c0e,{}),i(u0e,{})]}),p($,{md:6,children:[i(hr,{}),i(d0e,{}),i(f0e,{})]})]}),i(V,{children:i($,{md:6,className:"mb-5",children:i(Vt,{goleadores:t,dataEquipos:n})})})]})]})},p0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},A=>{E()}).subscribe();return()=>{h.unsubscribe(),m.unsubscribe()}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","INTEGRACION").eq("añoTorneo",2024);m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","INTEGRACION").eq("añoGoleadores",2024);m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2024);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL AFA TORNEO INTEGRACION - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Torneo Integracion tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"TORNEO INTEGRACION",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{children:i(et,{})})}),i(V,{children:i($,{md:12})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:n})}),i($,{md:6,className:"mb-5",children:i(Tn,{dataFixture:t,dataEquipos:n,canalesTv:a})})]})]})]})};function m0e(t){return Pt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M186.3 258.2c0 12.2-9.7 21.5-22 21.5-9.2 0-16-5.2-16-15 0-12.2 9.5-22 21.7-22 9.3 0 16.3 5.7 16.3 15.5zM80.5 209.7h-4.7c-1.5 0-3 1-3.2 2.7l-4.3 26.7 8.2-.3c11 0 19.5-1.5 21.5-14.2 2.3-13.4-6.2-14.9-17.5-14.9zm284 0H360c-1.8 0-3 1-3.2 2.7l-4.2 26.7 8-.3c13 0 22-3 22-18-.1-10.6-9.6-11.1-18.1-11.1zM576 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM128.3 215.4c0-21-16.2-28-34.7-28h-40c-2.5 0-5 2-5.2 4.7L32 294.2c-.3 2 1.2 4 3.2 4h19c2.7 0 5.2-2.9 5.5-5.7l4.5-26.6c1-7.2 13.2-4.7 18-4.7 28.6 0 46.1-17 46.1-45.8zm84.2 8.8h-19c-3.8 0-4 5.5-4.2 8.2-5.8-8.5-14.2-10-23.7-10-24.5 0-43.2 21.5-43.2 45.2 0 19.5 12.2 32.2 31.7 32.2 9 0 20.2-4.9 26.5-11.9-.5 1.5-1 4.7-1 6.2 0 2.3 1 4 3.2 4H200c2.7 0 5-2.9 5.5-5.7l10.2-64.3c.3-1.9-1.2-3.9-3.2-3.9zm40.5 97.9l63.7-92.6c.5-.5.5-1 .5-1.7 0-1.7-1.5-3.5-3.2-3.5h-19.2c-1.7 0-3.5 1-4.5 2.5l-26.5 39-11-37.5c-.8-2.2-3-4-5.5-4h-18.7c-1.7 0-3.2 1.8-3.2 3.5 0 1.2 19.5 56.8 21.2 62.1-2.7 3.8-20.5 28.6-20.5 31.6 0 1.8 1.5 3.2 3.2 3.2h19.2c1.8-.1 3.5-1.1 4.5-2.6zm159.3-106.7c0-21-16.2-28-34.7-28h-39.7c-2.7 0-5.2 2-5.5 4.7l-16.2 102c-.2 2 1.3 4 3.2 4h20.5c2 0 3.5-1.5 4-3.2l4.5-29c1-7.2 13.2-4.7 18-4.7 28.4 0 45.9-17 45.9-45.8zm84.2 8.8h-19c-3.8 0-4 5.5-4.3 8.2-5.5-8.5-14-10-23.7-10-24.5 0-43.2 21.5-43.2 45.2 0 19.5 12.2 32.2 31.7 32.2 9.3 0 20.5-4.9 26.5-11.9-.3 1.5-1 4.7-1 6.2 0 2.3 1 4 3.2 4H484c2.7 0 5-2.9 5.5-5.7l10.2-64.3c.3-1.9-1.2-3.9-3.2-3.9zm47.5-33.3c0-2-1.5-3.5-3.2-3.5h-18.5c-1.5 0-3 1.2-3.2 2.7l-16.2 104-.3.5c0 1.8 1.5 3.5 3.5 3.5h16.5c2.5 0 5-2.9 5.2-5.7L544 191.2v-.3zm-90 51.8c-12.2 0-21.7 9.7-21.7 22 0 9.7 7 15 16.2 15 12 0 21.7-9.2 21.7-21.5.1-9.8-6.9-15.5-16.2-15.5z"},child:[]}]})(t)}const g0e=()=>{const[t,e]=C.useState(0),[n,r]=C.useState(0),[s,o]=C.useState(0);return C.useEffect(()=>{(async()=>{const{data:l,error:c}=await z.from("ProgresoDonaciones").select("objective, currentsubscribers").single();c?console.error("Error fetching data from Supabase:",c):l&&(e(l.objective),r(l.currentsubscribers),o(l.currentsubscribers/l.objective*100))})()},[]),i(V,{children:i($,{className:"col-12 col-md-12 mt-2",children:p("div",{style:{textAlign:"center",width:"100%"},children:[i("p",{className:"text-start text-dark fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"17px"},children:"Evolución de contribuciones"}),i(iL,{now:s,style:{height:"15px",width:"100%",borderRadius:"0",backgroundColor:"#e9ecef"},children:i("div",{style:{width:`${s}%`,backgroundColor:"#32c0c1",height:"100%",borderRadius:"0"}})}),i("p",{className:"text-start text-dark fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"17px"},children:`${Math.round(s)}% DEL OBJETIVO ALCANZADO`}),i("p",{className:"text-start text-dark fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"12px"},children:"*Datos obtenidos en tiempo real MercadoPago"}),p("p",{className:"text-start text-dark fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"12px"},children:["Estaremos trabajando a medida que crezcan las colaboraciones:",p("ul",{style:{paddingLeft:"20px",marginTop:"5px"},children:[i("li",{children:"Torneos de Inferiores de todas las ligas"}),i("li",{children:"Tabla de goleadores de Inferiores"}),i("li",{children:"Ligas Internacionales"}),i("li",{children:"Actualización de Fichas de jugadores"}),i("li",{children:"Aplicación de Celular"}),i("li",{children:"Consulta de datos históricos de todas las ligas"}),i("li",{children:"Envío de notificaciones de cada partido"})]})]})]})})})},y0e=()=>{const[t,e]=C.useState(0);return p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - SUMATE - DONACIONES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera A: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:"tamañoTorneo mt-3 mb-5",style:{display:"flex",justifyContent:"center",flexDirection:"column"},children:[p(ae,{style:{backgroundColor:"white",borderRadius:"15px",boxShadow:"10 14px 18px 20PX rgba(50, 192, 193, 0.5)"},className:"",children:[p(V,{children:[i($,{className:" col-12 col-md-12",style:{backgroundColor:"#32c0c1"},children:i("p",{className:"text-start fw-bolder text-white mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"30px",textShadow:"2px 2px 4px #32c0c1"},children:"APOYA A SEGUND⚽PALO"})}),i($,{className:" col-12 col-md-12",style:{backgroundColor:""},children:p("p",{className:"text-center text-dark mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"16px",textShadow:"2px 2px 4px #32c0c1"},children:["¡Gracias por tu apoyo! Si estás aquí, es porque valoras nuestro trabajo brindando estadísticas de FUTSAL. ",i("br",{})," SEGUND⚽PALO se sostiene gracias a quienes creen en la importancia de este servicio gratuito y sin publicidad hasta el momento. ",i("br",{}),i("br",{}),"Si te resulta útil y deseas ayudarnos a seguir creciendo, puedes contribuir con una donación de cualquier monto. Tu apoyo nos permitirá continuar mejorando y manteniendo la plataforma para toda la comunidad."]})}),i($,{className:" col-12 col-md-12",style:{backgroundColor:"#32c0c1"},children:i("p",{className:"text-start fw-bolder text-white mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"30px",textShadow:"2px 2px 4px #32c0c1"},children:"¿Porque colaborar con SEGUNDOPALO?"})}),i($,{className:"mt-3 col-12 col-md-12",style:{display:"flex",justifyContent:"center"},children:p("p",{className:"text-start text-dark mt-2",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"17px",textShadow:"2px 2px 4px #32c0c1"},children:[" - Cobertura en tiempo real de más ligas, tanto nacionales como internacionales. ",i("br",{})," - Actualización constante de fichas de jugadores y estadísticas detalladas. ",i("br",{})," - Seguimiento preciso de la programación de todas las ligas (hora, fecha, lugar y atención a cambios). ",i("br",{})," - Resultados en tiempo y forma de categorías inferiores. ",i("br",{})," - Mantenimiento de dominios y hosting para seguir en línea sin interrupciones. ",i("br",{})," - Mejora en la atención y cobertura de todos los canales de transmisión. ",i("br",{})," - Mayor difusión y alcance a medios y clubes, para que siempre estés informado. ",i("br",{})," "]})}),i($,{className:"mt-3 col-12 col-md-12",style:{display:"flex",justifyContent:"center"},children:i("p",{className:"text-start text-dark mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"13px",textShadow:"2px 2px 4px #32c0c1"},children:"* TODAS LAS CARGAS SON MANUALES, SP no está conectado a ningún proveedor de datos."})}),i(g0e,{}),i($,{className:" col-12 col-md-12",style:{backgroundColor:"#32c0c1"},children:p("p",{className:"text-start fw-bolder text-white mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"16px",textShadow:"2px 2px 4px #32c0c1"},children:["ELEGÍ EL MONTO QUE QUIERAS DONAR MENSUALMENTE ",i($K,{style:{fontSize:"50px"}})]})})]}),i(V,{children:i($,{className:" text-center fw-bolder col-12 col-md-12",style:{backgroundColor:""},children:i("p",{className:"text-start fw-bolder text-dark mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"12px",textShadow:"2px 2px 4px #32c0c1"},children:"Esta donación se procesará a través de la plataforma segura de MercadoPago "})})}),p(V,{children:[i($,{className:"mb-5 col-6 col-md-6",style:{display:"flex",justifyContent:"center"},children:i("a",{href:"https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_plan_id=2c93808491eb5f1c019202d616420742",target:"_blank",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:"m-1 btn fw-bolder btn-md",style:{fontSize:19,backgroundColor:"transparent",width:"150px",height:"70px",borderColor:"#32c0c1",color:"#32c0c1"},children:"$5000"})})}),i($,{className:"mb-5 col-6 col-md-6",style:{display:"flex",justifyContent:"center"},children:i("a",{href:"https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_plan_id=2c9380848e681dc9018e77401cba0826",target:"_blank",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:"m-1 btn fw-bolder btn-md",style:{fontSize:19,backgroundColor:"transparent",width:"150px",height:"70px",borderColor:"#32c0c1",color:"#32c0c1"},children:"$3000"})})}),i($,{className:"mb-5 col-6 col-md-6",style:{display:"flex",justifyContent:"center"},children:i("a",{href:"https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_plan_id=2c9380848e681dc9018e6b4b0ff80123",target:"_blank",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:"m-1 btn fw-bolder btn-md",style:{fontSize:19,backgroundColor:"transparent",width:"150px",height:"70px",borderColor:"#32c0c1",color:"#32c0c1"},children:"$1000"})})}),i($,{className:"mb-5 col-6 col-md-6",style:{display:"flex",justifyContent:"center"},children:i("a",{href:"https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_plan_id=2c9380848e681d84018e773f963407dd",target:"_blank",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:"m-1 btn fw-bolder btn-md",style:{fontSize:19,backgroundColor:"transparent",width:"150px",height:"70px",borderColor:"#32c0c1",color:"#32c0c1"},children:"$500"})})}),i($,{className:"mb-5 col-12",style:{display:"flex",justifyContent:"center"},children:i("a",{href:"https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_plan_id=2c93808487806daa01878c1a18a204c1",target:"_blank",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:"m-1 btn fw-bolder btn-md",style:{fontSize:19,backgroundColor:"transparent",width:"250px",height:"50px",borderColor:"#32c0c1",color:"#32c0c1"},children:"OTRO IMPORTE"})})}),i($,{className:" col-12 col-md-12",style:{backgroundColor:"#32c0c1"},children:p("p",{className:"text-start fw-bolder text-white mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"16px",textShadow:"2px 2px 4px #32c0c1"},children:["ELEGÍ EL MONTO QUE QUIERAS DONAR MENSUALMENTE ",i(m0e,{style:{fontSize:"50px"}})]})})]}),i(V,{children:i($,{className:" text-center fw-bolder col-12 col-md-12",style:{backgroundColor:""},children:i("p",{className:"text-start fw-bolder text-dark mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"12px",textShadow:"2px 2px 4px #32c0c1"},children:"Esta donación se procesará a través de la plataforma segura de PayPal "})})}),i(V,{children:i($,{className:"mb-5 col-12 col-md-12",style:{display:"flex",justifyContent:"center"},children:i("a",{href:"https://www.paypal.com/donate/?hosted_button_id=DYEK6VYN6GGNE",target:"_blank",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i("button",{className:"m-1 btn fw-bolder btn-md",style:{fontSize:19,backgroundColor:"transparent",width:"auto",height:"70px",borderColor:"#32c0c1",color:"#32c0c1"},children:"DONAR / DONATE"})})})})]}),i(V,{children:p($,{className:"mt-3",style:{display:"flex",justifyContent:"center",flexDirection:"column"},children:[i("p",{className:"text-center text-white ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"18px",textShadow:"2px 2px 4px #000000"},children:"Calcula el monto que quieras donar diariamente y te mostraremos el monto mensual"}),i("input",{className:"fw-bolder",type:"number",min:"0",value:t,onChange:s=>{e(s.target.value)},style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"22px"}}),p("p",{className:"text-center text-white mt-2 ",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"19px",textShadow:"2px 2px 4px #000000"},children:["El monto mensual sería:$",(()=>t*30)()]})]})}),i(V,{})]})]})},b0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState(!0),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),{dataEquipos:u}=nr();C.useEffect(()=>{f(),g(),E(),S();const w=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},h=>{S()}).subscribe(),_=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},h=>{getDataEquipos()}).subscribe();return()=>{w.unsubscribe(),_.unsubscribe()}},[]);const f=async()=>{try{const{data:w,error:_}=await z.from("listado_2024").select("*").eq("torneo","PRIMERACFEM");_?console.error("Error",_):(e(w),r(!1))}catch(w){console.error("Error",w.message)}},g=async()=>{try{const{data:w,error:_}=await z.from("CanalesTv").select("*");_?console.error("Error",_):(o(w),r(!1))}catch(w){console.error("Error",w.message)}},E=async()=>{try{const{data:w,error:_}=await z.from("Goleadores").select("*").eq("torneo","PRIMERACFEM").eq("añoGoleadores",2024);_?console.error("Error",_):l(w)}catch(w){console.error("Error",w.message)}},S=async()=>{try{const{data:w,error:_}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFCFEM").eq("añoTorneo",2024);_?console.error("Error",_):(d(w),r(!1))}catch(w){console.error("Error",w.message)}};return n?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL AFA PRIMERA C - FEMENINO - PRIMERA - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera A FEMENINO: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"FUTSAL AFA FEM PRIMERA C",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{className:"bannerParaPc",children:i(cs,{})})}),i(V,{children:i($,{className:"",children:i(et,{})})}),i(V,{children:i($,{md:12,children:i(Fo,{dataFixture:c,dataEquipos:u,canalesTvPlayoff:s})})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:u})}),p($,{md:6,children:[i(ls,{}),i(Tn,{dataFixture:t,dataEquipos:u,canalesTv:s}),i(Vt,{goleadores:a,dataEquipos:u})]})]})]})]})},v0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]),[g,E]=C.useState([]);Ss(),C.useEffect(()=>{S(),w(),_(),h(),m();const A=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},R=>{S()}).subscribe(),k=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},R=>{w()}).subscribe();return()=>{A.unsubscribe(),k.unsubscribe()}},[]);const S=async()=>{try{const{data:A,error:k}=await z.from("Fixture2023").select("*").eq("torneo","LAAMBA").eq("añoTorneo",2024).eq("zona","apertura");k?console.error("Error en la zona apertura",k):e(A);const{data:R,error:O}=await z.from("Fixture2023").select("*").eq("torneo","LAAMBA").eq("añoTorneo",2024).eq("zona","clausura");O?console.error("Error en la zona clausura",O):E(R),o(!1)}catch(A){console.error("Error",A.message)}},w=async()=>{try{const{data:A,error:k}=await z.from("Equipos").select("*").eq("genero","Masculino");k?console.error("Error",k):(r(A),o(!1))}catch(A){console.error("Error",A.message)}},_=async()=>{try{const{data:A,error:k}=await z.from("CanalesTv").select("*");k?console.error("Error",k):(l(A),o(!1))}catch(A){console.error("Error",A.message)}},h=async()=>{try{const{data:A,error:k}=await z.from("Goleadores").select("*").eq("torneo","LAAMBA").eq("añoGoleadores",2024);k?console.error("Error",k):d(A)}catch(A){console.error("Error",A.message)}},m=async()=>{try{const{data:A,error:k}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2024);k?console.error("Error",k):(f(A),o(!1))}catch(A){console.error("Error",A.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL LAAMBA - PRIMERA ELITE - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera A: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"FUTSAL LAAMBA",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{children:i(et,{})})}),i(V,{children:i($,{md:12})}),g&&g.length>0&&p(ee,{children:[i(V,{children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:"TORNEO CLAUSURA"})})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:g,dataEquipos:n})}),p($,{md:6,children:[i(hr,{}),i(Tn,{dataFixture:g,dataEquipos:n,canalesTv:a}),i(Vt,{goleadores:c,dataEquipos:n})]})]})]}),i(V,{className:"mt-4",children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:"TORNEO APERTURA"})})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:n})}),p($,{md:6,children:[i(hr,{}),i(Tn,{dataFixture:t,dataEquipos:n,canalesTv:a})]})]})]})]})},_0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]),[g,E]=C.useState([]);Ss(),C.useEffect(()=>{S(),w(),_(),h(),m();const A=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},R=>{S()}).subscribe(),k=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},R=>{w()}).subscribe();return()=>{A.unsubscribe(),k.unsubscribe()}},[]);const S=async()=>{try{const{data:A,error:k}=await z.from("Fixture2023").select("*").eq("torneo","LAAMBAFEM").eq("añoTorneo",2024).eq("zona","apertura");k?console.error("Error en la zona apertura",k):e(A);const{data:R,error:O}=await z.from("Fixture2023").select("*").eq("torneo","LAAMBAFEM").eq("añoTorneo",2024).eq("zona","clausura");O?console.error("Error en la zona clausura",O):E(R),o(!1)}catch(A){console.error("Error",A.message)}},w=async()=>{try{const{data:A,error:k}=await z.from("Equipos").select("*").eq("genero","Masculino");k?console.error("Error",k):(r(A),o(!1))}catch(A){console.error("Error",A.message)}},_=async()=>{try{const{data:A,error:k}=await z.from("CanalesTv").select("*");k?console.error("Error",k):(l(A),o(!1))}catch(A){console.error("Error",A.message)}},h=async()=>{try{const{data:A,error:k}=await z.from("Goleadores").select("*").eq("torneo","LAAMBAFEM").eq("añoGoleadores",2024);k?console.error("Error",k):d(A)}catch(A){console.error("Error",A.message)}},m=async()=>{try{const{data:A,error:k}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFLAAMBAFEM").eq("añoTorneo",2024);k?console.error("Error",k):(f(A),o(!1))}catch(A){console.error("Error",A.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL LAAMBA - PRIMERA ELITE FEMENINO - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal AFA Primera A: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"FUTSAL LAAMBA FEM",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{children:i(et,{})})}),i(V,{children:i($,{md:12})}),g&&g.length>0&&p(ee,{children:[i(V,{children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:"TORNEO CLAUSURA"})})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:g,dataEquipos:n})}),p($,{md:6,children:[i(hr,{}),i(Tn,{dataFixture:g,dataEquipos:n,canalesTv:a}),i(Vt,{goleadores:c,dataEquipos:n})]})]})]}),i(V,{className:"mt-4",children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:"TORNEO APERTURA"})})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:n})}),p($,{md:6,children:[i(hr,{}),i(Tn,{dataFixture:t,dataEquipos:n,canalesTv:a})]})]})]})]})},w0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},f=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},f=>{l()}).subscribe(),u=()=>{document.hidden||(a(),l())};return document.addEventListener("visibilitychange",u,!1),()=>{c.unsubscribe(),d.unsubscribe(),document.removeEventListener("visibilitychange",u,!1)}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","LIBERTADORES").eq("añoTorneo",2024).eq("grupoCopas","A");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},x0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},k=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},k=>{E()}).subscribe(),A=()=>{document.hidden||(g(),E())};return document.addEventListener("visibilitychange",A,!1),()=>{h.unsubscribe(),m.unsubscribe(),document.removeEventListener("visibilitychange",A,!1)}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","LIBERTADORES").eq("añoTorneo",2024).eq("grupoCopas","B");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","LIBERTADORES");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})};function IA({dataFixture:t,dataEquipos:e}){const[n,r]=C.useState([]),s=t.reduce((d,u)=>{const f=u.grupoCopas,g=u.jornada;return d[f]||(d[f]={}),d[f][g]||(d[f][g]=[]),d[f][g].push(u),d},{}),o=Object.keys(s).sort();C.useEffect(()=>{const d=e.map(u=>({escudo:u.escudos,equipo:u.nombre}));r(d)},[e]);const a=(d,u)=>{l("/videos",{state:{url:d,data:u}})},l=Rt();function c(d,u){const f=d.hora?se(d.hora,"HH:mm:ss"):se(),g=u.hora?se(u.hora,"HH:mm:ss"):se();return f.diff(g)}return i(ee,{children:i(ae,{children:o.map(d=>{const u=Object.keys(s[d]),f=[];for(let g=0;g<u.length;g+=2)f.push(u.slice(g,g+2));return f.map((g,E)=>i(V,{children:g.map(S=>{const w=s[d][S].find(h=>h.libre),_=s[d][S].sort(c);return i($,{md:6,xs:6,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[p("thead",{style:{color:"transparent",borderColor:"transparent"},children:[p("tr",{children:[i("th",{style:{width:"17%"}}),i("th",{style:{width:"8%"}}),i("th",{style:{width:"8%"}}),i("th",{style:{width:"17%"}}),i("th",{style:{width:"10%"}})]}),i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"11px"},children:[" Fecha ",S]})})]}),p("tbody",{children:[_.map(h=>{const m=n.find(y=>y.equipo===h.equipolocal),A=n.find(y=>y.equipo===h.equipovisitante);let k="A confirmar";h.fecha&&(k=se(h.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("ddd DD/MM").toUpperCase().replace(".",""));const R=h.estado==="Jugandose"?"red":"white",O=h.estado==="Jugandose"?"white":"black";let N="";return h.hora&&(N=se(h.hora,"HH:mm:ss").format("HH:mm")),p(Fe.Fragment,{children:[i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder ",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:[" ",k," - ",N]})}),p("tr",{className:"align-middle",children:[p("td",{className:"bg-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"12px"},children:[m&&i("img",{src:m.escudo,alt:m.equipo,width:"12",height:"12"})," ",h.equipolocal.substring(0,3).toUpperCase()]}),i("td",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:R,color:O},children:h.estado==="Finalizado"||h.estado==="Jugandose"?h.goleslocal:""}),i("td",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:R,color:O},children:h.estado==="Finalizado"||h.estado==="Jugandose"?h.golesvisitante:""}),p("td",{className:"bg-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"12px"},children:[h.equipovisitante.substring(0,3).toUpperCase()," ",A&&i("img",{src:A.escudo,alt:A.equipo,width:"12",height:"12"})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:h.linkgoles===null||h.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{a(h.linkgoles,{id:h.id,estado:h.estado,equipolocal:h.equipolocal,equipovisitante:h.equipovisitante,goleslocal:h.goleslocal,penaleslocal:h.penaleslocal,penalesvisitante:h.penalesvisitante,golesvisitante:h.golesvisitante,escudoLocal:m,escudoVisitante:A,tiempodelpartido:h.tiempodelpartido,hora:N,goleadoresLocal:h.goleadoresLocal,goleadoresVisitante:h.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})})})]})]},h.id)}),w&&i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[" Libre: ",w.libre]})})]})]})},S)})},E))})})})}const C0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},f=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},f=>{l()}).subscribe(),u=()=>{document.hidden||(a(),l())};return document.addEventListener("visibilitychange",u,!1),()=>{c.unsubscribe(),d.unsubscribe(),document.removeEventListener("visibilitychange",u,!1)}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","LIBERTADORES").eq("añoTorneo",2024).eq("grupoCopas","A");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(IA,{dataFixture:t,dataEquipos:n})})},E0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},k=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},k=>{E()}).subscribe(),A=()=>{document.hidden||(g(),E())};return document.addEventListener("visibilitychange",A,!1),()=>{h.unsubscribe(),m.unsubscribe(),document.removeEventListener("visibilitychange",A,!1)}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","LIBERTADORES").eq("añoTorneo",2024).eq("grupoCopas","B");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","LIBERTADORES");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(IA,{dataFixture:t,dataEquipos:n})})},S0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},f=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},f=>{l()}).subscribe(),u=()=>{document.hidden||(a(),l())};return document.addEventListener("visibilitychange",u,!1),()=>{c.unsubscribe(),d.unsubscribe(),document.removeEventListener("visibilitychange",u,!1)}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","LIBERTADORES").eq("añoTorneo",2024).eq("grupoCopas","C");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(IA,{dataFixture:t,dataEquipos:n})})},A0e=({dataEquipos:t,dataFixture:e})=>{const s=(o=>{const a=o.reduce((l,c)=>{const d=c.llavePlayOff;return l[d]||(l[d]=[]),l[d].push(c),l},{});return Object.entries(a).map(([l,c])=>({llave:l,partidos:c}))})(e||[]);return i(ee,{children:i(ae,{className:"bracket-container",children:i(ae,{className:"bracket",children:i(V,{children:p($,{children:[p("div",{className:"round quarterfinals",children:[p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="1"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° A"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° mejor 3°"]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="2"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"2° B"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° C"]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]}),p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="3"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° B"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"1° mejor 3°"]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="4"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° C"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° A"]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})]}),i("div",{className:"round semifinals",children:p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="5"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="6"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})}),i("div",{className:"round finals",children:i("div",{className:"winners",children:i("div",{className:"matchups",children:i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="7"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))})})})})]})})})})})},N0e=({dataEquipos:t,dataFixture:e,canalesTvPlayoff:n})=>{var k;const[r,s]=C.useState(!0),[o,a]=C.useState([]),[l,c]=C.useState([]),[d,u]=C.useState([]),[f,g]=C.useState([]),E=e||[];C.useEffect(()=>{c(t),u(n),a(S(e)),s(!1)},[t,e]);const S=R=>{const O={};R.forEach(y=>{const v=y.faseCopas,b=y.llavePlayOff;O[v]||(O[v]={}),O[v][b]||(O[v][b]=[]),O[v][b].push(y)});const N={};return Object.keys(O).sort().forEach(y=>{N[y]={};const v=["Ida","Vuelta","Tercer partido"];Object.keys(O[y]).sort().forEach(b=>{O[y][b].sort((P,F)=>v.indexOf(P.partidoPlayOff)-v.indexOf(F.partidoPlayOff)),N[y][b]=O[y][b]})}),N},w=S(E),_=Object.fromEntries(Object.entries(w).map(([R,O])=>{const N=Object.fromEntries(Object.entries(O).map(([y,v])=>{const b=v.filter(P=>P.equipolocal!=="A conf"||P.equipovisitante!=="A conf");return[y,b]}).filter(([y,v])=>v.length>0));return[R,N]}).filter(([R,O])=>Object.keys(O).length>0)),h=(R,O)=>{m("/videos",{state:{url:R,data:O}})},m=Rt(),A=["Final","3 puesto","Semi final","Cuartos de final","Octavos de final","16avos","32avos","5 puesto","7 puesto","5 a 8 puesto","9 puesto","11 puesto","2° Fase","1° Fase"];return(k=E[0])==null||k.torneo,p(ae,{className:"anchoPlayoff",children:[Object.entries(_).sort((R,O)=>{const N=R[0],y=O[0],v=A.indexOf(N),b=A.indexOf(y);return v-b}).map(([R,O])=>i(ee,{children:p(ae,{className:" mt-1",children:[p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"18px"},children:[" ",R.toUpperCase()]}),i($,{children:Object.entries(O).map(([N,y])=>i(ee,{children:i($,{md:12,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{children:Array.isArray(y)&&y.map(v=>{var L,K,Y,te,J;const b=v.equipolocal,P=v.equipovisitante,F=v.transmision,I=Array.isArray(l)?(L=l.find(Q=>Q.nombre===b))==null?void 0:L.escudos:void 0,T=Array.isArray(l)?(K=l.find(Q=>Q.nombre===P))==null?void 0:K.escudos:void 0,q=(Y=d.find(Q=>Q.idTv===F))==null?void 0:Y.logo,W=v.hora?se(v.hora,"HH:mm:ss").format("HH:mm"):"A conf",G=f===v.id&&v.estado==="Jugandose"?"#dc3545":"white",H=f===v.id&&v.estado==="Jugandose"?"white":"black",j=se(v.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("DD/MM"),U=se(v.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("dddd").toUpperCase();return p(Fe.Fragment,{children:[v.fecha!==null?i("tr",{children:p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[U," ",j]})}):i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"FECHA Y HORA A CONFIRMAR"}),i("tr",{children:i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:v.partidoPlayOff})}),p("tr",{children:[v.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder",style:{fontSize:9,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):v.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",v.motivossuspension,")"]})]}):v.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:v.estado}):v.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Parc ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}})]}):v.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:[v.tiempodelpartido," ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}})]}):v.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[v.hora===""?i(ee,{children:"A conf"}):W," ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}}),i("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"}})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[I&&i("img",{src:I,alt:b,style:{width:"15px",height:"15px"}})," ",i("span",{style:{height:"auto"},children:b!==""?b:"A conf"})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:G,color:H,width:"auto"},children:[v.estado!=="Pendiente"?v.goleslocal:null,v.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+v.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:G,color:H},children:[v.estado!=="Pendiente"?v.golesvisitante:null,v.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+v.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[I&&i("img",{src:T,alt:P,style:{width:"15px",height:"15px"}})," ",p("span",{style:{height:"auto"},children:[" ",P!==""?P:"A conf"]})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[v.linkgoles===null||v.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(v.linkgoles,{id:v.id,estado:v.estado,equipolocal:v.equipolocal,equipovisitante:v.equipovisitante,goleslocal:v.goleslocal,penaleslocal:v.penaleslocal,penalesvisitante:v.penalesvisitante,golesvisitante:v.golesvisitante,escudoLocal:I,escudoVisitante:T,tiempodelpartido:v.tiempodelpartido,hora:W,goleadoresLocal:v.goleadoresLocal,goleadoresVisitante:v.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})}),v.linkvivo===null||v.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(v.linkvivo,{id:v.id,estado:v.estado,equipolocal:v.equipolocal,equipovisitante:v.equipovisitante,goleslocal:v.goleslocal,penaleslocal:v.penaleslocal,penalesvisitante:v.penalesvisitante,golesvisitante:v.golesvisitante,escudoLocal:I,escudoVisitante:T,tiempodelpartido:v.tiempodelpartido,hora:W,goleadoresLocal:v.goleadoresLocal,goleadoresVisitante:v.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Ns,{style:{fontSize:"12px"}})})]})})]},v.id),(v.goleadoresLocal||v.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(te=v.goleadoresLocal)==null?void 0:te.split(",").map((Q,oe)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[oe>0&&"-",Q.trim().slice(0,-1)]},oe))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(J=v.goleadoresVisitante)==null?void 0:J.split(",").map((Q,oe)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[oe>0&&"-",Q.trim().slice(0,-1)]},oe))})})]})]},v.id)})})]})})}))},R)]})})),i(V,{})]})},R0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},k=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},k=>{E()}).subscribe(),A=()=>{document.hidden||(g(),E())};return document.addEventListener("visibilitychange",A,!1),()=>{h.unsubscribe(),m.unsubscribe(),document.removeEventListener("visibilitychange",A,!1)}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","LIBERTADORES").eq("añoTorneo",2024).eq("grupoCopas","C");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","LIBERTADORES");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},P0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_(),h();const m=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{_()}).subscribe();return()=>{m.unsubscribe()}},[]);const g=async()=>{try{const{data:m,error:A}=await z.from("Goleadores").select("*").eq("torneo","LIBERTADORES").eq("añoGoleadores",2024);A?console.error("Error",A):e(m)}catch(m){console.error("Error",m.message)}},E=async()=>{try{const{data:m,error:A}=await z.from("Equipos").select("*").eq("genero","Masculino");A?console.error("Error",A):r(m)}catch(m){console.error("Error",m.message)}},S=async()=>{try{const{data:m,error:A}=await z.from("Asistencias").select("*").eq("torneo","LIBERTADORES").eq("añoAsistencia",2024);A?console.error("Error",A):o(m)}catch(m){console.error("Error",m.message)}},w=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").eq("torneo","FFLIBERTADORES").eq("añoTorneo",2023);A?console.error("Error",A):l(m)}catch(m){console.error("Error",m.message)}},_=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").eq("torneo","FFLIBERTADORES").eq("añoTorneo",2024);A?console.error("Error",A):d(m)}catch(m){console.error("Error",m.message)}},h=async()=>{try{const{data:m,error:A}=await z.from("CanalesTv").select("*");A?console.error("Error",A):f(m)}catch(m){console.error("Error",m.message)}};return p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL -COPA LIBERTADORES - FIXTURES - PARTIDOS"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de LA COPA LIBERTADORES DE Futsal , fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo mb-5",children:[i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i(Ft,{style:{marginRight:3}}),"COPA LIBERTADORES",i(Ft,{style:{marginLeft:3}})]})}),i(V,{children:i($,{md:12,children:i(et,{})})}),i(V,{children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"FASE FINAL"})})}),i(V,{children:i($,{className:"text-center d-flex justify-content-center mb-2 mt-2",style:{overflowY:"auto"},children:i(A0e,{dataFixture:c,dataEquipos:n})})}),i(V,{}),i(V,{children:i($,{md:12,children:i(N0e,{dataFixture:c,dataEquipos:n,canalesTvPlayoff:u})})}),i(V,{children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"FASE DE GRUPOS"})})}),p(V,{children:[p($,{md:6,children:[i(w0e,{}),i(C0e,{})]}),p($,{md:6,children:[i(hr,{}),i(x0e,{}),i(E0e,{})]}),p($,{md:6,children:[i(hr,{}),i(R0e,{}),i(S0e,{})]})]}),i(V,{children:i($,{md:6,className:"mb-5",children:i(Vt,{goleadores:t,dataEquipos:n})})})]})]})},O0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},u=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},u=>{l()}).subscribe();return()=>{c.unsubscribe(),d.unsubscribe()}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","COPAAFRICA").eq("añoTorneo",2024).eq("grupoCopas","A");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},F0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},A=>{E()}).subscribe();return()=>{h.unsubscribe(),m.unsubscribe()}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","COPAAFRICA").eq("añoTorneo",2024).eq("grupoCopas","B");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","COPAAFRICA");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})};function ij({dataFixture:t,dataEquipos:e}){const[n,r]=C.useState([]),s=t.reduce((d,u)=>{const f=u.grupoCopas,g=u.jornada;return d[f]||(d[f]={}),d[f][g]||(d[f][g]=[]),d[f][g].push(u),d},{}),o=Object.keys(s).sort();C.useEffect(()=>{const d=e.map(u=>({escudo:u.escudos,equipo:u.nombre}));r(d)},[e]);const a=(d,u)=>{l("/videos",{state:{url:d,data:u}})},l=Rt();function c(d,u){const f=d.hora?se(d.hora,"HH:mm:ss"):se(),g=u.hora?se(u.hora,"HH:mm:ss"):se();return f.diff(g)}return i(ee,{children:i(ae,{children:o.map(d=>{const u=Object.keys(s[d]),f=[];for(let g=0;g<u.length;g+=2)f.push(u.slice(g,g+2));return f.map((g,E)=>i(V,{children:g.map(S=>{const w=s[d][S].find(h=>h.libre),_=s[d][S].sort(c);return i($,{md:6,xs:6,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[p("thead",{style:{color:"transparent",borderColor:"transparent"},children:[p("tr",{children:[i("th",{style:{width:"17%"}}),i("th",{style:{width:"8%"}}),i("th",{style:{width:"8%"}}),i("th",{style:{width:"17%"}}),i("th",{style:{width:"10%"}})]}),i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"11px"},children:[" Fecha ",S]})})]}),p("tbody",{children:[_.map(h=>{const m=n.find(y=>y.equipo===h.equipolocal),A=n.find(y=>y.equipo===h.equipovisitante);let k="A confirmar";h.fecha&&(k=se(h.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("ddd DD/MM").toUpperCase().replace(".",""));const R=h.estado==="Jugandose"?"red":"white",O=h.estado==="Jugandose"?"white":"black";let N="";return h.hora&&(N=se(h.hora,"HH:mm:ss").format("HH:mm")),p(Fe.Fragment,{children:[i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder ",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:[" ",k," - ",N]})}),p("tr",{className:"align-middle",children:[p("td",{className:"bg-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"12px"},children:[m&&i("img",{src:m.escudo,alt:m.equipo,width:"12",height:"12"})," ",h.equipolocal.substring(0,3).toUpperCase()]}),i("td",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:R,color:O},children:h.estado==="Finalizado"||h.estado==="Jugandose"?h.goleslocal:""}),i("td",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:R,color:O},children:h.estado==="Finalizado"||h.estado==="Jugandose"?h.golesvisitante:""}),p("td",{className:"bg-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"12px"},children:[h.equipovisitante.substring(0,3).toUpperCase()," ",A&&i("img",{src:A.escudo,alt:A.equipo,width:"12",height:"12"})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:h.linkgoles===null?null:i("a",{style:{cursor:"pointer"},onClick:()=>{a(h.linkgoles,{id:h.id,estado:h.estado,equipolocal:h.equipolocal,equipovisitante:h.equipovisitante,goleslocal:h.goleslocal,penaleslocal:h.penaleslocal,penalesvisitante:h.penalesvisitante,golesvisitante:h.golesvisitante,escudoLocal:m,escudoVisitante:A,tiempodelpartido:h.tiempodelpartido,hora:N,goleadoresLocal:h.goleadoresLocal,goleadoresVisitante:h.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})})})]})]},h.id)}),w&&i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[" Libre: ",w.libre]})})]})]})},S)})},E))})})})}const D0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},u=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},u=>{l()}).subscribe();return()=>{c.unsubscribe(),d.unsubscribe()}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","COPAAFRICA").eq("añoTorneo",2024).eq("grupoCopas","A");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(ij,{dataFixture:t,dataEquipos:n})})},k0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},A=>{E()}).subscribe();return()=>{h.unsubscribe(),m.unsubscribe()}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","COPAAFRICA").eq("añoTorneo",2024).eq("grupoCopas","B");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","PRIMERAA");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(ij,{dataFixture:t,dataEquipos:n})})},T0e=({dataEquipos:t,dataFixture:e})=>{const s=(o=>{const a=o.reduce((l,c)=>{const d=c.llavePlayOff;return l[d]||(l[d]=[]),l[d].push(c),l},{});return Object.entries(a).map(([l,c])=>({llave:l,partidos:c}))})(e||[]);return i(ae,{className:"bracket-container",children:i(ae,{className:"bracket",children:i(V,{children:p($,{children:[i("div",{className:"round semifinals",children:p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="1"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1°A"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2°B"]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="2"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1°B"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2°A"]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})}),i("div",{className:"round finals",children:i("div",{className:"winners",children:i("div",{className:"matchups",children:i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="3"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"G1"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"G2"]})})})]},c)})},a))})})})})]})})})})},I0e=({dataEquipos:t,dataFixture:e,canalesTvPlayoff:n})=>{var A;const[r,s]=C.useState(!0),[o,a]=C.useState([]),[l,c]=C.useState([]),[d,u]=C.useState([]),[f,g]=C.useState([]),E=e||[];C.useEffect(()=>{c(t),u(n),a(S(e)),s(!1)},[t,e]);const S=k=>{const R={};k.forEach(N=>{const y=N.faseCopas,v=N.llavePlayOff;R[y]||(R[y]={}),R[y][v]||(R[y][v]=[]),R[y][v].push(N)});const O={};return Object.keys(R).sort().forEach(N=>{O[N]={};const y=["Ida","Vuelta","Tercer partido"];Object.keys(R[N]).sort().forEach(v=>{R[N][v].sort((b,P)=>y.indexOf(b.partidoPlayOff)-y.indexOf(P.partidoPlayOff)),O[N][v]=R[N][v]})}),O},w=S(E),_=(k,R)=>{h("/videos",{state:{url:k,data:R}})},h=Rt(),m=["Final","3 puesto","Semi final","Cuartos de final","Octavos de final","16avos","32avos","5 puesto","7 puesto","5 a 8 puesto","9 puesto","11 puesto","2° Fase","1° Fase"];return(A=E[0])==null||A.torneo,p(ae,{className:"anchoPlayoff",children:[Object.entries(w).sort((k,R)=>{const O=k[0],N=R[0],y=m.indexOf(O),v=m.indexOf(N);return y-v}).map(([k,R])=>i(ee,{children:p(ae,{className:" mt-1",children:[p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"15px"},children:[" ",k.toUpperCase()]}),i($,{children:Object.entries(R).map(([O,N])=>i(ee,{children:i($,{md:12,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{children:Array.isArray(N)&&N.map(y=>{var U,L,K,Y,te;const v=y.equipolocal,b=y.equipovisitante,P=y.transmision,F=Array.isArray(l)?(U=l.find(J=>J.nombre===v))==null?void 0:U.escudos:void 0,I=Array.isArray(l)?(L=l.find(J=>J.nombre===b))==null?void 0:L.escudos:void 0,T=(K=d.find(J=>J.idTv===P))==null?void 0:K.logo,q=y.hora?se(y.hora,"HH:mm:ss").format("HH:mm"):"A conf",W=f===y.id&&y.estado==="Jugandose"?"#dc3545":"white",G=f===y.id&&y.estado==="Jugandose"?"white":"black",H=se(y.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("DD/MM"),j=se(y.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("dddd").toUpperCase();return p(Fe.Fragment,{children:[y.fecha!==null?i("tr",{children:p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[j," ",H]})}):i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"FECHA Y HORA A CONFIRMAR"}),i("tr",{children:i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:y.partidoPlayOff})}),p("tr",{children:[y.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder",style:{fontSize:9,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):y.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",y.motivossuspension,")"]})]}):y.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:y.estado}):y.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Parc ",T&&i("img",{src:T,alt:P,style:{width:"20px",height:"20px"}})]}):y.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:[y.tiempodelpartido," ",T&&i("img",{src:T,alt:P,style:{width:"20px",height:"20px"}})]}):y.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[y.hora===""?i(ee,{children:"A conf"}):q," ",T&&i("img",{src:T,alt:P,style:{width:"20px",height:"20px"}}),i("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"}})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[F&&i("img",{src:F,alt:v,style:{width:"15px",height:"15px"}})," ",i("span",{style:{height:"auto"},children:v!==""?v:"A conf"})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:W,color:G,width:"auto"},children:[y.estado!=="Pendiente"?y.goleslocal:null,y.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+y.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:W,color:G},children:[y.estado!=="Pendiente"?y.golesvisitante:null,y.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+y.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[F&&i("img",{src:I,alt:b,style:{width:"15px",height:"15px"}})," ",p("span",{style:{height:"auto"},children:[" ",b!==""?b:"A conf"]})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[y.linkgoles===null||y.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{_(y.linkgoles,{id:y.id,estado:y.estado,equipolocal:y.equipolocal,equipovisitante:y.equipovisitante,goleslocal:y.goleslocal,penaleslocal:y.penaleslocal,penalesvisitante:y.penalesvisitante,golesvisitante:y.golesvisitante,escudoLocal:F,escudoVisitante:I,tiempodelpartido:y.tiempodelpartido,hora:q,goleadoresLocal:y.goleadoresLocal,goleadoresVisitante:y.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})}),y.linkvivo===null||y.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{_(y.linkvivo,{id:y.id,estado:y.estado,equipolocal:y.equipolocal,equipovisitante:y.equipovisitante,goleslocal:y.goleslocal,penaleslocal:y.penaleslocal,penalesvisitante:y.penalesvisitante,golesvisitante:y.golesvisitante,escudoLocal:F,escudoVisitante:I,tiempodelpartido:y.tiempodelpartido,hora:q,goleadoresLocal:y.goleadoresLocal,goleadoresVisitante:y.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Ns,{style:{fontSize:"12px"}})})]})})]},y.id),(y.goleadoresLocal||y.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(Y=y.goleadoresLocal)==null?void 0:Y.split(",").map((J,Q)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[Q>0&&"-",J.trim().slice(0,-1)]},Q))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(te=y.goleadoresVisitante)==null?void 0:te.split(",").map((J,Q)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[Q>0&&"-",J.trim().slice(0,-1)]},Q))})})]})]},y.id)})})]})})}))},k)]})})),i(V,{})]})},M0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_(),h();const m=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{_()}).subscribe();return()=>{m.unsubscribe()}},[]);const g=async()=>{try{const{data:m,error:A}=await z.from("Goleadores").select("*").eq("torneo","COPAAFRICA").eq("añoGoleadores",2024);A?console.error("Error",A):e(m)}catch(m){console.error("Error",m.message)}},E=async()=>{try{const{data:m,error:A}=await z.from("Equipos").select("*").eq("genero","Masculino");A?console.error("Error",A):r(m)}catch(m){console.error("Error",m.message)}},S=async()=>{try{const{data:m,error:A}=await z.from("Asistencias").select("*").eq("torneo","COPAAFRICA").eq("añoAsistencia",2024);A?console.error("Error",A):o(m)}catch(m){console.error("Error",m.message)}},w=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").eq("torneo","FFCOPAAFRICA").eq("añoTorneo",2023);A?console.error("Error",A):l(m)}catch(m){console.error("Error",m.message)}},_=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").eq("torneo","FFCOPAAFRICA").eq("añoTorneo",2024);A?console.error("Error",A):d(m)}catch(m){console.error("Error",m.message)}},h=async()=>{try{const{data:m,error:A}=await z.from("CanalesTv").select("*");A?console.error("Error",A):f(m)}catch(m){console.error("Error",m.message)}};return p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL -COPA AFRICA - FIXTURES - PARTIDOS"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de LA COPA AFRICA DE Futsal , fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo mb-5",children:[i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i(Ft,{style:{marginRight:3}}),"COPA AFRICA",i(Ft,{style:{marginLeft:3}})]})}),i(V,{children:i($,{md:12,children:i(et,{})})}),i(V,{children:p($,{md:12,children:[i("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"FASE FINAL"}),i("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"15px"},children:"* Los dos equipos finalistas y el ganador del 3° puesto clasifican a la Copa del Mundo de Futsal 2024."})]})}),i(V,{children:i($,{className:"text-center d-flex justify-content-center mb-2 mt-2",style:{overflowY:"auto"},children:i(T0e,{dataFixture:c,dataEquipos:n})})}),i(V,{}),i(V,{children:i($,{md:12,children:i(I0e,{dataFixture:c,dataEquipos:n,canalesTvPlayoff:u})})}),i(V,{children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"FASE DE GRUPOS"})})}),p(V,{children:[p($,{md:6,children:[i(O0e,{}),i(D0e,{})]}),p($,{md:6,children:[i(hr,{}),i(F0e,{}),i(k0e,{})]})]}),i(V,{children:i($,{md:6,className:"mb-5",children:i(Vt,{goleadores:t,dataEquipos:n})})})]})]})},L0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},u=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},u=>{l()}).subscribe();return()=>{c.unsubscribe(),d.unsubscribe()}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","COPAASIA").eq("añoTorneo",2024).eq("grupoCopas","A");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},z0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},A=>{E()}).subscribe();return()=>{h.unsubscribe(),m.unsubscribe()}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","COPAASIA").eq("añoTorneo",2024).eq("grupoCopas","B");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","COPAAFRICA");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},q0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},u=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},u=>{l()}).subscribe();return()=>{c.unsubscribe(),d.unsubscribe()}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","COPAASIA").eq("añoTorneo",2024).eq("grupoCopas","C");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},j0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},u=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},u=>{l()}).subscribe();return()=>{c.unsubscribe(),d.unsubscribe()}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","COPAASIA").eq("añoTorneo",2024).eq("grupoCopas","D");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},$0e=({dataEquipos:t,dataFixture:e})=>{const s=(o=>{const a=o.reduce((l,c)=>{const d=c.llavePlayOff;return l[d]||(l[d]=[]),l[d].push(c),l},{});return Object.entries(a).map(([l,c])=>({llave:l,partidos:c}))})(e||[]);return i(ee,{children:i(ae,{className:"bracket-container",children:i(ae,{className:"bracket",children:i(V,{children:p($,{children:[p("div",{className:"round quarterfinals",children:[p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="1"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° A"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° B"]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="2"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° C"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° D"]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]}),p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="3"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° B"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° A"]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="4"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° D"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° C"]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})]}),i("div",{className:"round semifinals",children:p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="5"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="6"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})}),i("div",{className:"round finals",children:i("div",{className:"winners",children:i("div",{className:"matchups",children:i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="7"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]})})})]},c)})},a))})})})})]})})})})})},B0e=({dataEquipos:t,dataFixture:e,canalesTvPlayoff:n})=>{var A;const[r,s]=C.useState(!0),[o,a]=C.useState([]),[l,c]=C.useState([]),[d,u]=C.useState([]),[f,g]=C.useState([]),E=e||[];C.useEffect(()=>{c(t),u(n),a(S(e)),s(!1)},[t,e]);const S=k=>{const R={};k.forEach(N=>{const y=N.faseCopas,v=N.llavePlayOff;R[y]||(R[y]={}),R[y][v]||(R[y][v]=[]),R[y][v].push(N)});const O={};return Object.keys(R).sort().forEach(N=>{O[N]={};const y=["Ida","Vuelta","Tercer partido"];Object.keys(R[N]).sort().forEach(v=>{R[N][v].sort((b,P)=>y.indexOf(b.partidoPlayOff)-y.indexOf(P.partidoPlayOff)),O[N][v]=R[N][v]})}),O},w=S(E),_=(k,R)=>{h("/videos",{state:{url:k,data:R}})},h=Rt(),m=["Final","3 puesto","Semi final","Cuartos de final","Octavos de final","16avos","32avos","5 puesto","7 puesto","5 a 8 puesto","9 puesto","11 puesto","2° Fase","1° Fase"];return(A=E[0])==null||A.torneo,p(ae,{className:"anchoPlayoff",children:[Object.entries(w).sort((k,R)=>{const O=k[0],N=R[0],y=m.indexOf(O),v=m.indexOf(N);return y-v}).map(([k,R])=>i(ee,{children:p(ae,{className:" mt-1",children:[p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"15px"},children:[" ",k.toUpperCase()]}),i($,{children:Object.entries(R).map(([O,N])=>i(ee,{children:i($,{md:12,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{children:Array.isArray(N)&&N.map(y=>{var U,L,K,Y,te;const v=y.equipolocal,b=y.equipovisitante,P=y.transmision,F=Array.isArray(l)?(U=l.find(J=>J.nombre===v))==null?void 0:U.escudos:void 0,I=Array.isArray(l)?(L=l.find(J=>J.nombre===b))==null?void 0:L.escudos:void 0,T=(K=d.find(J=>J.idTv===P))==null?void 0:K.logo,q=y.hora?se(y.hora,"HH:mm:ss").format("HH:mm"):"A conf",W=f===y.id&&y.estado==="Jugandose"?"#dc3545":"white",G=f===y.id&&y.estado==="Jugandose"?"white":"black",H=se(y.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("DD/MM"),j=se(y.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("dddd").toUpperCase();return p(Fe.Fragment,{children:[y.fecha!==null?i("tr",{children:p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[j," ",H]})}):i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"FECHA Y HORA A CONFIRMAR"}),i("tr",{children:i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:y.partidoPlayOff})}),p("tr",{children:[y.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder",style:{fontSize:9,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):y.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",y.motivossuspension,")"]})]}):y.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:y.estado}):y.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Parc ",T&&i("img",{src:T,alt:P,style:{width:"20px",height:"20px"}})]}):y.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:[y.tiempodelpartido," ",T&&i("img",{src:T,alt:P,style:{width:"20px",height:"20px"}})]}):y.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[y.hora===""?i(ee,{children:"A conf"}):q," ",T&&i("img",{src:T,alt:P,style:{width:"20px",height:"20px"}}),i("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"}})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[F&&i("img",{src:F,alt:v,style:{width:"15px",height:"15px"}})," ",i("span",{style:{height:"auto"},children:v!==""?v:"A conf"})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:W,color:G,width:"auto"},children:[y.estado!=="Pendiente"?y.goleslocal:null,y.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+y.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:W,color:G},children:[y.estado!=="Pendiente"?y.golesvisitante:null,y.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+y.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[F&&i("img",{src:I,alt:b,style:{width:"15px",height:"15px"}})," ",p("span",{style:{height:"auto"},children:[" ",b!==""?b:"A conf"]})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[y.linkgoles===null||y.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{_(y.linkgoles,{id:y.id,estado:y.estado,equipolocal:y.equipolocal,equipovisitante:y.equipovisitante,goleslocal:y.goleslocal,penaleslocal:y.penaleslocal,penalesvisitante:y.penalesvisitante,golesvisitante:y.golesvisitante,escudoLocal:F,escudoVisitante:I,tiempodelpartido:y.tiempodelpartido,hora:q,goleadoresLocal:y.goleadoresLocal,goleadoresVisitante:y.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})}),y.linkvivo===null||y.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{_(y.linkvivo,{id:y.id,estado:y.estado,equipolocal:y.equipolocal,equipovisitante:y.equipovisitante,goleslocal:y.goleslocal,penaleslocal:y.penaleslocal,penalesvisitante:y.penalesvisitante,golesvisitante:y.golesvisitante,escudoLocal:F,escudoVisitante:I,tiempodelpartido:y.tiempodelpartido,hora:q,goleadoresLocal:y.goleadoresLocal,goleadoresVisitante:y.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Ns,{style:{fontSize:"12px"}})})]})})]},y.id),(y.goleadoresLocal||y.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(Y=y.goleadoresLocal)==null?void 0:Y.split(",").map((J,Q)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[Q>0&&"-",J.trim().slice(0,-1)]},Q))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(te=y.goleadoresVisitante)==null?void 0:te.split(",").map((J,Q)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[Q>0&&"-",J.trim().slice(0,-1)]},Q))})})]})]},y.id)})})]})})}))},k)]})})),i(V,{})]})};function Mv({dataFixture:t,dataEquipos:e}){const[n,r]=C.useState([]),s=t.reduce((d,u)=>{const f=u.grupoCopas,g=u.jornada;return d[f]||(d[f]={}),d[f][g]||(d[f][g]=[]),d[f][g].push(u),d},{}),o=Object.keys(s).sort();C.useEffect(()=>{const d=e.map(u=>({escudo:u.escudos,equipo:u.nombre}));r(d)},[e]);const a=(d,u)=>{l("/videos",{state:{url:d,data:u}})},l=Rt();function c(d,u){const f=d.hora?se(d.hora,"HH:mm:ss"):se(),g=u.hora?se(u.hora,"HH:mm:ss"):se();return f.diff(g)}return i(ee,{children:i(ae,{children:o.map(d=>{const u=Object.keys(s[d]),f=[];for(let g=0;g<u.length;g+=2)f.push(u.slice(g,g+2));return f.map((g,E)=>i(V,{children:g.map(S=>{const w=s[d][S].find(h=>h.libre),_=s[d][S].sort(c);return i($,{md:6,xs:6,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[p("thead",{style:{color:"transparent",borderColor:"transparent"},children:[p("tr",{children:[i("th",{style:{width:"17%"}}),i("th",{style:{width:"8%"}}),i("th",{style:{width:"8%"}}),i("th",{style:{width:"17%"}}),i("th",{style:{width:"10%"}})]}),i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"11px"},children:[" Fecha ",S]})})]}),p("tbody",{children:[_.map(h=>{const m=n.find(y=>y.equipo===h.equipolocal),A=n.find(y=>y.equipo===h.equipovisitante);let k="A confirmar";h.fecha&&(k=se(h.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("ddd DD/MM").toUpperCase().replace(".",""));const R=h.estado==="Jugandose"?"red":"white",O=h.estado==="Jugandose"?"white":"black";let N="";return h.hora&&(N=se(h.hora,"HH:mm:ss").format("HH:mm")),p(Fe.Fragment,{children:[i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder ",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:[" ",k," - ",N]})}),p("tr",{className:"align-middle",children:[p("td",{className:"bg-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"12px"},children:[m&&i("img",{src:m.escudo,alt:m.equipo,width:"12",height:"12"})," ",h.equipolocal.substring(0,3).toUpperCase()]}),i("td",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:R,color:O},children:h.estado==="Finalizado"||h.estado==="Jugandose"?h.goleslocal:""}),i("td",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:R,color:O},children:h.estado==="Finalizado"||h.estado==="Jugandose"?h.golesvisitante:""}),p("td",{className:"bg-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"12px"},children:[h.equipovisitante.substring(0,3).toUpperCase()," ",A&&i("img",{src:A.escudo,alt:A.equipo,width:"12",height:"12"})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:h.linkgoles===null?null:i("a",{style:{cursor:"pointer"},onClick:()=>{a(h.linkgoles,{id:h.id,estado:h.estado,equipolocal:h.equipolocal,equipovisitante:h.equipovisitante,goleslocal:h.goleslocal,penaleslocal:h.penaleslocal,penalesvisitante:h.penalesvisitante,golesvisitante:h.golesvisitante,escudoLocal:m,escudoVisitante:A,tiempodelpartido:h.tiempodelpartido,hora:N,goleadoresLocal:h.goleadoresLocal,goleadoresVisitante:h.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})})})]})]},h.id)}),w&&i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[" Libre: ",w.libre]})})]})]})},S)})},E))})})})}const U0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},u=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},u=>{l()}).subscribe();return()=>{c.unsubscribe(),d.unsubscribe()}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","COPAASIA").eq("añoTorneo",2024).eq("grupoCopas","A");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(Mv,{dataFixture:t,dataEquipos:n})})},Y0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},A=>{E()}).subscribe();return()=>{h.unsubscribe(),m.unsubscribe()}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","COPAASIA").eq("añoTorneo",2024).eq("grupoCopas","B");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","COPAAFRICA");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(Mv,{dataFixture:t,dataEquipos:n})})},H0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},u=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},u=>{l()}).subscribe();return()=>{c.unsubscribe(),d.unsubscribe()}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","COPAASIA").eq("añoTorneo",2024).eq("grupoCopas","C");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(Mv,{dataFixture:t,dataEquipos:n})})},G0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},A=>{E()}).subscribe();return()=>{h.unsubscribe(),m.unsubscribe()}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","COPAASIA").eq("añoTorneo",2024).eq("grupoCopas","D");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","COPAAFRICA");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(Mv,{dataFixture:t,dataEquipos:n})})},W0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_(),h();const m=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{_()}).subscribe();return()=>{m.unsubscribe()}},[]);const g=async()=>{try{const{data:m,error:A}=await z.from("Goleadores").select("*").eq("torneo","COPAASIA").eq("añoGoleadores",2024);A?console.error("Error",A):e(m)}catch(m){console.error("Error",m.message)}},E=async()=>{try{const{data:m,error:A}=await z.from("Equipos").select("*").eq("genero","Masculino");A?console.error("Error",A):r(m)}catch(m){console.error("Error",m.message)}},S=async()=>{try{const{data:m,error:A}=await z.from("Asistencias").select("*").eq("torneo","COPAASIA").eq("añoAsistencia",2024);A?console.error("Error",A):o(m)}catch(m){console.error("Error",m.message)}},w=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").eq("torneo","FFCOPAASIA").eq("añoTorneo",2023);A?console.error("Error",A):l(m)}catch(m){console.error("Error",m.message)}},_=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").eq("torneo","FFCOPAASIA").eq("añoTorneo",2024);A?console.error("Error",A):d(m)}catch(m){console.error("Error",m.message)}},h=async()=>{try{const{data:m,error:A}=await z.from("CanalesTv").select("*");A?console.error("Error",A):f(m)}catch(m){console.error("Error",m.message)}};return p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL -COPA ASIA - FIXTURES - PARTIDOS"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de LA COPA ASIA DE Futsal , fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo mb-5",children:[i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i(Ft,{style:{marginRight:3}}),"COPA ASIA",i(Ft,{style:{marginLeft:3}})]})}),i(V,{children:i($,{md:12,children:i(et,{})})}),i(V,{children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"FASE FINAL"})})}),i(V,{children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"13px"},children:"* Los cuatro equipos que avancen a la semifinal asegurarán su lugar en la Copa del Mundo de Futsal 2024. En caso de que Uzbekistán, como país anfitrión del Mundial, sea uno de los clasificados, se llevará a cabo un playoff entre las selecciones eliminadas en los cuartos de final para determinar el quinto cupo."})})}),i(V,{children:i($,{className:"text-center d-flex justify-content-center mb-2 mt-2",style:{overflowY:"auto"},children:i($0e,{dataFixture:c,dataEquipos:n})})}),i(V,{}),i(V,{children:i($,{md:12,children:i(B0e,{dataFixture:c,dataEquipos:n,canalesTvPlayoff:u})})}),i(V,{children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"FASE DE GRUPOS"})})}),p(V,{children:[p($,{md:6,children:[i(L0e,{}),i(U0e,{})]}),p($,{md:6,children:[i(hr,{}),i(z0e,{}),i(Y0e,{})]})]}),p(V,{children:[p($,{md:6,children:[i(q0e,{}),i(H0e,{})]}),p($,{md:6,children:[i(hr,{}),i(j0e,{}),i(G0e,{})]})]}),i(V,{children:i($,{md:6,className:"mb-5",children:i(Vt,{goleadores:t,dataEquipos:n})})})]})]})},V0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState(!0),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),{dataEquipos:u}=nr();C.useEffect(()=>{f(),g(),E(),S();const w=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},h=>{S()}).subscribe(),_=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},h=>{getDataEquipos()}).subscribe();return()=>{w.unsubscribe(),_.unsubscribe()}},[]);const f=async()=>{try{const{data:w,error:_}=await z.from("listado_2024").select("*").eq("torneo","ARGENLIGABZ1");_?console.error("Error",_):(e(w),r(!1))}catch(w){console.error("Error",w.message)}},g=async()=>{try{const{data:w,error:_}=await z.from("CanalesTv").select("*");_?console.error("Error",_):(o(w),r(!1))}catch(w){console.error("Error",w.message)}},E=async()=>{try{const{data:w,error:_}=await z.from("Goleadores").select("*").eq("torneo","ARGENLIGABZ1").eq("añoGoleadores",2024);_?console.error("Error",_):l(w)}catch(w){console.error("Error",w.message)}},S=async()=>{try{const{data:w,error:_}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFARGENLIGABZ1").eq("añoTorneo",2024);_?console.error("Error",_):(d(w),r(!1))}catch(w){console.error("Error",w.message)}};return n?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL ARGENLIGA B - PRIMERA - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal ARGENLIGA B Primera ZONA 1: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"FUTSAL ARGENLIGA B Z1",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{className:"bannerParaPc",children:i(cs,{})})}),i(V,{children:i($,{className:"",children:i(et,{})})}),i(V,{children:i($,{md:12,children:i(Fo,{dataFixture:c,dataEquipos:u,canalesTvPlayoff:s})})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:u})}),p($,{md:6,children:[i(ls,{}),i(Tn,{dataFixture:t,dataEquipos:u,canalesTv:s}),i(Vt,{goleadores:a,dataEquipos:u})]})]})]})]})},K0e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState(!0),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),{dataEquipos:u}=nr();C.useEffect(()=>{f(),g(),E(),S();const w=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},h=>{S()}).subscribe(),_=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},h=>{getDataEquipos()}).subscribe();return()=>{w.unsubscribe(),_.unsubscribe()}},[]);const f=async()=>{try{const{data:w,error:_}=await z.from("listado_2024").select("*").eq("torneo","ARGENLIGABZ2");_?console.error("Error",_):(e(w),r(!1))}catch(w){console.error("Error",w.message)}},g=async()=>{try{const{data:w,error:_}=await z.from("CanalesTv").select("*");_?console.error("Error",_):(o(w),r(!1))}catch(w){console.error("Error",w.message)}},E=async()=>{try{const{data:w,error:_}=await z.from("Goleadores").select("*").eq("torneo","ARGENLIGABZ2").eq("añoGoleadores",2024);_?console.error("Error",_):l(w)}catch(w){console.error("Error",w.message)}},S=async()=>{try{const{data:w,error:_}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFARGENLIGABZ2").eq("añoTorneo",2024);_?console.error("Error",_):(d(w),r(!1))}catch(w){console.error("Error",w.message)}};return n?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL ARGENLIGA B - PRIMERA - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal ARGENLIGA B Primera ZONA 1: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"FUTSAL ARGENLIGA B Z2",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{className:"bannerParaPc",children:i(cs,{})})}),i(V,{children:i($,{className:"",children:i(et,{})})}),i(V,{children:i($,{md:12,children:i(Fo,{dataFixture:c,dataEquipos:u,canalesTvPlayoff:s})})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:u})}),p($,{md:6,children:[i(ls,{}),i(Tn,{dataFixture:t,dataEquipos:u,canalesTv:s}),i(Vt,{goleadores:a,dataEquipos:u})]})]})]})]})},Z0e=["Afa","Argenliga","Laamba"],J0e=["A","B","C","D1","D2",'ARGENLIGA "A" Z1','ARGENLIGA "A" Z2','ARGENLIGA "B" Z1','ARGENLIGA "B" Z2',"ELITE LAAMBA"],X0e=["1ra"],Q0e=["Delegado","Coordinador","Entrenador","Jugador","Familiar","Otro"],e_e=()=>{const[t,e]=C.useState(""),[n,r]=C.useState(""),[s,o]=C.useState(""),[a,l]=C.useState(""),[c,d]=C.useState(""),[u,f]=C.useState(""),[g,E]=C.useState([]),[S,w]=C.useState(""),[_,h]=C.useState({}),m=R=>{if(R.preventDefault(),!k())return;const O=`*Liga:* ${t} *Division:* ${n} *Categoria:* ${a} *Equipo: * ${u} *Cantidad de goles:* ${S} *Nombre Jugador:* ${c} *Soy:* ${s}`,y=`https://wa.me/5491154782712?text=${encodeURIComponent(O)}`;window.open(y),e(""),r(""),l(""),f(""),w(""),d(""),o("")};C.useEffect(()=>(document.body.classList.add("inferiores-page"),()=>{document.body.classList.remove("inferiores-page")}),[]);const A=async()=>{try{const{data:R,error:O}=await z.from("Equipos").select("*").neq("organizador","Fifa").order("nombre",{ascending:!0});O?console.error("Error",O):E(R)}catch(R){console.error("Error",R.message)}};C.useEffect(()=>{A()},[]);const k=()=>{const R={};return n||(R.division=!0),t||(R.liga=!0),a||(R.categoria=!0),u||(R.equipoLocal=!0),S||(R.golesLocal=!0),s||(R.tipoColaborador=!0),h(R),Object.keys(R).length===0};return i(ee,{children:p(ae,{className:"tamañoTorneo",style:{marginTop:"150px",fontFamily:"Montserrat",fontWeight:"bold"},children:[i(V,{children:i($,{className:"text-center mb-4",children:i("h4",{className:"fw-bolder",style:{whiteSpace:"nowrap"},children:"Formulario de Goleadores"})})}),i(V,{children:i($,{className:"text-center mb-4",children:i("h6",{className:"fw-bolder",children:"¡Hola! ¡Bienvenido al formulario de Segund⚽Palo Goleadores!"})})}),i(V,{children:i($,{className:"text-center mb-4",children:i("h6",{className:"",children:"Nos llena de alegría que estés interesado en colaborar para mantener actualizada la tabla de goleadores.¡Gracias por tu colaboración!"})})}),p(Ae,{onSubmit:m,children:[i(V,{children:i($,{children:p(Ae.Group,{controlId:"tipoColaborador",children:[i(Ae.Label,{children:"Soy"}),p(Ae.Select,{value:s,onChange:R=>{o(R.target.value),h(O=>({...O,tipoColaborador:!1}))},children:[i("option",{value:"",children:"Selecciona una opción"}),Q0e.map((R,O)=>i("option",{value:R,children:R},O))]}),_.tipoColaborador&&i("div",{style:{color:"red",fontSize:"10px"},children:"Campo obligatorio"})]})})}),p(V,{className:"mt-3",children:[i($,{children:p(Ae.Group,{controlId:"liga",children:[i(Ae.Label,{children:"Liga"}),p(Ae.Select,{value:t,onChange:R=>{e(R.target.value),h(O=>({...O,liga:!1}))},children:[i("option",{value:"",children:"Selecciona una liga"}),Z0e.map((R,O)=>i("option",{value:R,children:R},O))]}),_.liga&&i("div",{style:{color:"red",fontSize:"10px"},children:"Campo obligatorio"})]})}),i($,{children:p(Ae.Group,{controlId:"division",children:[i(Ae.Label,{children:"Division"}),p(Ae.Select,{value:n,onChange:R=>{r(R.target.value),h(O=>({...O,division:!1}))},children:[i("option",{value:"",children:"Selecciona una división"}),J0e.map((R,O)=>i("option",{value:R,children:R},O))]}),_.division&&i("div",{style:{color:"red",fontSize:"10px"},children:"Campo obligatorio"})]})})]}),i(V,{className:"mt-3",children:i($,{children:p(Ae.Group,{controlId:"categoria",children:[i(Ae.Label,{children:"Categoria"}),p(Ae.Select,{value:a,onChange:R=>{l(R.target.value),h(O=>({...O,categoria:!1}))},children:[i("option",{value:"",children:"Selecciona una categoría"}),X0e.map((R,O)=>i("option",{value:R,children:R},O))]}),_.categoria&&i("div",{style:{color:"red",fontSize:"10px"},children:"Campo obligatorio"})]})})}),i(V,{className:"mt-3",children:i($,{children:p(Ae.Group,{controlId:"aclaracion",children:[i(Ae.Label,{children:"Nombre y Apellido del Jugador"}),i(Ae.Control,{as:"input",type:"text",value:c,onChange:R=>{d(R.target.value),h(O=>({...O,aclaracion:!1}))},placeholder:"Escriba alguna aclaración si lo desea:"})]})})}),p(V,{className:"mt-3",children:[i($,{md:8,children:p(Ae.Group,{controlId:"equipoLocal",children:[i(Ae.Label,{children:"Equipo"}),p(Ae.Select,{value:u,onChange:R=>{f(R.target.value),h(O=>({...O,equipoLocal:!1}))},children:[i("option",{value:"",children:"Selecciona un equipo local"}),g.map((R,O)=>i("option",{value:R.nombre,children:R.nombre},O))]}),_.equipoLocal&&i("div",{style:{color:"red",fontSize:"10px"},children:"Campo obligatorio"})]})}),i($,{md:4,children:p(Ae.Group,{controlId:"golesLocal",children:[i(Ae.Label,{className:"mt-2",children:"TOTAL DE GOLES(en lo que va del torneo)"}),i(Ae.Control,{type:"number",min:"0",value:S,onChange:R=>{w(R.target.value),h(O=>({...O,golesLocal:!1}))},placeholder:"Ingrese la cantidad de goles"}),_.golesLocal&&i("div",{style:{color:"red",fontSize:"10px"},children:"Campo obligatorio"})]})})]}),p(V,{className:"mt-4 mb-5",children:[i($,{className:"text-center",children:i(Cr,{to:"/",children:i(Qe,{variant:"dark",className:"fw-bolder",style:{fontSize:"10px"},children:"Volver a la SegundoPalo"})})}),i($,{className:"text-center",children:p(Qe,{variant:"success",type:"submit",className:"fw-bolder",children:["Enviar ",i(uL,{})]})})]})]})]})})},t_e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(""),[a,l]=C.useState(""),[c,d]=C.useState(!0),u=async()=>{if(d(!0),s&&a){let{data:w,error:_}=await z.from("Fixture2023").select("*").eq("torneo",a).eq("añoTorneo",2023).order("jornada",{ascending:!0});if(_)console.log("Error",_);else{const h=w.filter(m=>m.equipolocal===s||m.equipovisitante===s);e(g(h))}}setTimeout(()=>d(!1),2e3)},f=async()=>{d(!0);let{data:w,error:_}=await z.from("Equipos").select("*");_?console.log("Error",_):r(w),setTimeout(()=>d(!1),2e3)},g=w=>w.reduce((h,m)=>{const A=h.find(k=>k.jornada===m.jornada);return A?A.partidos.push(m):h.push({jornada:m.jornada,partidos:[m]}),h},[]);C.useEffect(()=>{u(),f()},[s,a]);const E=w=>{switch(o(w),w){case"San Lorenzo":l("PRIMERAA");break;case"Glorias de Tigre":l("PRIMERAB");break;case"Camioneros":l("PRIMERAB");break;case"Metalúrgico":l("PRIMERAC");break;case"Primera Junta":l("PRIMERAD2");break;case"Dep Moron":l("PRIMERAD2");break;case"Libertadores":l("PRIMERAD1");break;default:l("");break}};return p(ae,{className:"anchoInicio mb-5 ",children:[i("h1",{className:"text-center text-white fw-bolder",children:"Fixture 2023"}),i(V,{children:i($,{className:"text-center",children:i(Qe,{onClick:()=>{o(""),l("")},className:"text-white fw-bolder",style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Ocultar Datos Fixture"})})}),p(Ae,{children:[p(Ae.Group,{controlId:"teamSelect",children:[i(Ae.Label,{className:"text-center text-white fw-bolder",children:"Equipo"}),p(Ae.Control,{as:"select",value:s,onChange:w=>E(w.target.value),children:[i("option",{value:"",children:"Seleccione un equipo"}),i("option",{children:"San Lorenzo"}),i("option",{children:"Glorias de Tigre"}),i("option",{children:"Camioneros"}),i("option",{children:"Metalúrgico"}),i("option",{children:"Primera Junta"}),i("option",{children:"Libertadores"}),i("option",{children:"Dep Moron"})]})]}),p(Ae.Group,{controlId:"tournamentSelect",className:"mb-5 mt-2",children:[i(Ae.Label,{className:"text-center text-white fw-bolder",children:"Torneo"}),p(Ae.Control,{as:"select",value:a,onChange:w=>l(w.target.value),children:[i("option",{value:"",children:"Seleccione un torneo"}),i("option",{disabled:s!=="San Lorenzo",children:"PRIMERAA"}),i("option",{disabled:s!=="Glorias de Tigre",children:"PRIMERAB"}),i("option",{disabled:s!=="Camioneros",children:"PRIMERAB"}),i("option",{disabled:s!=="Metalúrgico",children:"PRIMERAC"}),i("option",{disabled:s!=="Primera Junta",children:"PRIMERAD2"}),i("option",{disabled:s!=="Dep Moron",children:"PRIMERAD2"}),i("option",{disabled:s!=="Libertadores",children:"PRIMERAD1"}),i("option",{disabled:s!=="Primera Junta",children:"CAMPEOND"})]})]})]}),c?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):s&&a&&i(V,{children:i($,{className:"",children:t.map((w,_)=>p(Ie,{bordered:!0,className:" ",style:{borderColor:"transparent",backgroundColor:"#001c31",margin:0,padding:0},size:"sm",responsive:"sm",children:[i("thead",{children:p("tr",{children:[i("th",{style:{width:"40%",border:"none"}}),i("th",{style:{width:"10%",border:"none"}}),i("th",{style:{width:"40%",border:"none"}})]})}),p("tbody",{children:[i("tr",{children:p("td",{className:"text-center text-white tituloPartidos fw-bolder",style:{fontSize:18,backgroundColor:"transparent",fontFamily:"Roboto Condensed, sans-serif",borderTop:"none"},colSpan:"4",children:["FECHA ",w.jornada]})}),w.partidos.map((h,m)=>{const A=n.find(O=>O.nombre===h.equipolocal),k=n.find(O=>O.nombre===h.equipovisitante),R=se(new Date(h.fecha)).format("LL");return p(ee,{children:[i("tr",{children:i("td",{className:"text-center text-white tituloPartidos fw-bolder",style:{fontSize:15,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},colSpan:"4",children:R})}),p("tr",{children:[p("td",{className:"bg-white fw-bolder",style:{fontSize:17,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[A&&i("img",{src:A.escudos,alt:h.equipolocal,style:{width:"20px",height:"20px"}})," ",h.equipolocal]}),p("td",{className:"text-center bg-white text-dark fw-bolder",style:{fontSize:17,fontFamily:"Roboto Condensed, sans-serif"},children:[h.goleslocal," - ",h.golesvisitante]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:17,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[k&&i("img",{src:k.escudos,alt:h.equipovisitante,style:{width:"20px",height:"20px"}})," ",h.equipovisitante]})]},m)]})})]})]},_))})})]})},aj=({goleadores:t,dataEquipos:e})=>{const[n,r]=C.useState([]);return C.useEffect(()=>{const s=t||[],o=e||[],a=u=>{if(!u)return null;const f=o.find(g=>g.nombre.trim().toLowerCase()===u.trim().toLowerCase());return f?f.escudos:null},c=(u=>{const f={};return u.forEach(g=>{const{goleadoresLocal:E,goleadoresVisitante:S,equipolocal:w,equipovisitante:_}=g,h=(m,A)=>{m&&m.split(",").forEach(k=>{const O=k.trim().slice(0,-1);O&&!O.startsWith("(e.c)")&&(f[O]||(f[O]={goles:0,equipo:A,escudo:a(A)}),f[O].goles+=1)})};h(E,w),h(S,_)}),f})(s),d=Object.entries(c).map(([u,f])=>({jugador:u,...f})).sort((u,f)=>f.goles-u.goles).slice(0,12);r(d)},[t,e]),i(ae,{className:"mb-5 mt-3",children:i(V,{children:p($,{children:[i("h6",{className:"text-white text-center",style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:"20"},children:"Goleadores"}),p(Ie,{bordered:!0,size:"sm",children:[i("thead",{children:p("tr",{className:"text-white text-center",style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:12,backgroundColor:"#001c31"},children:[i("th",{children:"Jugador"}),i("th",{children:"Goles"})]})}),i("tbody",{children:n.map(({jugador:s,goles:o,equipo:a,escudo:l})=>p("tr",{children:[p("td",{className:"text-dark text-center fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12,display:"flex",alignItems:"center",justifyContent:"start"},children:[l&&i("img",{src:l,alt:`${a} escudo`,style:{width:"20px",height:"20px",marginRight:"8px"}}),s,"(",a,")"]}),i("td",{className:"text-dark text-center fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:o})]},s))})]})]})})})},n_e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState(!0),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]),{dataEquipos:g}=nr();Ss(),C.useEffect(()=>{E(),h(),S(),w(),_();const m=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},k=>{E()}).subscribe(),A=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},k=>{}).subscribe();return()=>{m.unsubscribe(),A.unsubscribe()}},[]);const E=async()=>{try{const{data:m,error:A}=await z.from("listado_2024").select("*").eq("torneo","LNFS");A?console.error("Error",A):(e(m),r(!1))}catch(m){console.error("Error",m.message)}},S=async()=>{try{const{data:m,error:A}=await z.from("CanalesTv").select("*");A?console.error("Error",A):(o(m),r(!1))}catch(m){console.error("Error",m.message)}},w=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").or("torneo.eq.LNFS,torneo.eq.PLAYOFFLNFS").eq("añoTorneo",2024);A?console.error("Error",A):l(m)}catch(m){console.error("Error",m.message)}},_=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFLNFS").eq("añoTorneo",2024);A?console.error("Error",A):(d(m),r(!1))}catch(m){console.error("Error",m.message)}},h=async()=>{try{const{data:m,error:A}=await z.from("clasificados_playoff").select("*");A?console.error("Error",A):(f(m),r(!1))}catch(m){console.error("Unexpected error",m)}finally{r(!1)}};return u.filter(m=>m.status==="Clasificado"),u.filter(m=>m.status==="Descenso"),n?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL LNFS ESPAÑA - PRIMERA - FIXTURES"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de Futsal España Primera División: tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/es.png",srcSet:"https://flagcdn.com/w40/es.png 2x",width:"20",alt:"Argentina",style:{marginRight:10}}),"FUTSAL ESPAÑA PRIMERA DIVISIÓN",i("img",{src:"https://flagcdn.com/w20/es.png",srcSet:"https://flagcdn.com/w40/es.png 2x",width:"20",alt:"Argentina",style:{marginLeft:10}})]})})}),i(V,{children:i($,{className:"bannerParaPc",children:i(cs,{})})}),i(V,{children:i($,{className:"",children:i(et,{})})}),i(V,{children:i($,{md:12})}),p(V,{children:[i($,{md:6,children:i(tt,{dataFixture:t,dataEquipos:g})}),p($,{md:6,children:[i(ls,{}),i(Tn,{dataFixture:t,dataEquipos:g,canalesTv:s}),i(aj,{goleadores:a,dataEquipos:g})]})]})]})]})},r_e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(""),[a,l]=C.useState(""),[c,d]=C.useState(!0),u=async()=>{if(d(!0),s&&a){let{data:w,error:_}=await z.from("Fixture2023").select("*").eq("torneo",a).eq("añoTorneo",2023).order("jornada",{ascending:!1});if(_)console.log("Error",_);else{const h=w.filter(m=>m.equipolocal===s||m.equipovisitante===s);e(g(h))}}setTimeout(()=>d(!1),2e3)},f=async()=>{d(!0);let{data:w,error:_}=await z.from("Equipos").select("*");_?console.log("Error",_):r(w),setTimeout(()=>d(!1),2e3)},g=w=>{const _=w.reduce((m,A)=>{const k=m.find(R=>R.faseCopas===A.faseCopas);if(k){const R=k.llavePlayOff.find(O=>O.llavePlayOff===A.llavePlayOff);R?R.partidos.push(A):k.llavePlayOff.push({llavePlayOff:A.llavePlayOff,partidos:[A]})}else m.push({faseCopas:A.faseCopas,llavePlayOff:[{llavePlayOff:A.llavePlayOff,partidos:[A]}]});return m},[]),h=["Final","Semi final","Cuartos de final"];return _.sort((m,A)=>h.indexOf(m.faseCopas)-h.indexOf(A.faseCopas)),_.forEach(m=>{m.llavePlayOff.sort((A,k)=>A.partidoPlayOff-k.partidoPlayOff)}),_};C.useEffect(()=>{u(),f()},[s,a]);const E=w=>{switch(o(w),w){case"San Lorenzo":l("PLAYOFFA");break;case"Camioneros":l("PLAYOFFB");break;case"Alvear":l("PLAYOFFC");break;case"Dep Moron":l("PLAYOFFD");break;case"Libertadores":l("PRIMERAD1");break;default:l("");break}};return p(ae,{className:"anchoInicio mb-5 bg-dark",children:[i("h1",{className:"text-center text-white fw-bolder",children:"Playoffs 2023"}),i(V,{children:i($,{className:"text-center",children:i(Qe,{onClick:()=>{o(""),l("")},className:"text-white fw-bolder",style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Ocultar Datos Playoff"})})}),p(Ae,{children:[p(Ae.Group,{controlId:"teamSelect",children:[i(Ae.Label,{className:"text-center text-white fw-bolder",children:"Equipo"}),p(Ae.Control,{as:"select",value:s,onChange:w=>E(w.target.value),children:[i("option",{value:"",children:"Seleccione un equipo"}),i("option",{children:"San Lorenzo"}),i("option",{children:"Camioneros"}),i("option",{children:"Alvear"}),i("option",{children:"Dep Moron"})]})]}),p(Ae.Group,{controlId:"tournamentSelect",className:"mb-5 mt-2",children:[i(Ae.Label,{className:"text-center text-white fw-bolder",children:"Torneo"}),p(Ae.Control,{disabled:!0,as:"select",value:a,onChange:w=>l(w.target.value),children:[i("option",{value:"",children:"Seleccione un torneo"}),i("option",{disabled:s!=="San Lorenzo",children:"PLAYOFFA"}),i("option",{disabled:s!=="Camioneros",children:"PLAYOFFB"}),i("option",{disabled:s!=="Alvear",children:"PLAYOFFC"}),i("option",{disabled:s!=="Dep Moron",children:"PLAYOFFD"})]})]})]}),c?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):s&&a&&i(V,{children:i($,{children:t.map((w,_)=>(se(new Date(w.fecha)).format("LL"),w.llavePlayOff.map((h,m)=>p(Ie,{bordered:!0,className:"border bg-white mt-3 border-dark ",size:"sm",responsive:"sm",children:[i("thead",{children:p("tr",{children:[i("th",{style:{width:"40%"}}),i("th",{style:{width:"10%"}}),i("th",{style:{width:"10%"}}),i("th",{style:{width:"40%"}})]})}),p("tbody",{children:[i("tr",{children:i("td",{className:"text-center text-white tituloPartidos fw-bolder",style:{fontSize:17,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},colSpan:"4",children:w.faseCopas})}),h.partidos.map((A,k)=>{var y,v;const R=n.find(b=>b.nombre===A.equipolocal),O=n.find(b=>b.nombre===A.equipovisitante),N=se(new Date(A.fecha)).format("LL");return p(ee,{children:[i("tr",{children:i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:15,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:N})}),i("tr",{children:i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:15,backgroundColor:"gray",fontFamily:"Roboto Condensed, sans-serif"},children:A.partidoPlayOff})}),p("tr",{children:[p("td",{className:"bg-white fw-bolder",style:{fontSize:17,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[R&&i("img",{src:R.escudos,alt:A.equipolocal,style:{width:"20px",height:"20px"}})," ",A.equipolocal]}),p("td",{className:"text-center fw-bolder",style:{fontSize:17,fontFamily:"Roboto Condensed, sans-serif"},children:[A.goleslocal,A.penaleslocal&&p("span",{style:{fontSize:"15px"},children:[" (",A.penaleslocal,") "]})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:17,fontFamily:"Roboto Condensed, sans-serif"},children:[A.penalesvisitante&&p("span",{style:{fontSize:"15px"},children:[" (",A.penalesvisitante,")"]}),A.golesvisitante]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:17,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[O&&i("img",{src:O.escudos,alt:A.equipovisitante,style:{width:"20px",height:"20px"}})," ",A.equipovisitante]})]},k),(A.goleadoresLocal||A.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"2",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(y=A.goleadoresLocal)==null?void 0:y.split(",").map((b,P)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:15},children:[P>0&&"-",b.trim().slice(0,-1)]},P))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(v=A.goleadoresVisitante)==null?void 0:v.split(",").map((b,P)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:15},children:[P>0&&"-",b.trim().slice(0,-1)]},P))})})]})]})})]})]},m))))})})]})},s_e=({dataFixture:t,dataEquipos:e})=>{var G,H,j,U;const n=e||[],r=t||[],s={},o={},a={},l={},c={},d={},u={},f={},g=new Set;r.forEach(L=>{g.add(L.equipolocal),g.add(L.equipovisitante)}),n.forEach(L=>{const K=L.nombre;g.has(K)&&(s[K]=0,o[K]=0,d[K]=0,u[K]=0,f[K]=0,a[K]=0,l[K]=0,c[K]=0)}),r.forEach(L=>{if(L.estado==="Finalizado"||L.estado==="Jugandose"){const K=L.equipolocal,Y=L.equipovisitante,te=L.goleslocal,J=L.golesvisitante;o[K]+=1,o[Y]+=1,d[K]+=te,d[Y]+=J,u[K]+=J,u[Y]+=te,f[K]+=te-J,f[Y]+=J-te,te>J?(s[K]+=3,a[K]+=1,c[Y]+=1):te<J?(s[Y]+=3,a[Y]+=1,c[K]+=1):(s[K]+=1,s[Y]+=1,l[K]+=1,l[Y]+=1)}});const E=Object.entries(s).sort((L,K)=>{if(K[1]!==L[1])return K[1]-L[1];const Y=f[L[0]]||0,te=f[K[0]]||0;if(Y!==te)return te-Y;const J=d[L[0]]||0;return(d[K[0]]||0)-J}),S=(G=r[0])==null?void 0:G.torneo,w=(H=r[0])==null?void 0:H.grupoCopas,_=(j=r[0])==null?void 0:j.organizador,h=(U=r[0])==null?void 0:U.añoTorneo,m=_!=="Afa"?"":i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina"}),A=S==="PRIMERAA"||S==="PRIMERAAFEM"?'PRIMERA "A" '+h:S==="PRIMERAB"||S==="PRIMERABFEM"?'PRIMERA "B" '+h:S==="PRIMERAC"||S==="PRIMERACFEM"?'PRIMERA "C" '+h:S==="PRIMERAD1"?'PRIMERA "D1" '+h:S==="PRIMERAD2"||S==="PRIMERAD2"?'PRIMERA "D2" '+h:S==="ARGENLIGAZ1"?'PRIMERA "Z1" '+h:S==="ARGENLIGAZ2"?'PRIMERA "Z2" '+h:S==="COPAAMERICA"&&w==="A"?"GRUPO A":S==="COPAAMERICA"&&w==="B"?"GRUPO B":S==="COPADEPLATA"?"COPA DE PLATA":S==="AufPRIMERA"?'PRIMERA "A" '+h:S==="LNFA"||S==="COPAAFRICA"&&w==="A"?"GRUPO A":S==="LNFA"||S==="COPAAFRICA"&&w==="B"?"GRUPO B":S==="LIBERTADORES"&&w==="A"?"GRUPO A":S==="LIBERTADORES"&&w==="B"?"GRUPO B":S==="LIBERTADORES"&&w==="C"||S==="LNFA"||S==="LIBERTADORES"&&w==="C"?"GRUPO C":S==="LNFA"&&w==="D"?"GRUPO D":S==="INTEGRACION"?"PRIMERA "+h:S==="LAAMBA"||S==="LAAMBAFEM"?"LAAMBA ELITE "+h:S==="CONCACAF"&&w==="A"?"GRUPO A":S==="CONCACAF"&&w==="B"?"GRUPO B":S==="CONCACAF"&&w==="C"?"GRUPO C":S==="ARGENLIGABZ1"?'PRIMERA "Z1" '+h:S==="ARGENLIGABZ2"?'PRIMERA "Z2" '+h:"";[{torneo:"PRIMERAA",mensaje:"PLAYOFF "},{torneo:"PRIMERAAFEM",mensaje:"PLAYOFF "},{torneo:"PRIMERABFEM",mensaje:"ASCENSO DIRECTO "},{torneo:"PRIMERAB",mensaje:"ASCENSO DIRECTO "},{torneo:"PRIMERAC",mensaje:"ASCENSO DIRECTO "},{torneo:"PRIMERAD1",mensaje:"ASCENSO DIRECTO "},{torneo:"PRIMERAD2",mensaje:"ASCENSO DIRECTO "},{torneo:"INTEGRACION",mensaje:"CLASIFICAN A LA PRIMERA D DE AFA "},{torneo:"COPAAMERICA",mensaje:"CLASIFICADOS A LAS SEMIFINALES Y AL MUNDIAL"},{torneo:"ARGENLIGAZ1",mensaje:"1° y 2° clasificará a la PRIMERA D de AFA. "},{torneo:"ARGENLIGAZ2",mensaje:"1° y 2° clasificará a la PRIMERA D de AFA. "},{torneo:"COPADEPLATA",mensaje:"Campeón ( Clasifica a la SuperCopa 2024 ) "},{torneo:"AufPRIMERA",mensaje:"PLAYOFF "},{torneo:"CONCACAF",mensaje:"CLASIFICADO A CUARTOS DE FINAL "},{torneo:"LNFA",mensaje:"CLASIFICADO A CUARTOS DE FINAL "},{torneo:"LAAMBA",mensaje:"CAMPEÓN"},{torneo:"LAAMBAFEM",mensaje:"CAMPEÓN"},{torneo:"LIBERTADORES",mensaje:"CLASIFICADO A CUARTOS DE FINAL "},{torneo:"COPAAFRICA",mensaje:"CLASIFICADO A SEMIFINALES "},{torneo:"COPAASIA",mensaje:"CLASIFICADO A CUARTOS DE FINAL "},{torneo:"ARGENLIGABZ1",mensaje:"ASCENSO DIRECTO"},{torneo:"ARGENLIGABZ2",mensaje:"ASCENSO DIRECTO"},{torneo:"PRIMERACFEM",mensaje:"ASCENSO DIRECTO"}].filter(L=>L.torneo===S).map((L,K)=>i("tr",{className:"border border-dark",children:i("td",{className:"text-center",colSpan:10,style:{backgroundColor:"#B8F7A6",fontSize:9},children:L.mensaje})},K)),[{torneo:"PRIMERAA",mensaje:"PLAYOFF - En la 1er Ronda- Los primeros 8 COPA DE ORO",color:"#B8F7A6"},{torneo:"PRIMERAB",mensaje:"PLAYOFF - Del 2° al 9° Playoffs por el segundo ascenso",color:"#BAC1C0"},{torneo:"PRIMERABFEM",mensaje:"PLAYOFF - Del 2° al 9° Playoffs por el 2° y 3° ascenso",color:"#BAC1C0"},{torneo:"PRIMERACFEM",mensaje:"PLAYOFF - Del 2° al 9° Playoffs por el segundo y tercer ascenso",color:"#BAC1C0"},{torneo:"PRIMERAC",mensaje:"PLAYOFF - Del 2° al 9° Playoffs por el segundo ascenso",color:"#BAC1C0"},{torneo:"PRIMERAD1",mensaje:"PLAYOFF - Por el segundo ascenso ",color:"#BAC1C0"},{torneo:"PRIMERAD2",mensaje:"PLAYOFF - Por el segundo ascenso ",color:"#BAC1C0"},{torneo:"ARGENLIGAZ1",mensaje:"PLAYOFF - Del 3° al 6° Playoffs por la tercera clasificación. ",color:"#BAC1C0"},{torneo:"ARGENLIGAZ2",mensaje:"PLAYOFF - Del 3° al 6° Playoffs por la tercera clasificación. ",color:"#BAC1C0"},{torneo:"AufPRIMERA",mensaje:"NO HAY DESCENSO",color:"#227DE1"},{torneo:"CONCACAF",mensaje:"CUARTOS DE FINAL - Los dos mejores 3° de los 3 grupos ",color:"#BAC1C0"},{torneo:"LIBERTADORES",mensaje:"CUARTOS DE FINAL - Los dos mejores 3° de los 3 grupos ",color:"#BAC1C0"},{torneo:"ARGENLIGABZ1",mensaje:"PLAYOFF - Del 2° al 5° Playoffs por el segundo ascenso ",color:"#BAC1C0"},{torneo:"ARGENLIGABZ2",mensaje:"PLAYOFF - Del 2° al 5° Playoffs por el segundo ascenso ",color:"#BAC1C0"}].filter(L=>L.torneo===S).map((L,K)=>i("tr",{className:"border border-dark",children:i("td",{className:"text-center",colSpan:10,style:{backgroundColor:L.color,fontSize:9},children:L.mensaje})},K)),[{torneo:"PRIMERAA",mensaje:"PLAYOFF - 9° al 16° COPA DE PLATA",color:"white"},{torneo:"PRIMERAB",mensaje:"DESCENSO DIRECTO",color:"#DE9090"},{torneo:"PRIMERABFEM",mensaje:"DESCENSO DIRECTO",color:"#DE9090"},{torneo:"PRIMERAAFEM",mensaje:"DESCENSO DIRECTO",color:"#DE9090"},{torneo:"PRIMERAC",mensaje:"DESCENSO DIRECTO",color:"#DE9090"},{torneo:"PRIMERAD1",mensaje:"DESAFILIACIÓN",color:"#DE9090"},{torneo:"PRIMERAD2",mensaje:"DESAFILIACIÓN",color:"#DE9090"},{torneo:"ARGENLIGAZ1",mensaje:"DESCENSO DIRECTO",color:"#DE9090"},{torneo:"ARGENLIGAZ2",mensaje:"DESCENSO DIRECTO",color:"#DE9090"},{torneo:"PRIMERACFEM",mensaje:"DESAFILIACIÓN",color:"#DE9090"}].filter(L=>L.torneo===S).map((L,K)=>i("tr",{className:"border border-dark",children:i("td",{className:"text-center",colSpan:10,style:{backgroundColor:L.color,fontSize:9},children:L.mensaje})},K)),[{torneo:"PRIMERAA",mensaje:"DESCENSO DIRECTO - En caso de igualdad en pts, se define partido desempate",color:"#DE9090"},{torneo:"ARGENLIGABZ1",mensaje:`Afiliados AFA (Los Andes-Colegiales- Brown (A) - Ctro Español) El mejor posicionado clasificará a la D de AFA. `,color:"#9370DB",colorFuente:"white"},{torneo:"ARGENLIGABZ2",mensaje:`Afiliados AFA (Ituzaingo-Temperley-Alte Brown - J Unida (SM) ) - El mejor posicionado clasificará a la D de AFA. `,color:"#9370DB",colorFuente:"white"}].filter(L=>L.torneo===S).map((L,K)=>i("tr",{className:"border border-dark",children:i("td",{className:"text-center",colSpan:10,style:{backgroundColor:L.color,fontSize:10,color:L.colorFuente,whiteSpace:"normal"},children:L.mensaje.split(` `).map((Y,te)=>p("span",{children:[Y,i("br",{})]},te))})},K));const y=L=>{const K=n.find(Y=>Y.nombre===L);return K?K.escudos:""},v=L=>L.goleslocal>L.golesvisitante?L.equipolocal:L.golesvisitante>L.goleslocal?L.equipovisitante:"empate",b=L=>!!r.find(Y=>(Y.equipolocal===L||Y.equipovisitante===L)&&Y.estado==="Jugandose"&&v(Y)===L),P=L=>!!r.find(Y=>(Y.equipolocal===L||Y.equipovisitante===L)&&Y.estado==="Jugandose"&&v(Y)!==L&&v(Y)!=="empate"),F=L=>!!r.find(Y=>(Y.equipolocal===L||Y.equipovisitante===L)&&Y.estado==="Jugandose"&&v(Y)==="empate"),[I,T]=C.useState(!1),[q,W]=C.useState(!1);return C.useEffect(()=>{const L=()=>{window.scrollY>50&&!q&&T(!0)};return window.addEventListener("scroll",L),()=>{window.removeEventListener("scroll",L)}},[q]),i(ee,{children:i(ae,{children:i(V,{children:p($,{xs:12,md:12,children:[S!=="COPAAMERICA"?i("h2",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"TABLA DE PUNTOS"}):"",p(Ie,{responsive:!0,size:"sm",className:"",children:[p("thead",{children:[i("tr",{children:p("td",{className:"text-center text-white border border-dark fw-bolder",colSpan:10,style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[m," ",A," ",m]})}),p("tr",{style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:[i("th",{className:"text-center text-white",colSpan:1,children:"#"}),i("th",{className:"text-center anchoPosiciones text-white",children:"Equipo"}),i("th",{className:"text-center anchoPosiciones text-white",children:"Pts."}),i("th",{className:"text-center anchoPosiciones text-white",children:"PJ"}),i("th",{className:"text-center anchoPosiciones text-white",children:"PG"}),i("th",{className:"text-center anchoPosiciones text-white",children:"PE"}),i("th",{className:"text-center anchoPosiciones text-white",children:"PP"}),i("th",{className:"text-center anchoPosiciones text-white",children:"GF"}),i("th",{className:"text-center anchoPosiciones text-white",children:"GC"}),i("th",{className:"text-center anchoPosiciones text-white",children:"Dif"})]})]}),i("tbody",{style:{backgroundColor:"#ffff",color:"black",fontWeight:"700",fontFamily:"Roboto Condensed, sans-serif"},children:E.map((L,K)=>p("tr",{children:[i("th",{className:"border border-dark text-dark text-center col-1",scope:"row",style:{fontSize:12},children:p("span",{style:{fontSize:12},children:[" ",K+1," "]})}),i("th",{className:"border border-dark",children:p("td",{className:"d-flex align-items-center ",style:{border:"none",outline:"none"},children:[i("img",{className:"me-1",src:y(L[0]),alt:`${L[0]} escudo`,style:{width:"15px",height:"15px"}}),p("span",{className:"fontPosiciones fuenteEquiposTabla",children:[" ",L[0],b(L[0])?i(pd,{style:{color:"green"}}):P(L[0])?i(pd,{style:{color:"red"}}):F(L[0])?i(pd,{style:{color:"gray"}}):null]})]})}),i("td",{className:" border border-dark text-center",style:{fontSize:14,fontWeight:700},children:L[1]}),p("td",{className:" border border-dark text-center",style:{fontSize:12,color:"#330"},children:[o[L[0]]," "]}),i("td",{className:" border border-dark text-center",style:{fontSize:12,color:"#330"},children:a[L[0]]||0}),i("td",{className:" border border-dark text-center",style:{fontSize:12,color:"#330"},children:l[L[0]]||0}),i("td",{className:" border border-dark text-center",style:{fontSize:12,color:"#330"},children:c[L[0]]||0}),i("td",{className:" border border-dark text-center",style:{fontSize:12,color:"#330"},children:d[L[0]]||0}),i("td",{className:" border border-dark text-center",style:{fontSize:12,color:"#330"},children:u[L[0]]||0}),i("td",{className:" border border-dark text-center",style:{fontSize:12,color:"#330"},children:f[L[0]]||0})]},L[0]))})]})]})})})})},o_e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(""),[a,l]=C.useState(!0);C.useEffect(()=>{d()},[]),C.useEffect(()=>{s&&c()},[s]);async function c(){l(!0);let f=z.from("Fixture2023").select("*").eq("añoTorneo",2023).order("jornada",{ascending:!0});if(s.includes("PRIMERAC")){let S=s.split(" ")[2];S="Ronda"+S.charAt(S.length-1),f=f.eq("torneo","PRIMERAC").eq("ronda",S),S==="Ronda2"&&(f=f.or("zona.eq.Campeonato"))}else f=f.eq("torneo",s);let{data:g,error:E}=await f;E?console.log("Error",E):e(g),l(!1)}async function d(){l(!0);let{data:f,error:g}=await z.from("Equipos").select("*");g?console.log("Error",g):r(f),l(!1)}return p(ae,{className:"anchoInicio mb-5 bg-secondary",children:[i(V,{children:i($,{children:i("h1",{className:"text-center text-white fw-bolder",children:"Tabla de Posiciones 2023"})})}),i(V,{children:i($,{className:"text-center",children:i(Qe,{onClick:()=>{o(""),e([])},className:"text-white fw-bolder",style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Ocultar Datos Tablas Posiciones"})})}),i(V,{children:i($,{children:p(Ae.Group,{controlId:"tournamentSelect",children:[i(Ae.Label,{className:"text-center text-white fw-bolder",children:"Torneo"}),p(Ae.Control,{as:"select",value:s,onChange:f=>o(f.target.value),children:[i("option",{value:"",children:"Seleccione un torneo"}),i("option",{value:"PRIMERAA",children:"PRIMERAA"}),i("option",{value:"PRIMERAB",children:"PRIMERAB"}),i("option",{value:"PRIMERAC RONDA 1",children:"PRIMERAC RONDA 1"}),i("option",{value:"PRIMERAC RONDA 2",children:"PRIMERAC Zona Campeonato"}),i("option",{value:"PRIMERAD1",children:"PRIMERAD1"}),i("option",{value:"PRIMERAD2",children:"PRIMERAD2"})]})]})})}),i(V,{children:i($,{className:"text-center mt-3",children:a?i(Ee,{color:"#FF0000"}):i(s_e,{dataFixture:t,dataEquipos:n})})})]})},i_e=()=>i(ee,{children:p(ae,{className:"anchoInicio mb-5",children:[i(t_e,{}),i(r_e,{}),i(o_e,{})]})}),a_e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},f=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},f=>{l()}).subscribe(),u=()=>{document.hidden||(a(),l())};return document.addEventListener("visibilitychange",u,!1),()=>{c.unsubscribe(),d.unsubscribe(),document.removeEventListener("visibilitychange",u,!1)}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","MUNDIAL").eq("añoTorneo",2024).eq("grupoCopas","A");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},l_e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},k=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},k=>{E()}).subscribe(),A=()=>{document.hidden||(g(),E())};return document.addEventListener("visibilitychange",A,!1),()=>{h.unsubscribe(),m.unsubscribe(),document.removeEventListener("visibilitychange",A,!1)}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","MUNDIAL").eq("añoTorneo",2024).eq("grupoCopas","B");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","LIBERTADORES");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})};function wu({dataFixture:t,dataEquipos:e}){const[n,r]=C.useState([]),s=t.reduce((d,u)=>{const f=u.grupoCopas,g=u.jornada;return d[f]||(d[f]={}),d[f][g]||(d[f][g]=[]),d[f][g].push(u),d},{}),o=Object.keys(s).sort();C.useEffect(()=>{const d=e.map(u=>({escudo:u.escudos,equipo:u.nombre}));r(d)},[e]);const a=(d,u)=>{l("/videos",{state:{url:d,data:u}})},l=Rt();function c(d,u){const f=d.hora?se(d.hora,"HH:mm:ss"):se(),g=u.hora?se(u.hora,"HH:mm:ss"):se();return f.diff(g)}return i(ee,{children:i(ae,{children:o.map(d=>{const u=Object.keys(s[d]),f=[];for(let g=0;g<u.length;g+=2)f.push(u.slice(g,g+2));return f.map((g,E)=>i(V,{children:g.map(S=>{const w=s[d][S].find(h=>h.libre),_=s[d][S].sort(c);return i($,{md:6,xs:6,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[p("thead",{style:{color:"transparent",borderColor:"transparent"},children:[p("tr",{children:[i("th",{style:{width:"17%"}}),i("th",{style:{width:"8%"}}),i("th",{style:{width:"8%"}}),i("th",{style:{width:"17%"}}),i("th",{style:{width:"10%"}})]}),i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"11px"},children:[" Fecha ",S]})})]}),p("tbody",{children:[_.map(h=>{const m=n.find(y=>y.equipo===h.equipolocal),A=n.find(y=>y.equipo===h.equipovisitante);let k="A confirmar";h.fecha&&(k=se(h.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("ddd DD/MM").toUpperCase().replace(".",""));const R=h.estado==="Jugandose"?"red":"white",O=h.estado==="Jugandose"?"white":"black";let N="";return h.hora&&(N=se(h.hora,"HH:mm:ss").format("HH:mm")),p(Fe.Fragment,{children:[i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder ",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:[" ",k," - ",N]})}),p("tr",{className:"align-middle",children:[p("td",{className:"bg-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"12px"},children:[m&&i("img",{src:m.escudo,alt:m.equipo,width:"12",height:"12"})," ",h.equipolocal.substring(0,3).toUpperCase()]}),i("td",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:R,color:O},children:h.estado==="Finalizado"||h.estado==="Jugandose"?h.goleslocal:""}),i("td",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:R,color:O},children:h.estado==="Finalizado"||h.estado==="Jugandose"?h.golesvisitante:""}),p("td",{className:"bg-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"12px"},children:[h.equipovisitante.substring(0,3).toUpperCase()," ",A&&i("img",{src:A.escudo,alt:A.equipo,width:"12",height:"12"})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:h.linkgoles===null||h.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{a(h.linkgoles,{id:h.id,estado:h.estado,equipolocal:h.equipolocal,equipovisitante:h.equipovisitante,goleslocal:h.goleslocal,penaleslocal:h.penaleslocal,penalesvisitante:h.penalesvisitante,golesvisitante:h.golesvisitante,escudoLocal:m?m.escudo:null,escudoVisitante:A?A.escudo:null,tiempodelpartido:h.tiempodelpartido,hora:N,goleadoresLocal:h.goleadoresLocal,goleadoresVisitante:h.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})})})]})]},h.id)}),w&&i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[" Libre: ",w.libre]})})]})]})},S)})},E))})})})}const c_e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},f=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},f=>{l()}).subscribe(),u=()=>{document.hidden||(a(),l())};return document.addEventListener("visibilitychange",u,!1),()=>{c.unsubscribe(),d.unsubscribe(),document.removeEventListener("visibilitychange",u,!1)}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","MUNDIAL").eq("añoTorneo",2024).eq("grupoCopas","A");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(wu,{dataFixture:t,dataEquipos:n})})},d_e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},k=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},k=>{E()}).subscribe(),A=()=>{document.hidden||(g(),E())};return document.addEventListener("visibilitychange",A,!1),()=>{h.unsubscribe(),m.unsubscribe(),document.removeEventListener("visibilitychange",A,!1)}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","MUNDIAL").eq("añoTorneo",2024).eq("grupoCopas","B");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","MUNDIAL");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(wu,{dataFixture:t,dataEquipos:n})})},u_e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},f=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},f=>{l()}).subscribe(),u=()=>{document.hidden||(a(),l())};return document.addEventListener("visibilitychange",u,!1),()=>{c.unsubscribe(),d.unsubscribe(),document.removeEventListener("visibilitychange",u,!1)}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","MUNDIAL").eq("añoTorneo",2024).eq("grupoCopas","C");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(wu,{dataFixture:t,dataEquipos:n})})},f_e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},f=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},f=>{l()}).subscribe(),u=()=>{document.hidden||(a(),l())};return document.addEventListener("visibilitychange",u,!1),()=>{c.unsubscribe(),d.unsubscribe(),document.removeEventListener("visibilitychange",u,!1)}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","MUNDIAL").eq("añoTorneo",2024).eq("grupoCopas","D");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(wu,{dataFixture:t,dataEquipos:n})})},h_e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},f=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},f=>{l()}).subscribe(),u=()=>{document.hidden||(a(),l())};return document.addEventListener("visibilitychange",u,!1),()=>{c.unsubscribe(),d.unsubscribe(),document.removeEventListener("visibilitychange",u,!1)}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","MUNDIAL").eq("añoTorneo",2024).eq("grupoCopas","E");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(wu,{dataFixture:t,dataEquipos:n})})},p_e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},f=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},f=>{l()}).subscribe(),u=()=>{document.hidden||(a(),l())};return document.addEventListener("visibilitychange",u,!1),()=>{c.unsubscribe(),d.unsubscribe(),document.removeEventListener("visibilitychange",u,!1)}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","MUNDIAL").eq("añoTorneo",2024).eq("grupoCopas","F");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(wu,{dataFixture:t,dataEquipos:n})})},m_e=({dataEquipos:t,dataFixture:e})=>{const s=(o=>{const a=o.reduce((l,c)=>{const d=c.llavePlayOff;return l[d]||(l[d]=[]),l[d].push(c),l},{});return Object.entries(a).map(([l,c])=>({llave:l,partidos:c}))})(e||[]);return i(ee,{children:i(ae,{className:"bracket-container ",children:i(ae,{className:"bracket",children:i(V,{children:p($,{children:[p("div",{className:"round octavosfinals",children:[p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="1"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"space-between",width:"100%",alignItems:"center"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif",display:"flex",alignItems:"center"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° A"]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.goleslocal,l.penaleslocal&&` (${l.penaleslocal})`]})]})}),i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"space-between",width:"100%",alignItems:"center"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif",display:"flex",alignItems:"center"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"Mejor 3° C/D/E"]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.golesvisitante,l.penalesvisitante&&` (${l.penalesvisitante})`]})]})}),i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="2"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"space-between",width:"100%",alignItems:"center"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"2° B"]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.goleslocal,l.penaleslocal&&` (${l.penaleslocal})`]})]})}),i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"space-between",width:"100%",alignItems:"center"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° F"]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.golesvisitante,l.penalesvisitante&&` (${l.penalesvisitante})`]})]})}),i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]}),p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="3"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° C"]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.goleslocal,l.penaleslocal&&` (${l.penaleslocal})`]})]})}),i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"Mejor 3° A/B/F"]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.golesvisitante,l.penalesvisitante&&` (${l.penalesvisitante})`]})]})}),i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="4"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° E"]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.goleslocal,l.penaleslocal&&` (${l.penaleslocal})`]})]})}),i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° D"]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.golesvisitante,l.penalesvisitante&&` (${l.penalesvisitante})`]})]})}),i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]}),p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="5"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° F"]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.goleslocal,l.penaleslocal&&` (${l.penaleslocal})`]})]})}),i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° E"]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.golesvisitante,l.penalesvisitante&&` (${l.penalesvisitante})`]})]})}),i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="6"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° B"]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.goleslocal,l.penaleslocal&&` (${l.penaleslocal})`]})]})}),i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"Mejor 3° A/C/D"]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.golesvisitante,l.penalesvisitante&&` (${l.penalesvisitante})`]})]})}),i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]}),p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="7"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1° D"]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.goleslocal,l.penaleslocal&&` (${l.penaleslocal})`]})]})}),i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"Mejor 3° B/E/F"]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.golesvisitante,l.penalesvisitante&&` (${l.penalesvisitante})`]})]})}),i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="8"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"2° A"]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.goleslocal,l.penaleslocal&&` (${l.penaleslocal})`]})]})}),i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2° C"]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.golesvisitante,l.penalesvisitante&&` (${l.penalesvisitante})`]})]})}),i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})]}),p("div",{className:"round cuartosfinal",children:[p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="9"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.goleslocal,l.penaleslocal&&` (${l.penaleslocal})`]})]})}),i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.golesvisitante,l.penalesvisitante&&` (${l.penalesvisitante})`]})]})}),i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="10"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.goleslocal,l.penaleslocal&&` (${l.penaleslocal})`]})]})}),i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.golesvisitante,l.penalesvisitante&&` (${l.penalesvisitante})`]})]})}),i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]}),p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="11"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.goleslocal,l.penaleslocal&&` (${l.penaleslocal})`]})]})}),i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.golesvisitante,l.penalesvisitante&&` (${l.penalesvisitante})`]})]})}),i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="12"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.goleslocal,l.penaleslocal&&` (${l.penaleslocal})`]})]})}),i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.golesvisitante,l.penalesvisitante&&` (${l.penalesvisitante})`]})]})}),i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})]}),i("div",{className:"round semifinales",children:p("div",{className:"winners ",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="13"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.goleslocal,l.penaleslocal&&` (${l.penaleslocal})`]})]})}),i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.golesvisitante,l.penalesvisitante&&` (${l.penalesvisitante})`]})]})}),i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="14"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.goleslocal,l.penaleslocal&&` (${l.penaleslocal})`]})]})}),i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.golesvisitante,l.penalesvisitante&&` (${l.penalesvisitante})`]})]})}),i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})}),i("div",{className:"round finales",children:i("div",{className:"winners",children:i("div",{className:"matchups",children:i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="15"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.goleslocal,l.penaleslocal&&` (${l.penaleslocal})`]})]})}),i("div",{className:"participant winner fw-bolder",children:p("div",{style:{display:"flex",justifyContent:"start"},children:[p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante]}),l.estado==="Finalizado"&&p("span",{className:"text-end",style:{fontFamily:"Roboto Condensed, sans-serif",marginLeft:"auto"},children:[l.golesvisitante,l.penalesvisitante&&` (${l.penalesvisitante})`]})]})}),i("div",{className:"text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:"10px",backgroundColor:"#a53a3a"},children:se(`${l.fecha} ${l.hora}`,"YYYY-MM-DD HH:mm").format("ddd D/M H:mm").toUpperCase()})]},c)})},a))})})})})]})})})})})},g_e=({dataEquipos:t,dataFixture:e,canalesTvPlayoff:n})=>{var k;const[r,s]=C.useState(!0),[o,a]=C.useState([]),[l,c]=C.useState([]),[d,u]=C.useState([]),[f,g]=C.useState([]),E=e||[];C.useEffect(()=>{c(t),u(n),a(S(e)),s(!1)},[t,e]);const S=R=>{const O={};R.forEach(y=>{const v=y.faseCopas,b=y.llavePlayOff;O[v]||(O[v]={}),O[v][b]||(O[v][b]=[]),O[v][b].push(y)});const N={};return Object.keys(O).sort().forEach(y=>{N[y]={};const v=["Ida","Vuelta","Tercer partido"];Object.keys(O[y]).sort().forEach(b=>{O[y][b].sort((P,F)=>v.indexOf(P.partidoPlayOff)-v.indexOf(F.partidoPlayOff)),N[y][b]=O[y][b]})}),N},w=S(E),_=Object.fromEntries(Object.entries(w).map(([R,O])=>{const N=Object.fromEntries(Object.entries(O).map(([y,v])=>{const b=v.filter(P=>P.equipolocal!=="A conf"||P.equipovisitante!=="A conf");return[y,b]}).filter(([y,v])=>v.length>0));return[R,N]}).filter(([R,O])=>Object.keys(O).length>0)),h=(R,O)=>{m("/videos",{state:{url:R,data:O}})},m=Rt(),A=["Final","3 puesto","Semi final","Cuartos de final","Octavos de final","16avos","32avos","5 puesto","7 puesto","5 a 8 puesto","9 puesto","11 puesto","2° Fase","1° Fase"];return(k=E[0])==null||k.torneo,p(ae,{className:"anchoPlayoff",children:[Object.entries(_).sort((R,O)=>{const N=R[0],y=O[0],v=A.indexOf(N),b=A.indexOf(y);return v-b}).map(([R,O])=>i(ee,{children:p(ae,{className:" mt-1",children:[p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"18px"},children:[" ",R.toUpperCase()]}),i($,{children:Object.entries(O).map(([N,y])=>i(ee,{children:i($,{md:12,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{children:Array.isArray(y)&&y.map(v=>{var L,K,Y,te,J;const b=v.equipolocal,P=v.equipovisitante,F=v.transmision,I=Array.isArray(l)?(L=l.find(Q=>Q.nombre===b))==null?void 0:L.escudos:void 0,T=Array.isArray(l)?(K=l.find(Q=>Q.nombre===P))==null?void 0:K.escudos:void 0,q=(Y=d.find(Q=>Q.idTv===F))==null?void 0:Y.logo,W=v.hora?se(v.hora,"HH:mm:ss").format("HH:mm"):"A conf",G=f===v.id&&v.estado==="Jugandose"?"#dc3545":"white",H=f===v.id&&v.estado==="Jugandose"?"white":"black",j=se(v.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("DD/MM"),U=se(v.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("dddd").toUpperCase();return p(Fe.Fragment,{children:[v.fecha!==null?i("tr",{children:p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[U," ",j]})}):i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"FECHA Y HORA A CONFIRMAR"}),i("tr",{children:i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:v.partidoPlayOff})}),p("tr",{children:[v.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder",style:{fontSize:9,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):v.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",v.motivossuspension,")"]})]}):v.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:v.estado}):v.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Parc ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}})]}):v.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:[v.tiempodelpartido," ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}})]}):v.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[v.hora===""?i(ee,{children:"A conf"}):W," ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}}),i("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"}})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[I&&i("img",{src:I,alt:b,style:{width:"15px",height:"15px"}})," ",i("span",{style:{height:"auto"},children:b!==""?b:"A conf"})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:G,color:H,width:"auto"},children:[v.estado!=="Pendiente"?v.goleslocal:null,v.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+v.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:G,color:H},children:[v.estado!=="Pendiente"?v.golesvisitante:null,v.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+v.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[T&&i("img",{src:T,alt:P,style:{width:"15px",height:"15px"}})," ",p("span",{style:{height:"auto"},children:[" ",P!==""?P:"A conf"]})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[v.linkgoles===null||v.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(v.linkgoles,{id:v.id,estado:v.estado,equipolocal:v.equipolocal,equipovisitante:v.equipovisitante,goleslocal:v.goleslocal,penaleslocal:v.penaleslocal,penalesvisitante:v.penalesvisitante,golesvisitante:v.golesvisitante,escudoLocal:I,escudoVisitante:T,tiempodelpartido:v.tiempodelpartido,hora:W,goleadoresLocal:v.goleadoresLocal,goleadoresVisitante:v.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})}),v.linkvivo===null||v.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(v.linkvivo,{id:v.id,estado:v.estado,equipolocal:v.equipolocal,equipovisitante:v.equipovisitante,goleslocal:v.goleslocal,penaleslocal:v.penaleslocal,penalesvisitante:v.penalesvisitante,golesvisitante:v.golesvisitante,escudoLocal:I,escudoVisitante:T,tiempodelpartido:v.tiempodelpartido,hora:W,goleadoresLocal:v.goleadoresLocal,goleadoresVisitante:v.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Ns,{style:{fontSize:"12px"}})})]})})]},v.id),(v.goleadoresLocal||v.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(te=v.goleadoresLocal)==null?void 0:te.split(",").map((Q,oe)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[oe>0&&"-",Q.trim().slice(0,-1)]},oe))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(J=v.goleadoresVisitante)==null?void 0:J.split(",").map((Q,oe)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[oe>0&&"-",Q.trim().slice(0,-1)]},oe))})})]})]},v.id)})})]})})}))},R)]})})),i(V,{})]})},y_e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},k=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},k=>{E()}).subscribe(),A=()=>{document.hidden||(g(),E())};return document.addEventListener("visibilitychange",A,!1),()=>{h.unsubscribe(),m.unsubscribe(),document.removeEventListener("visibilitychange",A,!1)}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","MUNDIAL").eq("añoTorneo",2024).eq("grupoCopas","C");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","LIBERTADORES");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},b_e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},f=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},f=>{l()}).subscribe(),u=()=>{document.hidden||(a(),l())};return document.addEventListener("visibilitychange",u,!1),()=>{c.unsubscribe(),d.unsubscribe(),document.removeEventListener("visibilitychange",u,!1)}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","MUNDIAL").eq("añoTorneo",2024).eq("grupoCopas","D");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},v_e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},f=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},f=>{l()}).subscribe(),u=()=>{document.hidden||(a(),l())};return document.addEventListener("visibilitychange",u,!1),()=>{c.unsubscribe(),d.unsubscribe(),document.removeEventListener("visibilitychange",u,!1)}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","MUNDIAL").eq("añoTorneo",2024).eq("grupoCopas","E");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},__e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},f=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},f=>{l()}).subscribe(),u=()=>{document.hidden||(a(),l())};return document.addEventListener("visibilitychange",u,!1),()=>{c.unsubscribe(),d.unsubscribe(),document.removeEventListener("visibilitychange",u,!1)}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","MUNDIAL").eq("añoTorneo",2024).eq("grupoCopas","F");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},w_e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),{dataEquipos:u}=nr();C.useEffect(()=>{f(),g(),S(),E(),w();const _=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},h=>{E()}).subscribe();return()=>{_.unsubscribe()}},[]);const f=async()=>{try{const{data:_,error:h}=await z.from("Goleadores").select("*").eq("torneo","MUNDIAL").eq("añoGoleadores",2024);h?console.error("Error",h):e(_)}catch(_){console.error("Error",_.message)}},g=async()=>{try{const{data:_,error:h}=await z.from("Asistencias").select("*").eq("torneo","MUNDIAL").eq("añoAsistencia",2024);h?console.error("Error",h):r(_)}catch(_){console.error("Error",_.message)}},E=async()=>{try{const{data:_,error:h}=await z.from("Fixture2023").select("*").eq("torneo","FFMUNDIAL").eq("añoTorneo",2024);h?console.error("Error",h):o(_)}catch(_){console.error("Error",_.message)}},S=async()=>{try{const{data:_,error:h}=await z.from("Fixture2023").select("*").or("torneo.eq.MUNDIAL,torneo.eq.FFMUNDIAL").eq("añoTorneo",2024);h?console.error("Error",h):d(_)}catch(_){console.error("Error",_.message)}},w=async()=>{try{const{data:_,error:h}=await z.from("CanalesTv").select("*");h?console.error("Error",h):l(_)}catch(_){console.error("Error",_.message)}};return p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL -MUNDIAL FUTSAL UZBEKISTAN 2024 - FIXTURES - PARTIDOS"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de LA COPA MUNDIAL FUTSAL UZBEKISTAN 2024 , fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo mb-5",children:[i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i(Ft,{style:{marginRight:3}}),"MUNDIAL UZBEKISTAN 2024",i(Ft,{style:{marginLeft:3}})]})}),p(V,{children:[p(V,{children:[i($,{md:1,xs:3,className:"mb-1",children:i(ve,{to:"/rankingfifa",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i(Qe,{className:"new-section-button btn text-white fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"#001c31",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",border:0},children:p("span",{children:["RANKING ",i("br",{})," SELECCIONES "]})})})}),i($,{md:1,xs:3,children:i(ve,{to:"/historialcampeones",style:{fontFamily:"Roboto Condensed, sans-serif",fontSize:5},children:i(Qe,{className:"new-section-button btn text-white fw-bolder btn-sm",style:{fontSize:10,backgroundColor:"#001c31",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",border:0},children:p("span",{children:["HISTORIAL ",i("br",{})," CAMPEONES"]})})})})]}),i($,{md:12,children:i(et,{})})]}),i(V,{children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"FASE FINAL"})})}),i(V,{children:i($,{className:"text-center d-flex justify-content-center mb-2 mt-2 custom-scrollbar",style:{overflowY:"auto"},children:i(m_e,{dataFixture:s,dataEquipos:u})})}),i(V,{children:i($,{md:12,children:i(g_e,{dataFixture:s,dataEquipos:u,canalesTvPlayoff:a})})}),i(V,{children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"FASE DE GRUPOS"})})}),p(V,{children:[p($,{md:6,children:[i(a_e,{}),i(c_e,{})]}),p($,{md:6,children:[i(hr,{}),i(l_e,{}),i(d_e,{})]}),p($,{md:6,children:[i(y_e,{}),i(u_e,{})]}),p($,{md:6,children:[i(hr,{}),i(b_e,{}),i(f_e,{})]}),p($,{md:6,children:[i(v_e,{}),i(h_e,{})]}),p($,{md:6,children:[i(hr,{}),i(__e,{}),i(p_e,{})]})]}),p(V,{children:[i($,{md:6,className:"",children:i(aj,{goleadores:c,dataEquipos:u})}),i($,{md:6,className:"",children:i(TE,{asitencia:n,dataEquipos:u})})]})]})]})};function x_e(t,e){if(t.match(/^[a-z]+:\/\//i))return t;if(t.match(/^\/\//))return window.location.protocol+t;if(t.match(/^[a-z]+:/i))return t;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),s=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(s),e&&(r.href=e),s.href=t,s.href}const C_e=(()=>{let t=0;const e=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(t+=1,`u${e()}${t}`)})();function xi(t){const e=[];for(let n=0,r=t.length;n<r;n++)e.push(t[n]);return e}function lb(t,e){const r=(t.ownerDocument.defaultView||window).getComputedStyle(t).getPropertyValue(e);return r?parseFloat(r.replace("px","")):0}function E_e(t){const e=lb(t,"border-left-width"),n=lb(t,"border-right-width");return t.clientWidth+e+n}function S_e(t){const e=lb(t,"border-top-width"),n=lb(t,"border-bottom-width");return t.clientHeight+e+n}function lj(t,e={}){const n=e.width||E_e(t),r=e.height||S_e(t);return{width:n,height:r}}function A_e(){let t,e;try{e=process}catch{}const n=e&&e.env?e.env.devicePixelRatio:null;return n&&(t=parseInt(n,10),Number.isNaN(t)&&(t=1)),t||window.devicePixelRatio||1}const Wr=16384;function N_e(t){(t.width>Wr||t.height>Wr)&&(t.width>Wr&&t.height>Wr?t.width>t.height?(t.height*=Wr/t.width,t.width=Wr):(t.width*=Wr/t.height,t.height=Wr):t.width>Wr?(t.height*=Wr/t.width,t.width=Wr):(t.width*=Wr/t.height,t.height=Wr))}function cb(t){return new Promise((e,n)=>{const r=new Image;r.decode=()=>e(r),r.onload=()=>e(r),r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=t})}async function R_e(t){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then(e=>`data:image/svg+xml;charset=utf-8,${e}`)}async function P_e(t,e,n){const r="http://www.w3.org/2000/svg",s=document.createElementNS(r,"svg"),o=document.createElementNS(r,"foreignObject");return s.setAttribute("width",`${e}`),s.setAttribute("height",`${n}`),s.setAttribute("viewBox",`0 0 ${e} ${n}`),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("externalResourcesRequired","true"),s.appendChild(o),o.appendChild(t),R_e(s)}const Ur=(t,e)=>{if(t instanceof e)return!0;const n=Object.getPrototypeOf(t);return n===null?!1:n.constructor.name===e.name||Ur(n,e)};function O_e(t){const e=t.getPropertyValue("content");return`${t.cssText} content: '${e.replace(/'|"/g,"")}';`}function F_e(t){return xi(t).map(e=>{const n=t.getPropertyValue(e),r=t.getPropertyPriority(e);return`${e}: ${n}${r?" !important":""};`}).join(" ")}function D_e(t,e,n){const r=`.${t}:${e}`,s=n.cssText?O_e(n):F_e(n);return document.createTextNode(`${r}{${s}}`)}function kD(t,e,n){const r=window.getComputedStyle(t,n),s=r.getPropertyValue("content");if(s===""||s==="none")return;const o=C_e();try{e.className=`${e.className} ${o}`}catch{return}const a=document.createElement("style");a.appendChild(D_e(o,n,r)),e.appendChild(a)}function k_e(t,e){kD(t,e,":before"),kD(t,e,":after")}const TD="application/font-woff",ID="image/jpeg",T_e={woff:TD,woff2:TD,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:ID,jpeg:ID,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function I_e(t){const e=/\.([^./]*?)$/g.exec(t);return e?e[1]:""}function MA(t){const e=I_e(t).toLowerCase();return T_e[e]||""}function M_e(t){return t.split(/,/)[1]}function Rx(t){return t.search(/^(data:)/)!==-1}function cj(t,e){return`data:${e};base64,${t}`}async function dj(t,e,n){const r=await fetch(t,e);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const s=await r.blob();return new Promise((o,a)=>{const l=new FileReader;l.onerror=a,l.onloadend=()=>{try{o(n({res:r,result:l.result}))}catch(c){a(c)}},l.readAsDataURL(s)})}const t1={};function L_e(t,e,n){let r=t.replace(/\?.*/,"");return n&&(r=t),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),e?`[${e}]${r}`:r}async function LA(t,e,n){const r=L_e(t,e,n.includeQueryParams);if(t1[r]!=null)return t1[r];n.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+new Date().getTime());let s;try{const o=await dj(t,n.fetchRequestInit,({res:a,result:l})=>(e||(e=a.headers.get("Content-Type")||""),M_e(l)));s=cj(o,e)}catch(o){s=n.imagePlaceholder||"";let a=`Failed to fetch resource: ${t}`;o&&(a=typeof o=="string"?o:o.message),a&&console.warn(a)}return t1[r]=s,s}async function z_e(t){const e=t.toDataURL();return e==="data:,"?t.cloneNode(!1):cb(e)}async function q_e(t,e){if(t.currentSrc){const o=document.createElement("canvas"),a=o.getContext("2d");o.width=t.clientWidth,o.height=t.clientHeight,a==null||a.drawImage(t,0,0,o.width,o.height);const l=o.toDataURL();return cb(l)}const n=t.poster,r=MA(n),s=await LA(n,r,e);return cb(s)}async function j_e(t){var e;try{if(!((e=t==null?void 0:t.contentDocument)===null||e===void 0)&&e.body)return await Lv(t.contentDocument.body,{},!0)}catch{}return t.cloneNode(!1)}async function $_e(t,e){return Ur(t,HTMLCanvasElement)?z_e(t):Ur(t,HTMLVideoElement)?q_e(t,e):Ur(t,HTMLIFrameElement)?j_e(t):t.cloneNode(!1)}const B_e=t=>t.tagName!=null&&t.tagName.toUpperCase()==="SLOT";async function U_e(t,e,n){var r,s;let o=[];return B_e(t)&&t.assignedNodes?o=xi(t.assignedNodes()):Ur(t,HTMLIFrameElement)&&(!((r=t.contentDocument)===null||r===void 0)&&r.body)?o=xi(t.contentDocument.body.childNodes):o=xi(((s=t.shadowRoot)!==null&&s!==void 0?s:t).childNodes),o.length===0||Ur(t,HTMLVideoElement)||await o.reduce((a,l)=>a.then(()=>Lv(l,n)).then(c=>{c&&e.appendChild(c)}),Promise.resolve()),e}function Y_e(t,e){const n=e.style;if(!n)return;const r=window.getComputedStyle(t);r.cssText?(n.cssText=r.cssText,n.transformOrigin=r.transformOrigin):xi(r).forEach(s=>{let o=r.getPropertyValue(s);s==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),Ur(t,HTMLIFrameElement)&&s==="display"&&o==="inline"&&(o="block"),s==="d"&&e.getAttribute("d")&&(o=`path(${e.getAttribute("d")})`),n.setProperty(s,o,r.getPropertyPriority(s))})}function H_e(t,e){Ur(t,HTMLTextAreaElement)&&(e.innerHTML=t.value),Ur(t,HTMLInputElement)&&e.setAttribute("value",t.value)}function G_e(t,e){if(Ur(t,HTMLSelectElement)){const n=e,r=Array.from(n.children).find(s=>t.value===s.getAttribute("value"));r&&r.setAttribute("selected","")}}function W_e(t,e){return Ur(e,Element)&&(Y_e(t,e),k_e(t,e),H_e(t,e),G_e(t,e)),e}async function V_e(t,e){const n=t.querySelectorAll?t.querySelectorAll("use"):[];if(n.length===0)return t;const r={};for(let o=0;o<n.length;o++){const l=n[o].getAttribute("xlink:href");if(l){const c=t.querySelector(l),d=document.querySelector(l);!c&&d&&!r[l]&&(r[l]=await Lv(d,e,!0))}}const s=Object.values(r);if(s.length){const o="http://www.w3.org/1999/xhtml",a=document.createElementNS(o,"svg");a.setAttribute("xmlns",o),a.style.position="absolute",a.style.width="0",a.style.height="0",a.style.overflow="hidden",a.style.display="none";const l=document.createElementNS(o,"defs");a.appendChild(l);for(let c=0;c<s.length;c++)l.appendChild(s[c]);t.appendChild(a)}return t}async function Lv(t,e,n){return!n&&e.filter&&!e.filter(t)?null:Promise.resolve(t).then(r=>$_e(r,e)).then(r=>U_e(t,r,e)).then(r=>W_e(t,r)).then(r=>V_e(r,e))}const uj=/url\((['"]?)([^'"]+?)\1\)/g,K_e=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Z_e=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function J_e(t){const e=t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`,"g")}function X_e(t){const e=[];return t.replace(uj,(n,r,s)=>(e.push(s),n)),e.filter(n=>!Rx(n))}async function Q_e(t,e,n,r,s){try{const o=n?x_e(e,n):e,a=MA(e);let l;if(s){const c=await s(o);l=cj(c,a)}else l=await LA(o,a,r);return t.replace(J_e(e),`$1${l}$3`)}catch{}return t}function e1e(t,{preferredFontFormat:e}){return e?t.replace(Z_e,n=>{for(;;){const[r,,s]=K_e.exec(n)||[];if(!s)return"";if(s===e)return`src: ${r};`}}):t}function fj(t){return t.search(uj)!==-1}async function hj(t,e,n){if(!fj(t))return t;const r=e1e(t,n);return X_e(r).reduce((o,a)=>o.then(l=>Q_e(l,a,e,n)),Promise.resolve(r))}async function rg(t,e,n){var r;const s=(r=e.style)===null||r===void 0?void 0:r.getPropertyValue(t);if(s){const o=await hj(s,null,n);return e.style.setProperty(t,o,e.style.getPropertyPriority(t)),!0}return!1}async function t1e(t,e){await rg("background",t,e)||await rg("background-image",t,e),await rg("mask",t,e)||await rg("mask-image",t,e)}async function n1e(t,e){const n=Ur(t,HTMLImageElement);if(!(n&&!Rx(t.src))&&!(Ur(t,SVGImageElement)&&!Rx(t.href.baseVal)))return;const r=n?t.src:t.href.baseVal,s=await LA(r,MA(r),e);await new Promise((o,a)=>{t.onload=o,t.onerror=a;const l=t;l.decode&&(l.decode=o),l.loading==="lazy"&&(l.loading="eager"),n?(t.srcset="",t.src=s):t.href.baseVal=s})}async function r1e(t,e){const r=xi(t.childNodes).map(s=>pj(s,e));await Promise.all(r).then(()=>t)}async function pj(t,e){Ur(t,Element)&&(await t1e(t,e),await n1e(t,e),await r1e(t,e))}function s1e(t,e){const{style:n}=t;e.backgroundColor&&(n.backgroundColor=e.backgroundColor),e.width&&(n.width=`${e.width}px`),e.height&&(n.height=`${e.height}px`);const r=e.style;return r!=null&&Object.keys(r).forEach(s=>{n[s]=r[s]}),t}const MD={};async function LD(t){let e=MD[t];if(e!=null)return e;const r=await(await fetch(t)).text();return e={url:t,cssText:r},MD[t]=e,e}async function zD(t,e){let n=t.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,o=(n.match(/url\([^)]+\)/g)||[]).map(async a=>{let l=a.replace(r,"$1");return l.startsWith("https://")||(l=new URL(l,t.url).href),dj(l,e.fetchRequestInit,({result:c})=>(n=n.replace(a,`url(${c})`),[a,c]))});return Promise.all(o).then(()=>n)}function qD(t){if(t==null)return[];const e=[],n=/(\/\*[\s\S]*?\*\/)/gi;let r=t.replace(n,"");const s=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const c=s.exec(r);if(c===null)break;e.push(c[0])}r=r.replace(s,"");const o=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",l=new RegExp(a,"gi");for(;;){let c=o.exec(r);if(c===null){if(c=l.exec(r),c===null)break;o.lastIndex=l.lastIndex}else l.lastIndex=o.lastIndex;e.push(c[0])}return e}async function o1e(t,e){const n=[],r=[];return t.forEach(s=>{if("cssRules"in s)try{xi(s.cssRules||[]).forEach((o,a)=>{if(o.type===CSSRule.IMPORT_RULE){let l=a+1;const c=o.href,d=LD(c).then(u=>zD(u,e)).then(u=>qD(u).forEach(f=>{try{s.insertRule(f,f.startsWith("@import")?l+=1:s.cssRules.length)}catch(g){console.error("Error inserting rule from remote css",{rule:f,error:g})}})).catch(u=>{console.error("Error loading remote css",u.toString())});r.push(d)}})}catch(o){const a=t.find(l=>l.href==null)||document.styleSheets[0];s.href!=null&&r.push(LD(s.href).then(l=>zD(l,e)).then(l=>qD(l).forEach(c=>{a.insertRule(c,s.cssRules.length)})).catch(l=>{console.error("Error loading remote stylesheet",l)})),console.error("Error inlining remote css file",o)}}),Promise.all(r).then(()=>(t.forEach(s=>{if("cssRules"in s)try{xi(s.cssRules||[]).forEach(o=>{n.push(o)})}catch(o){console.error(`Error while reading CSS rules from ${s.href}`,o)}}),n))}function i1e(t){return t.filter(e=>e.type===CSSRule.FONT_FACE_RULE).filter(e=>fj(e.style.getPropertyValue("src")))}async function a1e(t,e){if(t.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=xi(t.ownerDocument.styleSheets),r=await o1e(n,e);return i1e(r)}async function l1e(t,e){const n=await a1e(t,e);return(await Promise.all(n.map(s=>{const o=s.parentStyleSheet?s.parentStyleSheet.href:null;return hj(s.cssText,o,e)}))).join(` `)}async function c1e(t,e){const n=e.fontEmbedCSS!=null?e.fontEmbedCSS:e.skipFonts?null:await l1e(t,e);if(n){const r=document.createElement("style"),s=document.createTextNode(n);r.appendChild(s),t.firstChild?t.insertBefore(r,t.firstChild):t.appendChild(r)}}async function d1e(t,e={}){const{width:n,height:r}=lj(t,e),s=await Lv(t,e,!0);return await c1e(s,e),await pj(s,e),s1e(s,e),await P_e(s,n,r)}async function u1e(t,e={}){const{width:n,height:r}=lj(t,e),s=await d1e(t,e),o=await cb(s),a=document.createElement("canvas"),l=a.getContext("2d"),c=e.pixelRatio||A_e(),d=e.canvasWidth||n,u=e.canvasHeight||r;return a.width=d*c,a.height=u*c,e.skipAutoScale||N_e(a),a.style.width=`${d}`,a.style.height=`${u}`,e.backgroundColor&&(l.fillStyle=e.backgroundColor,l.fillRect(0,0,a.width,a.height)),l.drawImage(o,0,0,a.width,a.height),a}async function mj(t,e={}){return(await u1e(t,e)).toDataURL()}var gj={exports:{}};(function(t){(function(){function e(X,re,fe){return X.call.apply(X.bind,arguments)}function n(X,re,fe){if(!X)throw Error();if(2<arguments.length){var ue=Array.prototype.slice.call(arguments,2);return function(){var be=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(be,ue),X.apply(re,be)}}return function(){return X.apply(re,arguments)}}function r(X,re,fe){return r=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?e:n,r.apply(null,arguments)}var s=Date.now||function(){return+new Date};function o(X,re){this.a=X,this.o=re||X,this.c=this.o.document}var a=!!window.FontFace;function l(X,re,fe,ue){if(re=X.c.createElement(re),fe)for(var be in fe)fe.hasOwnProperty(be)&&(be=="style"?re.style.cssText=fe[be]:re.setAttribute(be,fe[be]));return ue&&re.appendChild(X.c.createTextNode(ue)),re}function c(X,re,fe){X=X.c.getElementsByTagName(re)[0],X||(X=document.documentElement),X.insertBefore(fe,X.lastChild)}function d(X){X.parentNode&&X.parentNode.removeChild(X)}function u(X,re,fe){re=re||[],fe=fe||[];for(var ue=X.className.split(/\s+/),be=0;be<re.length;be+=1){for(var ze=!1,Be=0;Be<ue.length;Be+=1)if(re[be]===ue[Be]){ze=!0;break}ze||ue.push(re[be])}for(re=[],be=0;be<ue.length;be+=1){for(ze=!1,Be=0;Be<fe.length;Be+=1)if(ue[be]===fe[Be]){ze=!0;break}ze||re.push(ue[be])}X.className=re.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function f(X,re){for(var fe=X.className.split(/\s+/),ue=0,be=fe.length;ue<be;ue++)if(fe[ue]==re)return!0;return!1}function g(X){return X.o.location.hostname||X.a.location.hostname}function E(X,re,fe){function ue(){yt&&be&&ze&&(yt(Be),yt=null)}re=l(X,"link",{rel:"stylesheet",href:re,media:"all"});var be=!1,ze=!0,Be=null,yt=fe||null;a?(re.onload=function(){be=!0,ue()},re.onerror=function(){be=!0,Be=Error("Stylesheet failed to load"),ue()}):setTimeout(function(){be=!0,ue()},0),c(X,"head",re)}function S(X,re,fe,ue){var be=X.c.getElementsByTagName("head")[0];if(be){var ze=l(X,"script",{src:re}),Be=!1;return ze.onload=ze.onreadystatechange=function(){Be||this.readyState&&this.readyState!="loaded"&&this.readyState!="complete"||(Be=!0,fe&&fe(null),ze.onload=ze.onreadystatechange=null,ze.parentNode.tagName=="HEAD"&&be.removeChild(ze))},be.appendChild(ze),setTimeout(function(){Be||(Be=!0,fe&&fe(Error("Script load timeout")))},ue||5e3),ze}return null}function w(){this.a=0,this.c=null}function _(X){return X.a++,function(){X.a--,m(X)}}function h(X,re){X.c=re,m(X)}function m(X){X.a==0&&X.c&&(X.c(),X.c=null)}function A(X){this.a=X||"-"}A.prototype.c=function(X){for(var re=[],fe=0;fe<arguments.length;fe++)re.push(arguments[fe].replace(/[\W_]+/g,"").toLowerCase());return re.join(this.a)};function k(X,re){this.c=X,this.f=4,this.a="n";var fe=(re||"n4").match(/^([nio])([1-9])$/i);fe&&(this.a=fe[1],this.f=parseInt(fe[2],10))}function R(X){return y(X)+" "+(X.f+"00")+" 300px "+O(X.c)}function O(X){var re=[];X=X.split(/,\s*/);for(var fe=0;fe<X.length;fe++){var ue=X[fe].replace(/['"]/g,"");ue.indexOf(" ")!=-1||/^\d/.test(ue)?re.push("'"+ue+"'"):re.push(ue)}return re.join(",")}function N(X){return X.a+X.f}function y(X){var re="normal";return X.a==="o"?re="oblique":X.a==="i"&&(re="italic"),re}function v(X){var re=4,fe="n",ue=null;return X&&((ue=X.match(/(normal|oblique|italic)/i))&&ue[1]&&(fe=ue[1].substr(0,1).toLowerCase()),(ue=X.match(/([1-9]00|normal|bold)/i))&&ue[1]&&(/bold/i.test(ue[1])?re=7:/[1-9]00/.test(ue[1])&&(re=parseInt(ue[1].substr(0,1),10)))),fe+re}function b(X,re){this.c=X,this.f=X.o.document.documentElement,this.h=re,this.a=new A("-"),this.j=re.events!==!1,this.g=re.classes!==!1}function P(X){X.g&&u(X.f,[X.a.c("wf","loading")]),I(X,"loading")}function F(X){if(X.g){var re=f(X.f,X.a.c("wf","active")),fe=[],ue=[X.a.c("wf","loading")];re||fe.push(X.a.c("wf","inactive")),u(X.f,fe,ue)}I(X,"inactive")}function I(X,re,fe){X.j&&X.h[re]&&(fe?X.h[re](fe.c,N(fe)):X.h[re]())}function T(){this.c={}}function q(X,re,fe){var ue=[],be;for(be in re)if(re.hasOwnProperty(be)){var ze=X.c[be];ze&&ue.push(ze(re[be],fe))}return ue}function W(X,re){this.c=X,this.f=re,this.a=l(this.c,"span",{"aria-hidden":"true"},this.f)}function G(X){c(X.c,"body",X.a)}function H(X){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+O(X.c)+";"+("font-style:"+y(X)+";font-weight:"+(X.f+"00")+";")}function j(X,re,fe,ue,be,ze){this.g=X,this.j=re,this.a=ue,this.c=fe,this.f=be||3e3,this.h=ze||void 0}j.prototype.start=function(){var X=this.c.o.document,re=this,fe=s(),ue=new Promise(function(Be,yt){function qe(){s()-fe>=re.f?yt():X.fonts.load(R(re.a),re.h).then(function(Zt){1<=Zt.length?Be():setTimeout(qe,25)},function(){yt()})}qe()}),be=null,ze=new Promise(function(Be,yt){be=setTimeout(yt,re.f)});Promise.race([ze,ue]).then(function(){be&&(clearTimeout(be),be=null),re.g(re.a)},function(){re.j(re.a)})};function U(X,re,fe,ue,be,ze,Be){this.v=X,this.B=re,this.c=fe,this.a=ue,this.s=Be||"BESbswy",this.f={},this.w=be||3e3,this.u=ze||null,this.m=this.j=this.h=this.g=null,this.g=new W(this.c,this.s),this.h=new W(this.c,this.s),this.j=new W(this.c,this.s),this.m=new W(this.c,this.s),X=new k(this.a.c+",serif",N(this.a)),X=H(X),this.g.a.style.cssText=X,X=new k(this.a.c+",sans-serif",N(this.a)),X=H(X),this.h.a.style.cssText=X,X=new k("serif",N(this.a)),X=H(X),this.j.a.style.cssText=X,X=new k("sans-serif",N(this.a)),X=H(X),this.m.a.style.cssText=X,G(this.g),G(this.h),G(this.j),G(this.m)}var L={D:"serif",C:"sans-serif"},K=null;function Y(){if(K===null){var X=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);K=!!X&&(536>parseInt(X[1],10)||parseInt(X[1],10)===536&&11>=parseInt(X[2],10))}return K}U.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=s(),J(this)};function te(X,re,fe){for(var ue in L)if(L.hasOwnProperty(ue)&&re===X.f[L[ue]]&&fe===X.f[L[ue]])return!0;return!1}function J(X){var re=X.g.a.offsetWidth,fe=X.h.a.offsetWidth,ue;(ue=re===X.f.serif&&fe===X.f["sans-serif"])||(ue=Y()&&te(X,re,fe)),ue?s()-X.A>=X.w?Y()&&te(X,re,fe)&&(X.u===null||X.u.hasOwnProperty(X.a.c))?oe(X,X.v):oe(X,X.B):Q(X):oe(X,X.v)}function Q(X){setTimeout(r(function(){J(this)},X),50)}function oe(X,re){setTimeout(r(function(){d(this.g.a),d(this.h.a),d(this.j.a),d(this.m.a),re(this.a)},X),0)}function pe(X,re,fe){this.c=X,this.a=re,this.f=0,this.m=this.j=!1,this.s=fe}var ye=null;pe.prototype.g=function(X){var re=this.a;re.g&&u(re.f,[re.a.c("wf",X.c,N(X).toString(),"active")],[re.a.c("wf",X.c,N(X).toString(),"loading"),re.a.c("wf",X.c,N(X).toString(),"inactive")]),I(re,"fontactive",X),this.m=!0,Pe(this)},pe.prototype.h=function(X){var re=this.a;if(re.g){var fe=f(re.f,re.a.c("wf",X.c,N(X).toString(),"active")),ue=[],be=[re.a.c("wf",X.c,N(X).toString(),"loading")];fe||ue.push(re.a.c("wf",X.c,N(X).toString(),"inactive")),u(re.f,ue,be)}I(re,"fontinactive",X),Pe(this)};function Pe(X){--X.f==0&&X.j&&(X.m?(X=X.a,X.g&&u(X.f,[X.a.c("wf","active")],[X.a.c("wf","loading"),X.a.c("wf","inactive")]),I(X,"active")):F(X.a))}function Me(X){this.j=X,this.a=new T,this.h=0,this.f=this.g=!0}Me.prototype.load=function(X){this.c=new o(this.j,X.context||this.j),this.g=X.events!==!1,this.f=X.classes!==!1,ie(this,new b(this.c,X),X)};function He(X,re,fe,ue,be){var ze=--X.h==0;(X.f||X.g)&&setTimeout(function(){var Be=be||null,yt=ue||null||{};if(fe.length===0&&ze)F(re.a);else{re.f+=fe.length,ze&&(re.j=ze);var qe,Zt=[];for(qe=0;qe<fe.length;qe++){var Jt=fe[qe],On=yt[Jt.c],br=re.a,Fs=Jt;if(br.g&&u(br.f,[br.a.c("wf",Fs.c,N(Fs).toString(),"loading")]),I(br,"fontloading",Fs),br=null,ye===null)if(window.FontFace){var Fs=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent),$i=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);ye=Fs?42<parseInt(Fs[1],10):!$i}else ye=!1;ye?br=new j(r(re.g,re),r(re.h,re),re.c,Jt,re.s,On):br=new U(r(re.g,re),r(re.h,re),re.c,Jt,re.s,Be,On),Zt.push(br)}for(qe=0;qe<Zt.length;qe++)Zt[qe].start()}},0)}function ie(X,re,fe){var be=[],ue=fe.timeout;P(re);var be=q(X.a,fe,X.c),ze=new pe(X.c,re,ue);for(X.h=be.length,re=0,fe=be.length;re<fe;re++)be[re].load(function(Be,yt,qe){He(X,ze,Be,yt,qe)})}function Se(X,re){this.c=X,this.a=re}Se.prototype.load=function(X){function re(){if(ze["__mti_fntLst"+ue]){var Be=ze["__mti_fntLst"+ue](),yt=[],qe;if(Be)for(var Zt=0;Zt<Be.length;Zt++){var Jt=Be[Zt].fontfamily;Be[Zt].fontStyle!=null&&Be[Zt].fontWeight!=null?(qe=Be[Zt].fontStyle+Be[Zt].fontWeight,yt.push(new k(Jt,qe))):yt.push(new k(Jt))}X(yt)}else setTimeout(function(){re()},50)}var fe=this,ue=fe.a.projectId,be=fe.a.version;if(ue){var ze=fe.c.o;S(this.c,(fe.a.api||"https://fast.fonts.net/jsapi")+"/"+ue+".js"+(be?"?v="+be:""),function(Be){Be?X([]):(ze["__MonotypeConfiguration__"+ue]=function(){return fe.a},re())}).id="__MonotypeAPIScript__"+ue}else X([])};function he(X,re){this.c=X,this.a=re}he.prototype.load=function(X){var re,fe,ue=this.a.urls||[],be=this.a.families||[],ze=this.a.testStrings||{},Be=new w;for(re=0,fe=ue.length;re<fe;re++)E(this.c,ue[re],_(Be));var yt=[];for(re=0,fe=be.length;re<fe;re++)if(ue=be[re].split(":"),ue[1])for(var qe=ue[1].split(","),Zt=0;Zt<qe.length;Zt+=1)yt.push(new k(ue[0],qe[Zt]));else yt.push(new k(ue[0]));h(Be,function(){X(yt,ze)})};function Je(X,re){X?this.c=X:this.c=Ct,this.a=[],this.f=[],this.g=re||""}var Ct="https://fonts.googleapis.com/css";function de(X,re){for(var fe=re.length,ue=0;ue<fe;ue++){var be=re[ue].split(":");be.length==3&&X.f.push(be.pop());var ze="";be.length==2&&be[1]!=""&&(ze=":"),X.a.push(be.join(ze))}}function le(X){if(X.a.length==0)throw Error("No fonts to load!");if(X.c.indexOf("kit=")!=-1)return X.c;for(var re=X.a.length,fe=[],ue=0;ue<re;ue++)fe.push(X.a[ue].replace(/ /g,"+"));return re=X.c+"?family="+fe.join("%7C"),0<X.f.length&&(re+="&subset="+X.f.join(",")),0<X.g.length&&(re+="&text="+encodeURIComponent(X.g)),re}function Oe(X){this.f=X,this.a=[],this.c={}}var Ke={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},it={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},It={i:"i",italic:"i",n:"n",normal:"n"},wn=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function me(X){for(var re=X.f.length,fe=0;fe<re;fe++){var ue=X.f[fe].split(":"),be=ue[0].replace(/\+/g," "),ze=["n4"];if(2<=ue.length){var Be,yt=ue[1];if(Be=[],yt)for(var yt=yt.split(","),qe=yt.length,Zt=0;Zt<qe;Zt++){var Jt;if(Jt=yt[Zt],Jt.match(/^[\w-]+$/)){var On=wn.exec(Jt.toLowerCase());if(On==null)Jt="";else{if(Jt=On[2],Jt=Jt==null||Jt==""?"n":It[Jt],On=On[1],On==null||On=="")On="4";else var br=it[On],On=br||(isNaN(On)?"4":On.substr(0,1));Jt=[Jt,On].join("")}}else Jt="";Jt&&Be.push(Jt)}0<Be.length&&(ze=Be),ue.length==3&&(ue=ue[2],Be=[],ue=ue?ue.split(","):Be,0<ue.length&&(ue=Ke[ue[0]])&&(X.c[be]=ue))}for(X.c[be]||(ue=Ke[be])&&(X.c[be]=ue),ue=0;ue<ze.length;ue+=1)X.a.push(new k(be,ze[ue]))}}function Kt(X,re){this.c=X,this.a=re}var Bn={Arimo:!0,Cousine:!0,Tinos:!0};Kt.prototype.load=function(X){var re=new w,fe=this.c,ue=new Je(this.a.api,this.a.text),be=this.a.families;de(ue,be);var ze=new Oe(be);me(ze),E(fe,le(ue),_(re)),h(re,function(){X(ze.a,ze.c,Bn)})};function Sn(X,re){this.c=X,this.a=re}Sn.prototype.load=function(X){var re=this.a.id,fe=this.c.o;re?S(this.c,(this.a.api||"https://use.typekit.net")+"/"+re+".js",function(ue){if(ue)X([]);else if(fe.Typekit&&fe.Typekit.config&&fe.Typekit.config.fn){ue=fe.Typekit.config.fn;for(var be=[],ze=0;ze<ue.length;ze+=2)for(var Be=ue[ze],yt=ue[ze+1],qe=0;qe<yt.length;qe++)be.push(new k(Be,yt[qe]));try{fe.Typekit.load({events:!1,classes:!1,async:!0})}catch{}X(be)}},2e3):X([])};function nt(X,re){this.c=X,this.f=re,this.a=[]}nt.prototype.load=function(X){var re=this.f.id,fe=this.c.o,ue=this;re?(fe.__webfontfontdeckmodule__||(fe.__webfontfontdeckmodule__={}),fe.__webfontfontdeckmodule__[re]=function(be,ze){for(var Be=0,yt=ze.fonts.length;Be<yt;++Be){var qe=ze.fonts[Be];ue.a.push(new k(qe.name,v("font-weight:"+qe.weight+";font-style:"+qe.style)))}X(ue.a)},S(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+g(this.c)+"/"+re+".js",function(be){be&&X([])})):X([])};var Un=new Me(window);Un.a.c.custom=function(X,re){return new he(re,X)},Un.a.c.fontdeck=function(X,re){return new nt(re,X)},Un.a.c.monotype=function(X,re){return new Se(re,X)},Un.a.c.typekit=function(X,re){return new Sn(re,X)},Un.a.c.google=function(X,re){return new Kt(re,X)};var Ve={load:r(Un.load,Un)};t.exports?t.exports=Ve:(window.WebFont=Ve,window.WebFontConfig&&Un.load(window.WebFontConfig))})()})(gj);var f1e=gj.exports;const h1e=to(f1e),p1e=({dataFixture:t,dataEquipos:e})=>{var H,j,U,L;const n=e||[],r=t||[];C.useState(!1);const[s,o]=C.useState("Montserrat"),[a,l]=C.useState("black"),[c,d]=C.useState("#00FF0000"),[u,f]=C.useState("normal"),[g,E]=C.useState("400"),S={},w={},_={},h={},m={},A={},k={},R={},O=new Set;r.forEach(K=>{K.equipolocal!=="A conf"&&O.add(K.equipolocal),K.equipovisitante!=="A conf"&&O.add(K.equipovisitante)}),n.forEach(K=>{const Y=K.nombre;O.has(Y)&&(S[Y]=0,w[Y]=0,A[Y]=0,k[Y]=0,R[Y]=0,_[Y]=0,h[Y]=0,m[Y]=0)}),r.forEach(K=>{if(K.estado==="Finalizado"||K.estado==="Jugandose"){const Y=K.equipolocal,te=K.equipovisitante;if(K.resolucion==="PP ambos 0-1")w[Y]+=1,w[te]+=1,m[Y]+=1,m[te]+=1,k[Y]+=1,k[te]+=1,R[Y]-=1,R[te]-=1;else if(K.resolucion==="PP ambos 0-3")w[Y]+=1,w[te]+=1,m[Y]+=1,m[te]+=1,k[Y]+=3,k[te]+=3,R[Y]-=3,R[te]-=3;else{const J=K.goleslocal,Q=K.golesvisitante;w[Y]+=1,w[te]+=1,A[Y]+=J,A[te]+=Q,k[Y]+=Q,k[te]+=J,R[Y]+=J-Q,R[te]+=Q-J,J>Q?(S[Y]+=3,_[Y]+=1,m[te]+=1):J<Q?(S[te]+=3,_[te]+=1,m[Y]+=1):(S[Y]+=1,S[te]+=1,h[Y]+=1,h[te]+=1)}}});const N=Object.entries(S).sort((K,Y)=>{if(Y[1]!==K[1])return Y[1]-K[1];const te=R[K[0]]||0,J=R[Y[0]]||0;if(te!==J)return J-te;const Q=A[K[0]]||0,oe=A[Y[0]]||0;return oe!==Q?oe-Q:K[0].localeCompare(Y[0])}),y=(H=r[0])==null?void 0:H.torneo;(j=r[0])==null||j.grupoCopas,(U=r[0])==null||U.organizador,(L=r[0])==null||L.añoTorneo,[{torneo:"PRIMERAA",mensaje:"1° a 8° CLASIFICADOS A PLAYOFF "},{torneo:"PRIMERAAFEM",mensaje:"1° a 8° CLASIFICADOS A PLAYOFF "},{torneo:"PRIMERABFEM",mensaje:"1° ASCENSO DIRECTO "},{torneo:"PRIMERACFEM",mensaje:"1° ASCENSO DIRECTO "},{torneo:"PRIMERAB",mensaje:"1° ASCENSO DIRECTO "},{torneo:"PRIMERAC",mensaje:"1° ASCENSO DIRECTO "},{torneo:"PRIMERAD1",mensaje:"1° ASCENSO DIRECTO "},{torneo:"PRIMERAD2",mensaje:"1° ASCENSO DIRECTO "},{torneo:"INTEGRACION",mensaje:"CLASIFICAN A LA PRIMERA D DE AFA "},{torneo:"COPAAMERICA",mensaje:"CLASIFICADOS A LAS SEMIFINALES Y AL MUNDIAL"},{torneo:"ARGENLIGAZ1",mensaje:"1° y 2° clasificará a la PRIMERA D de AFA. "},{torneo:"ARGENLIGAZ2",mensaje:"1° y 2° clasificará a la PRIMERA D de AFA. "},{torneo:"COPADEPLATA",mensaje:"Campeón ( Clasifica a la SuperCopa 2024 ) "},{torneo:"AufPRIMERA",mensaje:"PLAYOFF "},{torneo:"CONCACAF",mensaje:"CLASIFICADO A CUARTOS DE FINAL "},{torneo:"LNFA",mensaje:"CLASIFICADO A CUARTOS DE FINAL "},{torneo:"LAAMBA",mensaje:"CAMPEÓN"},{torneo:"LAAMBAFEM",mensaje:"CAMPEÓN"},{torneo:"LIBERTADORES",mensaje:"CLASIFICADO A CUARTOS DE FINAL "},{torneo:"COPAAFRICA",mensaje:"CLASIFICADO A SEMIFINALES "},{torneo:"COPAASIA",mensaje:"CLASIFICADO A CUARTOS DE FINAL "},{torneo:"ARGENLIGABZ1",mensaje:"ASCENSO DIRECTO"},{torneo:"ARGENLIGABZ2",mensaje:"ASCENSO DIRECTO"},{torneo:"MUNDIAL",mensaje:"1°, 2° y los cuatro mejores 3° de los 6 grupos- CLASIFICADOS A OCTAVOS DE FINAL"}].filter(K=>K.torneo===y).map((K,Y)=>i("tr",{className:"border-0 ",children:i("td",{className:"text-start mt-2",colSpan:10,style:{fontSize:12,color:a,whiteSpace:"nowrap"},children:K.mensaje})},Y)),[{torneo:"PRIMERAA",mensaje:"PLAYOFF - En la 1er Ronda- Los primeros 8 COPA DE ORO",color:"#B8F7A6"},{torneo:"PRIMERAB",mensaje:"PLAYOFF - Del 2° al 9° Playoffs por el segundo ascenso",color:"#BAC1C0"},{torneo:"PRIMERABFEM",mensaje:"PLAYOFF - Del 2° al 9° Playoffs por el 2° y 3° ascenso",color:"#BAC1C0"},{torneo:"PRIMERACFEM",mensaje:"PLAYOFF - Del 2° al 9° Playoffs por el segundo y tercer ascenso",color:"#BAC1C0"},{torneo:"PRIMERAC",mensaje:"PLAYOFF - Del 2° al 9° Playoffs por el segundo ascenso",color:"#BAC1C0"},{torneo:"PRIMERAD1",mensaje:"PLAYOFF - Por el segundo ascenso ",color:"#BAC1C0"},{torneo:"PRIMERAD2",mensaje:"PLAYOFF - Por el segundo ascenso ",color:"#BAC1C0"},{torneo:"ARGENLIGAZ1",mensaje:"PLAYOFF - Del 3° al 6° Playoffs por la tercera clasificación. ",color:"#BAC1C0"},{torneo:"ARGENLIGAZ2",mensaje:"PLAYOFF - Del 3° al 6° Playoffs por la tercera clasificación. ",color:"#BAC1C0"},{torneo:"AufPRIMERA",mensaje:"NO HAY DESCENSO",color:"#227DE1"},{torneo:"CONCACAF",mensaje:"CUARTOS DE FINAL - Los dos mejores 3° de los 3 grupos ",color:"#BAC1C0"},{torneo:"LIBERTADORES",mensaje:"CUARTOS DE FINAL - Los dos mejores 3° de los 3 grupos ",color:"#BAC1C0"}].filter(K=>K.torneo===y).map((K,Y)=>i("tr",{className:"border-0 ",children:i("td",{className:"text-center",colSpan:10,style:{backgroundColor:K.color,fontSize:9},children:K.mensaje})},Y)),[{torneo:"PRIMERAA",mensaje:"9° al 16°-CLASIFICADOS A COPA DE PLATA",color:"white"},{torneo:"PRIMERAB",mensaje:"2° al 9° -Playoffs por el segundo ascenso ",color:"#DE9090"},{torneo:"PRIMERABFEM",mensaje:"PLAYOFF - Del 2° al 9° Playoffs por el 2° y 3° ascenso",color:"#DE9090"},{torneo:"PRIMERACFEM",mensaje:"PLAYOFF - Del 2° al 9° Playoffs por el 2° y 3° ascenso",color:"#DE9090"},{torneo:"PRIMERAC",mensaje:"2° al 9° Playoffs por el segundo ascenso",color:"#DE9090"},{torneo:"PRIMERAD1",mensaje:"2° al 5° Playoffs por el segundo ascenso",color:"#DE9090"},{torneo:"PRIMERAD2",mensaje:"2° al 5° Playoffs por el segundo ascenso",color:"#DE9090"},{torneo:"PRIMERACFEM",mensaje:"10° al 13° DESAFIL.- Los equipos desaf. no podran jugar el año ",color:"#DE9090"}].filter(K=>K.torneo===y).map((K,Y)=>i("tr",{className:"border-0 ",children:i("td",{className:"text-start",colSpan:10,style:{fontSize:12,color:a,whiteSpace:"nowrap"},children:K.mensaje})},Y)),[{torneo:"PRIMERAA",mensaje:"17°- 18° DESCENSO DIRECTO-En caso de igualdad en pts, se define partido desempate",color:"#DE9090"},{torneo:"PRIMERAAFEM",mensaje:"14°- 15° DESCENSO DIRECTO-En caso de igualdad en pts, se define partido desempate",color:"#DE9090"},{torneo:"PRIMERAB",mensaje:"17°- 18° DESCENSO DIRECTO -En caso de igualdad en pts, se define partido desempate",color:"#DE9090"},{torneo:"PRIMERABFEM",mensaje:"14°- 15° DESCENSO DIRECTO -En caso de igualdad en pts, se define partido desempate",color:"#DE9090"},{torneo:"PRIMERAC",mensaje:"16° al 18° DESCENSO DIRECTO-En caso de igualdad en pts, se define partido desempate",color:"#DE9090"},{torneo:"PRIMERAD1",mensaje:"11° al 18°-DESAFILIACIÓN-En caso de igualdad en pts, se define partido desempate",color:"#DE9090"},{torneo:"PRIMERAD2",mensaje:"11° al 18°-DESAFILIACIÓN-En caso de igualdad en pts, se define partido desempate",color:"#DE9090"}].filter(K=>K.torneo===y).map((K,Y)=>i("tr",{className:"border-0 ",children:i("td",{className:"text-start border-0",colSpan:10,style:{fontSize:11,whiteSpace:"normal",color:a,whiteSpace:"nowrap"},children:K.mensaje.split(` `).map((te,J)=>p("span",{children:[te,i("br",{})]},J))})},Y));const I=K=>{const Y=n.find(te=>te.nombre===K);return Y?Y.escudos:""},[T,q]=C.useState(!1),[W,G]=C.useState(!1);return C.useEffect(()=>{const K=()=>{window.scrollY>50&&!W&&q(!0)};return window.addEventListener("scroll",K),()=>{window.removeEventListener("scroll",K)}},[W]),p(ee,{children:[i(ae,{className:"bg-dark"}),i(ae,{className:"",style:{fontWeight:g},children:i(V,{children:i($,{xs:12,md:12,children:p(Ie,{className:"table-sm",id:"tabla-posiciones",style:{width:"500px",tableLayout:"fixed"},children:[i("thead",{children:p("tr",{children:[i("th",{className:"table-column border-0"}),i("th",{className:"table-column-afa border-0"}),i("th",{className:"table-column-afa border-0"}),i("th",{className:"table-column-afa border-0"}),i("th",{className:"table-column-afa border-0"}),i("th",{className:"table-column-afa border-0"}),i("th",{className:"table-column-afa border-0"}),i("th",{className:"table-column-afa border-0"}),i("th",{className:"table-column-afa border-0"})]})}),i("tbody",{style:{backgroundColor:c,color:"black",fontFamily:s},children:N.map((K,Y)=>p("tr",{children:[i("th",{className:"border-0 text-center",scope:"row",children:i("td",{className:"border-0 ",children:p("div",{className:"d-flex align-items-center ",children:[i("img",{className:"me-1",src:I(K[0]),alt:`${K[0]} escudo`,style:{width:"18px",height:"18px"}}),i("span",{className:`${u}`,style:{color:a,fontWeight:g,fontSize:14},children:K[0]})]})})}),i("td",{className:"border-0 text-center",style:{fontSize:14,color:a,whiteSpace:"nowrap"},children:K[1]}),p("td",{className:"border-0 text-center",style:{fontSize:14,color:a,whiteSpace:"nowrap"},children:[w[K[0]]," "]}),i("td",{className:"border-0 text-center",style:{fontSize:14,color:a,whiteSpace:"nowrap"},children:_[K[0]]||0}),i("td",{className:"border-0 text-center",style:{fontSize:14,color:a,whiteSpace:"nowrap"},children:h[K[0]]||0}),i("td",{className:"border-0 text-center",style:{fontSize:14,color:a,whiteSpace:"nowrap"},children:m[K[0]]||0}),i("td",{className:"border-0 text-center",style:{fontSize:14,color:a,whiteSpace:"nowrap"},children:A[K[0]]||0}),i("td",{className:"border-0 text-center",style:{fontSize:14,color:a,whiteSpace:"nowrap"},children:k[K[0]]||0}),i("td",{className:"border-0 text-center",style:{fontSize:14,color:a,whiteSpace:"nowrap"},children:R[K[0]]||0})]},K[0]))})]})})})})]})},m1e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(""),[a,l]=C.useState(""),[c,d]=C.useState(!0),[u,f]=C.useState([]),g=async()=>{if(d(!0),s&&a){let{data:A,error:k}=await z.from("Fixture2023").select("*").eq("torneo",s).eq("jornada",a).eq("añoTorneo",2024).order("jornada",{ascending:!0}).order("fecha",{ascending:!0}).order("hora",{ascending:!0});k?console.log("Error",k):e(S(A))}setTimeout(()=>d(!1),2e3)},E=async()=>{d(!0);let{data:A,error:k}=await z.from("Equipos").select("*");k?console.log("Error",k):r(A),setTimeout(()=>d(!1),2e3)},S=A=>A.reduce((R,O)=>{const N=O.faseCopas?O.faseCopas:O.jornada,y=R.find(v=>v.key===N);if(y){const v=y.fechas.find(b=>b.fecha===O.fecha);v?v.partidos.push(O):y.fechas.push({fecha:O.fecha,partidos:[O]})}else R.push({key:N,fechas:[{fecha:O.fecha,partidos:[O]}]});return R},[]);C.useEffect(()=>{s&&w(),E()},[s]),C.useEffect(()=>{s&&a&&g()},[s,a]);const w=async()=>{let{data:A,error:k}=await z.from("Fixture2023").select("jornada").eq("torneo",s).eq("añoTorneo",2024).order("jornada",{ascending:!0});if(k)console.log("Error",k);else{const R=[...new Set(A.map(O=>O.jornada))];f(R)}},_=A=>{o(A),l(""),e([])},h=()=>{o(""),l(""),e([])},m=()=>{const A=document.getElementById("fixture");mj(A).then(function(k){var R=document.createElement("a");R.download="fixture.png",R.href=k,R.click()})};return p(ae,{className:"mb-5",style:{backgroundColor:"transparent",padding:"50px"},children:[i("h1",{className:"text-center text-white fw-bolder",children:"Fixture 2024"}),i(V,{children:i($,{className:"text-center",children:i(Qe,{onClick:h,className:"text-white fw-bolder",style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Ocultar Datos Fixture"})})}),p(Ae,{children:[p(Ae.Group,{controlId:"tournamentSelect",className:"mb-5 mt-2",children:[i(Ae.Label,{className:"text-center text-white fw-bolder",children:"Torneo"}),p(Ae.Control,{as:"select",value:s,onChange:A=>_(A.target.value),children:[i("option",{value:"",children:"Seleccione un torneo"}),i("option",{value:"PRIMERAA",children:"PRIMERA A"}),i("option",{value:"PRIMERAB",children:"PRIMERA B"}),i("option",{value:"PRIMERAC",children:"PRIMERA C"}),i("option",{value:"PRIMERAD1",children:"PRIMERA D1"}),i("option",{value:"PRIMERAD2",children:"PRIMERA D2"}),i("option",{value:"MUNDIAL",children:"MUNDIAL"}),i("option",{value:"FFMUNDIAL",children:"FASE FINAL MUNDIAL"})]})]}),p(Ae.Group,{controlId:"jornadaSelect",className:"mb-5 mt-2",children:[i(Ae.Label,{className:"text-center text-white fw-bolder",children:"Jornada"}),p(Ae.Control,{as:"select",value:a,onChange:A=>l(A.target.value),disabled:!s,children:[i("option",{value:"",children:"Seleccione una jornada"}),u.map(A=>i("option",{value:A,children:A},A))]})]})]}),i("h6",{className:"text-white mb-5",style:{fontSize:12},children:"*Los partidos que no contienen fecha pueden estar Pendientes/Suspendidos/Postergados"}),c?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):s&&a&&t.length>0&&i(V,{children:p($,{children:[t.map((A,k)=>p(Ie,{id:"fixture",bordered:!0,style:{borderColor:"transparent",backgroundColor:"transparent",margin:0,padding:0},size:"sm",responsive:"sm",children:[i("thead",{children:p("tr",{children:[i("th",{style:{width:"40%",border:"none"}}),i("th",{style:{width:"10%",border:"none"}}),i("th",{style:{width:"40%",border:"none"}})]})}),p("tbody",{children:[i("tr",{children:p("td",{className:"text-center text-white fw-bolder border-0 fst-italic",style:{fontSize:18,backgroundColor:"transparent",fontFamily:"Roboto Condensed, sans-serif",borderTop:"none"},colSpan:"4",children:[isNaN(Number(A.key))?"":"FECHA"," ",A.key]})}),A.fechas.map((R,O)=>p(Fe.Fragment,{children:[R.partidos.every(N=>N.estado!=="Finalizado")&&i("tr",{children:i("td",{className:"text-center text-dark border-0 fw-bolder",style:{fontSize:15,backgroundColor:"#44e2ff",fontFamily:"Roboto Condensed, sans-serif"},colSpan:"4",children:R.fecha?se(new Date(R.fecha)).format("LL"):""})}),R.partidos.map((N,y)=>{const v=n.find(P=>P.nombre===N.equipolocal),b=n.find(P=>P.nombre===N.equipovisitante);return i(Fe.Fragment,{children:p("tr",{children:[i("td",{className:"fw-bolder text-white",style:{fontSize:17,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"flex-end",alignItems:"center",minHeight:"40px"},children:p("div",{style:{display:"flex",alignItems:"center"},children:[i("div",{children:N.equipolocal}),v&&i("div",{children:i("img",{src:v.escudos,alt:N.equipolocal,style:{width:"25px",height:"25px",marginLeft:"8px"}})})]})}),i("td",{className:"text-center text-white fw-bolder",style:{fontSize:17,fontFamily:"Roboto Condensed, sans-serif",minHeight:"40px"},children:N.estado==="Finalizado"?`${N.goleslocal} - ${N.golesvisitante}`:N.hora?N.hora.split(":").slice(0,2).join(":")+"hs":"Vs"}),i("td",{className:"fw-bolder text-white",style:{fontSize:17,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"flex-start",alignItems:"center",minHeight:"40px"},children:p("div",{style:{display:"flex",alignItems:"center"},children:[b&&i("div",{children:i("img",{src:b.escudos,alt:N.equipovisitante,style:{width:"25px",height:"25px",marginRight:"8px"}})}),i("div",{children:N.equipovisitante})]})})]})},y)})]},O))]})]},k)),i(V,{children:i($,{children:i(Qe,{onClick:m,className:"btn btn-sm btn-secondary",children:"Descargar imagen Fixture"})})})]})})]})},g1e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),a=["PRIMERAA","PRIMERAB","PRIMERAC","PRIMERAD1","PRIMERAD2","PRIMERAAFEM","PRIMERABFEM","PRIMERACFEM","MUNDIAL"];C.useEffect(()=>{c(),l()},[]);const l=async()=>{o(!0);const u=[];for(const f of a){let g=z.from("Fixture2023").select("*").eq("añoTorneo",2024).eq("torneo",f).order("fecha");f==="MUNDIAL"&&(g=g.eq("grupoCopas","C")),g=g.order("fecha");const{data:E,error:S}=await g;S?console.log("Error",S):u.push({torneo:f,fixture:E})}e(u),o(!1)},c=async()=>{o(!0);let{data:u,error:f}=await z.from("Equipos").select("*");f?console.log("Error",f):r(u),o(!1)},d=u=>{h1e.load({google:{families:["Montserrat"]},active:()=>{const f=document.getElementById(`tabla-posiciones-${u}`);mj(f).then(g=>{const E=`Tabla de posiciones - ${u}.png`,S=document.createElement("a");S.download=E,S.href=g,S.click()}).catch(g=>{console.error("Error:",g)})},inactive:()=>{console.error("Font loading failed")}})};return p(ae,{className:"bg-white mt-4",style:{padding:"10px"},children:[i(V,{children:i($,{children:i("h4",{className:"text-center text-white fw-bolder",children:"Tablas de Posiciones 2024"})})}),s?i(V,{children:i($,{className:"text-center",children:i(Ee,{color:"#FF0000"})})}):t.map(({torneo:u,fixture:f})=>i(ae,{className:"mb-4",children:i(V,{children:p($,{children:[i("h5",{className:"text-center text-dark fw-bolder",children:u}),i("div",{id:`tabla-posiciones-${u}`,children:i(p1e,{dataFixture:f,dataEquipos:n})}),i(Qe,{onClick:()=>d(u),className:"btn btn-sm btn-secondary mt-2",children:"Descargar imagen de la tabla"})]})})},u))]})},y1e=()=>{const[t,e]=C.useState("");return C.useEffect(()=>(document.body.classList.add("afa-page"),()=>{document.body.classList.remove("afa-page")}),[]),C.useEffect(()=>{const n=async()=>{const r=window.prompt("Por favor ingrese la contraseña para ver este componente");r==="afa2024"?e("afa"):r==="sp2024"?e("sp"):r!==null&&(window.alert("Contraseña incorrecta"),await n())};n()},[]),t?i(ee,{children:i(ae,{className:"mb-5",children:i(V,{children:p($,{children:[t==="afa"&&i(g1e,{}),t==="sp"&&i(m1e,{})]})})})}):null},b1e=()=>{const[t,e]=C.useState(""),[n,r]=C.useState(""),[s,o]=C.useState(""),[a,l]=C.useState(""),[c,d]=C.useState(""),[u,f]=C.useState(0),[g,E]=C.useState(0),[S,w]=C.useState([]),[_,h]=C.useState([]),[m,A]=C.useState(null),[k,R]=C.useState(""),[O,N]=C.useState(0),[y,v]=C.useState(0),[b,P]=C.useState("#001C31"),[F,I]=C.useState(!1);C.useEffect(()=>{const ie=()=>{prompt("Ingrese la contraseña")===""?I(!0):(alert("Contraseña incorrecta"),ie())};ie()},[]);const T=async()=>{try{const{data:ie,error:Se}=await z.from("Equipos").select("*").eq("genero","Masculino");if(Se)console.error("Error",Se);else{const he=ie.sort((Je,Ct)=>Je.nombre.localeCompare(Ct.nombre));w(he)}}catch(ie){console.error("Error",ie.message)}},q=async()=>{try{const{data:ie,error:Se}=await z.from("CanalesTv").select("idTv, nombre, logo").order("nombre",{ascending:!0});Se?console.error("Error",Se):h(ie)}catch(ie){console.error("Error",ie.message)}};C.useEffect(()=>{F&&(T(),q())},[F]),C.useEffect(()=>{if(m){const ie=setInterval(()=>{const Se=m.logos[(m.logos.indexOf(k)+1)%m.logos.length];R(Se)},4e3);return()=>clearInterval(ie)}},[m,k]);const W=()=>{f(u+1)},G=()=>{f(u>0?u-1:0)},H=()=>{E(g+1)},j=()=>{E(g>0?g-1:0)},U=ie=>{e(ie)},L=ie=>{r(ie)},K=ie=>{d(ie),ie==="ET"&&(N(0),v(0))},Y=ie=>{const Se=ie.target.value.toUpperCase();o(Se)},te=ie=>{const Se=ie.target.value.toUpperCase();l(Se)},J=()=>{N(O<5?O+1:5)},Q=()=>{N(O>0?O-1:0)},oe=()=>{v(y<5?y+1:5)},pe=()=>{v(y>0?y-1:0)},ye=()=>{e(""),r(""),d(""),f(0),E(0),A(null),o(""),l("")},Pe=ie=>{A(ie)},Me=()=>{N(0),v(0)},He=ie=>ie==="#000000"?"white":ie==="#FFFFFF"?"black":"white";return F?p(ae,{className:"fw-bolder mt-5",style:{fontFamily:"Montserrat",zIndex:999},children:[p(ae,{className:"bg-white",children:[p(V,{className:"mb-3",children:[p($,{className:"mt-3",children:[i(df,{variant:"dark",id:"dropdown-local",title:"Seleccionar Escudo Local",children:i("div",{style:{maxHeight:"300px",overflowY:"auto"},children:S.map(ie=>i(Ge.Item,{onClick:()=>U(ie),children:ie.nombre},ie.id))})}),t&&p("p",{children:["Local: ",t.nombre]})]}),p($,{className:"mt-3",children:[i(df,{variant:"dark",id:"dropdown-visitante",title:"Seleccionar Escudo Visitante",children:i("div",{style:{maxHeight:"300px",overflowY:"auto"},children:S.map(ie=>i(Ge.Item,{onClick:()=>L(ie),children:ie.nombre},ie.id))})}),n&&p("p",{children:["Visitante: ",n.nombre]})]})]}),p(V,{className:"mb-3",children:[p($,{children:[i(Ae.Label,{children:"Nombre Equipo Local"}),i(Ae.Control,{type:"text",value:s,onChange:Y,placeholder:"Recomendacion: No usar mas de 14 letras"})]}),p($,{children:[i(Ae.Label,{children:"Nombre Equipo Visitante"}),i(Ae.Control,{type:"text",value:a,onChange:te,placeholder:"Recomendacion: No usar mas de 14 letras"})]})]}),p(V,{className:"mb-3",children:[i($,{children:p("div",{className:"d-flex align-items-center",children:[i(Qe,{className:"bg-dark border-0",onClick:G,children:"-"}),p("p",{className:"mx-2",children:["Goles Local: ",u]}),i(Qe,{className:"bg-dark border-0",onClick:W,children:"+"})]})}),i($,{children:p("div",{className:"d-flex align-items-center",children:[i(Qe,{className:"bg-dark border-0",onClick:j,children:"-"}),p("p",{className:"mx-2",children:["Goles Visitante: ",g]}),i(Qe,{className:"bg-dark border-0",onClick:H,children:"+"})]})})]}),p(V,{className:"mb-3",children:[i($,{children:p("div",{className:"d-flex align-items-center",children:[i(Qe,{className:"bg-dark border-0",onClick:Q,children:"-"}),p("p",{className:"mx-2",children:["Sexta Falta Local: ",O]}),i(Qe,{className:"bg-dark border-0",onClick:J,children:"+"})]})}),i($,{children:p("div",{className:"d-flex align-items-center",children:[i(Qe,{className:"bg-dark border-0",onClick:pe,children:"-"}),p("p",{className:"mx-2",children:["Sexta Falta Visitante: ",y]}),i(Qe,{className:"bg-dark border-0",onClick:oe,children:"+"})]})})]}),i(V,{className:"mb-3",children:p($,{children:[i(df,{variant:"dark",id:"dropdown-estado",title:"Seleccionar Estado del Partido",children:["1T","ET","2T","FINAL"].map(ie=>i(Ge.Item,{onClick:()=>K(ie),children:ie},ie))}),p("p",{children:["Estado del Partido: ",c]})]})}),i(V,{className:"mb-3",children:p($,{children:[i(Qe,{variant:"secondary m-1",onClick:ye,children:"Limpiar"}),i(Qe,{variant:"secondary",onClick:Me,children:"Limpiar Sextas"})]})}),i(V,{className:"mb-3",children:p($,{children:[i(df,{variant:"dark",id:"dropdown-canal",title:"Seleccionar Canal de TV",children:_.map(ie=>i(Ge.Item,{onClick:()=>Pe(ie),children:ie.nombre},ie.id))}),m&&p("p",{children:["Canal: ",m.nombre]})]})}),i(V,{className:"mb-3",children:i($,{children:p("div",{children:[i("label",{htmlFor:"background-color-select",children:"Elige un color de fondo:"}),p("select",{id:"background-color-select",value:b,onChange:ie=>P(ie.target.value),children:[i("option",{value:"#001C31",children:"Azul Oscuro"}),i("option",{value:"#626262",children:"Gris"}),i("option",{value:"#000000",children:"Negro"}),i("option",{value:"#065F1B",children:"Verde"}),i("option",{value:"#6F2127",children:"Bordo"})]})]})})})]}),p(ae,{style:{backgroundColor:b,marginTop:"-16px"},children:[i(V,{children:i($,{className:"d-flex justify-content-center mt-2",children:i("img",{src:cI,alt:"Logo",width:"300"})})}),i(ae,{style:{backgroundColor:b,color:He(b),padding:"10px 0"},children:p(V,{className:"mb-3 align-items-center",children:[i($,{xs:"auto",className:"d-flex align-items-start",style:{backgroundColor:b,padding:"2px",marginRight:"25px"},children:p("div",{className:"d-flex align-items-center",style:{flexDirection:"column"},children:[m&&i("img",{src:m.logo,alt:"Logo",width:"70"}),m&&i("p",{className:"bg-danger text-center vivomar p-2 mt-2",style:{borderRadius:"12px"},children:"VIVO"})]})}),i($,{xs:"auto",className:"d-flex align-items-center",style:{backgroundColor:"#fff",padding:"7px"},children:t&&i("img",{src:t.escudos,alt:t.nombre,width:"60",className:"mr-2"})}),i($,{xs:"auto",className:"d-flex align-items-center",style:{backgroundColor:"#001C31",color:"#fff",padding:"0 10px"},children:i("p",{style:{fontSize:"30px",margin:0},children:s})}),i($,{className:"d-flex justify-content-center",style:{fontSize:"60px",backgroundColor:b,color:"#000",padding:"5px 20px"},children:i("div",{style:{backgroundColor:"#fff",padding:"6px"},children:p("p",{style:{margin:0},children:[u," - ",g]})})}),i($,{xs:"auto",className:"d-flex align-items-center",style:{backgroundColor:"#001C31",color:"#fff",padding:"0 10px"},children:i("p",{style:{fontSize:"30px",margin:0},children:a})}),i($,{xs:"auto",className:"d-flex align-items-center",style:{backgroundColor:"#fff",padding:"5px"},children:n&&i("img",{src:n.escudos,alt:n.nombre,width:"60",className:"mr-2"})}),i($,{xs:"auto",className:"d-flex align-items-center",style:{fontSize:"50px",backgroundColor:c==="FINAL"?"#001C31":"#F44336",padding:"0px 25px"},children:i("p",{style:{margin:0},children:c})})]})}),i(V,{children:p($,{className:"d-flex justify-content-between",style:{backgroundColor:"#001C31"},children:[p("div",{className:"d-flex",children:[Array.from({length:5},(ie,Se)=>i("div",{style:{width:"60px",height:"20px",backgroundColor:"transparent",margin:"5px"}},`local-bg-${Se}`)),Array.from({length:O},(ie,Se)=>i("div",{style:{width:"60px",height:"20px",backgroundColor:"red",margin:"5px",position:"absolute",marginLeft:`${Se*65}px`,borderRadius:"10px"},className:O===5&&Se===4?"sextatil":""},`local-${Se}`))]}),i("div",{style:{flexGrow:1}}),p("div",{className:"d-flex",style:{position:"relative"},children:[Array.from({length:5},(ie,Se)=>i("div",{style:{width:"60px",height:"20px",backgroundColor:"transparent",margin:"5px"}},`visitante-bg-${Se}`)),Array.from({length:y},(ie,Se)=>i("div",{style:{width:"60px",height:"20px",backgroundColor:"red",margin:"5px",borderRadius:"10px"},className:y===5&&Se===0?"sextatil":""},`visitante-${Se}`))]})]})})]})]}):null},v1e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},f=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},f=>{l()}).subscribe(),u=()=>{document.hidden||(a(),l())};return document.addEventListener("visibilitychange",u,!1),()=>{c.unsubscribe(),d.unsubscribe(),document.removeEventListener("visibilitychange",u,!1)}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","LIBERTADORESFEM").eq("añoTorneo",2024).eq("grupoCopas","A");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})},_1e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},k=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},k=>{E()}).subscribe(),A=()=>{document.hidden||(g(),E())};return document.addEventListener("visibilitychange",A,!1),()=>{h.unsubscribe(),m.unsubscribe(),document.removeEventListener("visibilitychange",A,!1)}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","LIBERTADORESFEM").eq("añoTorneo",2024).eq("grupoCopas","B");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","LIBERTADORES");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(tt,{dataFixture:t,dataEquipos:n})})};function yj({dataFixture:t,dataEquipos:e}){const[n,r]=C.useState([]),s=t.reduce((d,u)=>{const f=u.grupoCopas,g=u.jornada;return d[f]||(d[f]={}),d[f][g]||(d[f][g]=[]),d[f][g].push(u),d},{}),o=Object.keys(s).sort();C.useEffect(()=>{const d=e.map(u=>({escudo:u.escudos,equipo:u.nombre}));r(d)},[e]);const a=(d,u)=>{l("/videos",{state:{url:d,data:u}})},l=Rt();function c(d,u){const f=d.hora?se(d.hora,"HH:mm:ss"):se(),g=u.hora?se(u.hora,"HH:mm:ss"):se();return f.diff(g)}return i(ee,{children:i(ae,{children:o.map(d=>{const u=Object.keys(s[d]),f=[];for(let g=0;g<u.length;g+=2)f.push(u.slice(g,g+2));return f.map((g,E)=>i(V,{children:g.map(S=>{const w=s[d][S].find(h=>h.libre),_=s[d][S].sort(c);return i($,{md:6,xs:6,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[p("thead",{style:{color:"transparent",borderColor:"transparent"},children:[p("tr",{children:[i("th",{style:{width:"17%"}}),i("th",{style:{width:"8%"}}),i("th",{style:{width:"8%"}}),i("th",{style:{width:"17%"}}),i("th",{style:{width:"10%"}})]}),i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"11px"},children:[" Fecha ",S]})})]}),p("tbody",{children:[_.map(h=>{const m=n.find(y=>y.equipo===h.equipolocal),A=n.find(y=>y.equipo===h.equipovisitante);let k="A confirmar";h.fecha&&(k=se(h.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("ddd DD/MM").toUpperCase().replace(".",""));const R=h.estado==="Jugandose"?"red":"white",O=h.estado==="Jugandose"?"white":"black";let N="";return h.hora&&(N=se(h.hora,"HH:mm:ss").format("HH:mm")),p(Fe.Fragment,{children:[i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder ",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:[" ",k," - ",N]})}),p("tr",{className:"align-middle",children:[p("td",{className:"bg-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"12px"},children:[m&&i("img",{src:m.escudo,alt:m.equipo,width:"12",height:"12"})," ",h.equipolocal.substring(0,3).toUpperCase()]}),i("td",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:R,color:O},children:h.estado==="Finalizado"||h.estado==="Jugandose"?h.goleslocal:""}),i("td",{className:"text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"13px",backgroundColor:R,color:O},children:h.estado==="Finalizado"||h.estado==="Jugandose"?h.golesvisitante:""}),p("td",{className:"bg-white text-center",style:{fontFamily:"Roboto Condensed, sans-serif",fontWeight:"bolder",fontSize:"12px"},children:[h.equipovisitante.substring(0,3).toUpperCase()," ",A&&i("img",{src:A.escudo,alt:A.equipo,width:"12",height:"12"})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:h.linkgoles===null||h.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{a(h.linkgoles,{id:h.id,estado:h.estado,equipolocal:h.equipolocal,equipovisitante:h.equipovisitante,goleslocal:h.goleslocal,penaleslocal:h.penaleslocal,penalesvisitante:h.penalesvisitante,golesvisitante:h.golesvisitante,escudoLocal:m,escudoVisitante:A,tiempodelpartido:h.tiempodelpartido,hora:N,goleadoresLocal:h.goleadoresLocal,goleadoresVisitante:h.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})})})]})]},h.id)}),w&&i("tr",{children:p("td",{colSpan:"5",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[" Libre: ",w.libre]})})]})]})},S)})},E))})})})}const w1e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0);C.useEffect(()=>{a(),l();const c=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},f=>{a()}).subscribe(),d=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},f=>{l()}).subscribe(),u=()=>{document.hidden||(a(),l())};return document.addEventListener("visibilitychange",u,!1),()=>{c.unsubscribe(),d.unsubscribe(),document.removeEventListener("visibilitychange",u,!1)}},[]);const a=async()=>{try{const{data:c,error:d}=await z.from("Fixture2023").select("*").eq("torneo","LIBERTADORESFEM").eq("añoTorneo",2024).eq("grupoCopas","A");d?console.error("Error",d):(e(c),o(!1))}catch(c){console.error("Error",c.message)}},l=async()=>{try{const{data:c,error:d}=await z.from("Equipos").select("*").eq("genero","Masculino");d?console.error("Error",d):(r(c),o(!1))}catch(c){console.error("Error",c.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(yj,{dataFixture:t,dataEquipos:n})})},x1e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(!0),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_();const h=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},k=>{g()}).subscribe(),m=z.channel("Equipos").on("postgres_changes",{event:"*",schema:"public",table:"Equipos"},k=>{E()}).subscribe(),A=()=>{document.hidden||(g(),E())};return document.addEventListener("visibilitychange",A,!1),()=>{h.unsubscribe(),m.unsubscribe(),document.removeEventListener("visibilitychange",A,!1)}},[]);const g=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","LIBERTADORESFEM").eq("añoTorneo",2024).eq("grupoCopas","B");m?console.error("Error",m):(e(h),o(!1))}catch(h){console.error("Error",h.message)}},E=async()=>{try{const{data:h,error:m}=await z.from("Equipos").select("*").eq("genero","Masculino");m?console.error("Error",m):(r(h),o(!1))}catch(h){console.error("Error",h.message)}},S=async()=>{try{const{data:h,error:m}=await z.from("CanalesTv").select("*");m?console.error("Error",m):(l(h),o(!1))}catch(h){console.error("Error",h.message)}},w=async()=>{try{const{data:h,error:m}=await z.from("Goleadores").select("*").eq("torneo","LIBERTADORESFEM");m?console.error("Error",m):d(h)}catch(h){console.error("Error",h.message)}},_=async()=>{try{const{data:h,error:m}=await z.from("Fixture2023").select("*").eq("torneo","PLAYOFFA").eq("añoTorneo",2023);m?console.error("Error",m):(f(h),o(!1))}catch(h){console.error("Error",h.message)}};return s?i("div",{className:"d-flex justify-content-center",children:i(Ee,{size:50,lineWeight:5,speed:2,color:"white"})}):i(ee,{children:i(yj,{dataFixture:t,dataEquipos:n})})},C1e=({dataEquipos:t,dataFixture:e})=>{const s=(o=>{const a=o.reduce((l,c)=>{const d=c.llavePlayOff;return l[d]||(l[d]=[]),l[d].push(c),l},{});return Object.entries(a).map(([l,c])=>({llave:l,partidos:c}))})(e||[]);return i(ae,{className:"bracket-container",children:i(ae,{className:"bracket",children:i(V,{children:p($,{children:[i("div",{className:"round semifinals",children:p("div",{className:"winners",children:[p("div",{className:"matchups",children:[i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="1"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1°A"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2°B"]})})})]},c)})},a))}),i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="2"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"1°B"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"2°A"]})})})]},c)})},a))})]}),p("div",{className:"connector",children:[i("div",{className:"merger"}),i("div",{className:"line"})]})]})}),i("div",{className:"round finals",children:i("div",{className:"winners",children:i("div",{className:"matchups",children:i("div",{className:"matchup",children:s.map((o,a)=>o.llave==="3"&&i("div",{className:"matchup",children:o.partidos.map((l,c)=>{const d=t.find(f=>f.nombre===l.equipolocal),u=t.find(f=>f.nombre===l.equipovisitante);return p("div",{className:"participants",children:[i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[d&&i("img",{src:d.escudos,alt:d.nombre,width:20,height:20,style:{marginRight:5}}),l.equipolocal!=="A conf"?l.equipolocal:"G1"]})})}),i("div",{className:"participant winner fw-bolder",children:i("div",{style:{display:"flex",justifyContent:"start"},children:p("span",{style:{fontFamily:"Roboto Condensed, sans-serif"},children:[u&&i("img",{src:u.escudos,alt:u.nombre,width:20,height:20,style:{marginRight:5}}),l.equipovisitante!=="A conf"?l.equipovisitante:"G2"]})})})]},c)})},a))})})})})]})})})})},E1e=({dataEquipos:t,dataFixture:e,canalesTvPlayoff:n})=>{var k;const[r,s]=C.useState(!0),[o,a]=C.useState([]),[l,c]=C.useState([]),[d,u]=C.useState([]),[f,g]=C.useState([]),E=e||[];C.useEffect(()=>{c(t),u(n),a(S(e)),s(!1)},[t,e]);const S=R=>{const O={};R.forEach(y=>{const v=y.faseCopas,b=y.llavePlayOff;O[v]||(O[v]={}),O[v][b]||(O[v][b]=[]),O[v][b].push(y)});const N={};return Object.keys(O).sort().forEach(y=>{N[y]={};const v=["Ida","Vuelta","Tercer partido"];Object.keys(O[y]).sort().forEach(b=>{O[y][b].sort((P,F)=>v.indexOf(P.partidoPlayOff)-v.indexOf(F.partidoPlayOff)),N[y][b]=O[y][b]})}),N},w=S(E),_=Object.fromEntries(Object.entries(w).map(([R,O])=>{const N=Object.fromEntries(Object.entries(O).map(([y,v])=>{const b=v.filter(P=>P.equipolocal!=="A conf"||P.equipovisitante!=="A conf");return[y,b]}).filter(([y,v])=>v.length>0));return[R,N]}).filter(([R,O])=>Object.keys(O).length>0)),h=(R,O)=>{m("/videos",{state:{url:R,data:O}})},m=Rt(),A=["Final","3 puesto","Semi final","Cuartos de final","Octavos de final","16avos","32avos","5 puesto","7 puesto","5 a 8 puesto","9 puesto","11 puesto","2° Fase","1° Fase"];return(k=E[0])==null||k.torneo,p(ae,{className:"anchoPlayoff",children:[Object.entries(_).sort((R,O)=>{const N=R[0],y=O[0],v=A.indexOf(N),b=A.indexOf(y);return v-b}).map(([R,O])=>i(ee,{children:p(ae,{className:" mt-1",children:[p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"18px"},children:[" ",R.toUpperCase()]}),i($,{children:Object.entries(O).map(([N,y])=>i(ee,{children:i($,{md:12,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{children:Array.isArray(y)&&y.map(v=>{var L,K,Y,te,J;const b=v.equipolocal,P=v.equipovisitante,F=v.transmision,I=Array.isArray(l)?(L=l.find(Q=>Q.nombre===b))==null?void 0:L.escudos:void 0,T=Array.isArray(l)?(K=l.find(Q=>Q.nombre===P))==null?void 0:K.escudos:void 0,q=(Y=d.find(Q=>Q.idTv===F))==null?void 0:Y.logo,W=v.hora?se(v.hora,"HH:mm:ss").format("HH:mm"):"A conf",G=f===v.id&&v.estado==="Jugandose"?"#dc3545":"white",H=f===v.id&&v.estado==="Jugandose"?"white":"black",j=se(v.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("DD/MM"),U=se(v.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("dddd").toUpperCase();return p(Fe.Fragment,{children:[v.fecha!==null?i("tr",{children:p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[U," ",j]})}):i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"FECHA Y HORA A CONFIRMAR"}),i("tr",{children:i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:v.partidoPlayOff})}),p("tr",{children:[v.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder",style:{fontSize:9,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):v.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",v.motivossuspension,")"]})]}):v.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:v.estado}):v.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Parc ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}})]}):v.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:[v.tiempodelpartido," ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}})]}):v.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[v.hora===""?i(ee,{children:"A conf"}):W," ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}}),i("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"}})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[I&&i("img",{src:I,alt:b,style:{width:"15px",height:"15px"}})," ",i("span",{style:{height:"auto"},children:b!==""?b:"A conf"})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:G,color:H,width:"auto"},children:[v.estado!=="Pendiente"?v.goleslocal:null,v.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+v.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:G,color:H},children:[v.estado!=="Pendiente"?v.golesvisitante:null,v.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+v.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[I&&i("img",{src:T,alt:P,style:{width:"15px",height:"15px"}})," ",p("span",{style:{height:"auto"},children:[" ",P!==""?P:"A conf"]})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[v.linkgoles===null||v.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(v.linkgoles,{id:v.id,estado:v.estado,equipolocal:v.equipolocal,equipovisitante:v.equipovisitante,goleslocal:v.goleslocal,penaleslocal:v.penaleslocal,penalesvisitante:v.penalesvisitante,golesvisitante:v.golesvisitante,escudoLocal:I,escudoVisitante:T,tiempodelpartido:v.tiempodelpartido,hora:W,goleadoresLocal:v.goleadoresLocal,goleadoresVisitante:v.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})}),v.linkvivo===null||v.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(v.linkvivo,{id:v.id,estado:v.estado,equipolocal:v.equipolocal,equipovisitante:v.equipovisitante,goleslocal:v.goleslocal,penaleslocal:v.penaleslocal,penalesvisitante:v.penalesvisitante,golesvisitante:v.golesvisitante,escudoLocal:I,escudoVisitante:T,tiempodelpartido:v.tiempodelpartido,hora:W,goleadoresLocal:v.goleadoresLocal,goleadoresVisitante:v.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Ns,{style:{fontSize:"12px"}})})]})})]},v.id),(v.goleadoresLocal||v.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(te=v.goleadoresLocal)==null?void 0:te.split(",").map((Q,oe)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[oe>0&&"-",Q.trim().slice(0,-1)]},oe))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(J=v.goleadoresVisitante)==null?void 0:J.split(",").map((Q,oe)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[oe>0&&"-",Q.trim().slice(0,-1)]},oe))})})]})]},v.id)})})]})})}))},R)]})})),i(V,{})]})},S1e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),{dataEquipos:u}=nr();C.useEffect(()=>{f(),g(),E(),S(),w();const _=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},h=>{S()}).subscribe();return()=>{_.unsubscribe()}},[]);const f=async()=>{try{const{data:_,error:h}=await z.from("Goleadores").select("*").eq("torneo","LIBERTADORESFEM").eq("añoGoleadores",2024);h?console.error("Error",h):e(_)}catch(_){console.error("Error",_.message)}},g=async()=>{try{const{data:_,error:h}=await z.from("Asistencias").select("*").eq("torneo","LIBERTADORESFEM").eq("añoAsistencia",2024);h?console.error("Error",h):r(_)}catch(_){console.error("Error",_.message)}},E=async()=>{try{const{data:_,error:h}=await z.from("Fixture2023").select("*").eq("torneo","FFLIBERTADORESFEM").eq("añoTorneo",2023);h?console.error("Error",h):o(_)}catch(_){console.error("Error",_.message)}},S=async()=>{try{const{data:_,error:h}=await z.from("Fixture2023").select("*").eq("torneo","FFLIBERTADORESFEM").eq("añoTorneo",2024);h?console.error("Error",h):l(_)}catch(_){console.error("Error",_.message)}},w=async()=>{try{const{data:_,error:h}=await z.from("CanalesTv").select("*");h?console.error("Error",h):d(_)}catch(_){console.error("Error",_.message)}};return p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL -COPA LIBERTADORES FEMENINA - FIXTURES - PARTIDOS"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de LA COPA LIBERTADORES FEMENINA DE Futsal , fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo mb-5",children:[i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i(Ft,{style:{marginRight:3}}),"COPA LIBERTADORES FEMENINA",i(Ft,{style:{marginLeft:3}})]})}),i(V,{children:i($,{md:12,children:i(et,{})})}),i(V,{children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"FASE FINAL"})})}),i(V,{children:i($,{className:"text-center d-flex justify-content-center mb-2 mt-2",style:{overflowY:"auto"},children:i(C1e,{dataFixture:a,dataEquipos:u})})}),i(V,{}),i(V,{children:i($,{md:12,children:i(E1e,{dataFixture:a,dataEquipos:u,canalesTvPlayoff:c})})}),i(V,{children:i($,{md:12,children:i("h6",{className:"text-white text-center fw-bolder mt-4 ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"17px"},children:"FASE DE GRUPOS"})})}),p(V,{children:[p($,{md:6,children:[i(v1e,{}),i(w1e,{})]}),p($,{md:6,children:[i(hr,{}),i(_1e,{}),i(x1e,{})]})]}),i(V,{children:i($,{md:6,className:"mb-5",children:i(Vt,{goleadores:t,dataEquipos:u})})})]})]})},A1e=({dataEquipos:t,dataFixture:e,canalesTvPlayoff:n})=>{var k;const[r,s]=C.useState(!0),[o,a]=C.useState([]),[l,c]=C.useState([]),[d,u]=C.useState([]),[f,g]=C.useState([]),E=e||[];C.useEffect(()=>{c(t),u(n),a(S(e)),s(!1)},[t,e]);const S=R=>{const O={};R.forEach(y=>{const v=y.faseCopas,b=y.llavePlayOff;O[v]||(O[v]={}),O[v][b]||(O[v][b]=[]),O[v][b].push(y)});const N={};return Object.keys(O).sort().forEach(y=>{N[y]={};const v=["Ida","Vuelta","Tercer partido"];Object.keys(O[y]).sort().forEach(b=>{O[y][b].sort((P,F)=>v.indexOf(P.partidoPlayOff)-v.indexOf(F.partidoPlayOff)),N[y][b]=O[y][b]})}),N},w=S(E),_=Object.fromEntries(Object.entries(w).map(([R,O])=>{const N=Object.fromEntries(Object.entries(O).map(([y,v])=>{const b=v.filter(P=>P.equipolocal!=="A conf"||P.equipovisitante!=="A conf");return[y,b]}).filter(([y,v])=>v.length>0));return[R,N]}).filter(([R,O])=>Object.keys(O).length>0)),h=(R,O)=>{m("/videos",{state:{url:R,data:O}})},m=Rt(),A=["Final","3 puesto","Semi final","Cuartos de final","Octavos de final","16avos","32avos","5 puesto","7 puesto","5 a 8 puesto","9 puesto","11 puesto","6° Fase","5° Fase","4° Fase","3° Fase","2° Fase","1° Fase"];return(k=E[0])==null||k.torneo,p(ae,{className:"anchoPlayoff",children:[Object.entries(_).sort((R,O)=>{const N=R[0],y=O[0],v=A.indexOf(N),b=A.indexOf(y);return v-b}).map(([R,O])=>i(ee,{children:p(ae,{className:" mt-1",children:[p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"18px"},children:[" ",R.toUpperCase()]}),i($,{children:Object.entries(O).map(([N,y])=>i(ee,{children:i($,{md:12,children:p(Ie,{bordered:!0,className:"border border-dark",size:"sm",responsive:"sm",style:{tableLayout:"fixed"},children:[i("thead",{style:{color:"transparent",borderColor:"transparent"},children:p("tr",{children:[i("th",{style:{width:"14%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"9%"}}),i("th",{style:{width:"27%"}}),i("th",{style:{width:"10%"}})]})}),i("tbody",{children:Array.isArray(y)&&y.map(v=>{var L,K,Y,te,J;const b=v.equipolocal,P=v.equipovisitante,F=v.transmision,I=Array.isArray(l)?(L=l.find(Q=>Q.nombre===b))==null?void 0:L.escudos:void 0,T=Array.isArray(l)?(K=l.find(Q=>Q.nombre===P))==null?void 0:K.escudos:void 0,q=(Y=d.find(Q=>Q.idTv===F))==null?void 0:Y.logo,W=v.hora?se(v.hora,"HH:mm:ss").format("HH:mm"):"A conf",G=f===v.id&&v.estado==="Jugandose"?"#dc3545":"white",H=f===v.id&&v.estado==="Jugandose"?"white":"black",j=se(v.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("DD/MM"),U=se(v.fecha,"YYYY-MM-DDTHH:mm:ss.sssZ").format("dddd").toUpperCase();return p(Fe.Fragment,{children:[v.fecha!==null?i("tr",{children:p("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:[U," ",j]})}):i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"FECHA Y HORA A CONFIRMAR"}),i("tr",{children:i("td",{colSpan:"6",className:"text-center text-white fw-bolder",style:{fontSize:11,backgroundColor:"#333333",fontFamily:"Roboto Condensed, sans-serif"},children:v.partidoPlayOff})}),p("tr",{children:[v.estado==="Finalizado"?i("td",{className:"text-center text-white fw-bolder",style:{fontSize:9,backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif"},children:"Final"}):v.estado==="Suspendido"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Susp",p("span",{style:{fontSize:8,display:"flex",justifyContent:"center"},children:["(",v.motivossuspension,")"]})]}):v.estado==="Postergado"?i("td",{className:"text-center bg-warning text-black fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:v.estado}):v.estado==="Parcial"?p("td",{className:"text-center text-white fw-bolder bg-secondary",style:{fontSize:12,fontFamily:"Roboto Condensed, sans-serif"},children:["Parc ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}})]}):v.estado==="Jugandose"?p("td",{className:"text-center bg-danger text-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif"},children:[v.tiempodelpartido," ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}})]}):v.estado==="Pendiente"?p("td",{className:"text-center text-black fw-bolder",style:{fontSize:11,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:[v.hora===""?i(ee,{children:"A conf"}):W," ",q&&i("img",{src:q,alt:F,style:{width:"20px",height:"20px"}}),i("div",{style:{fontSize:8,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"}})]}):null,p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[I&&i("img",{src:I,alt:b,style:{width:"15px",height:"15px"}})," ",i("span",{style:{height:"auto"},children:b!==""?b:"A conf"})]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:G,color:H,width:"auto"},children:[v.estado!=="Pendiente"?v.goleslocal:null,v.penaleslocal!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+v.penaleslocal+")"}):null]}),p("td",{className:"text-center fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:G,color:H},children:[v.estado!=="Pendiente"?v.golesvisitante:null,v.penalesvisitante!==null?i("span",{className:"fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif"},children:" ("+v.penalesvisitante+")"}):null]}),p("td",{className:"bg-white fw-bolder",style:{fontSize:13,fontFamily:"Roboto Condensed, sans-serif",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[I&&i("img",{src:T,alt:P,style:{width:"15px",height:"15px"}})," ",p("span",{style:{height:"auto"},children:[" ",P!==""?P:"A conf"]})]}),i("td",{className:" text-center fw-bolder",style:{fontSize:10,fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#dfe3e5"},children:p("div",{className:"d-flex justify-content-center",children:[v.linkgoles===null||v.linkgoles===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(v.linkgoles,{id:v.id,estado:v.estado,equipolocal:v.equipolocal,equipovisitante:v.equipovisitante,goleslocal:v.goleslocal,penaleslocal:v.penaleslocal,penalesvisitante:v.penalesvisitante,golesvisitante:v.golesvisitante,escudoLocal:I,escudoVisitante:T,tiempodelpartido:v.tiempodelpartido,hora:W,goleadoresLocal:v.goleadoresLocal,goleadoresVisitante:v.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Tt,{style:{fontSize:"12px",color:"black"}})}),v.linkvivo===null||v.linkvivo===""?null:i("a",{style:{cursor:"pointer"},onClick:()=>{h(v.linkvivo,{id:v.id,estado:v.estado,equipolocal:v.equipolocal,equipovisitante:v.equipovisitante,goleslocal:v.goleslocal,penaleslocal:v.penaleslocal,penalesvisitante:v.penalesvisitante,golesvisitante:v.golesvisitante,escudoLocal:I,escudoVisitante:T,tiempodelpartido:v.tiempodelpartido,hora:W,goleadoresLocal:v.goleadoresLocal,goleadoresVisitante:v.goleadoresVisitante}),window.scrollTo({top:0,behavior:"smooth"})},className:"text-white",children:i(Ns,{style:{fontSize:"12px"}})})]})})]},v.id),(v.goleadoresLocal||v.goleadoresVisitante)&&p("tr",{children:[i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(te=v.goleadoresLocal)==null?void 0:te.split(",").map((Q,oe)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[oe>0&&"-",Q.trim().slice(0,-1)]},oe))})}),i("td",{className:"bg-white border border-dark fw-bolder",colSpan:"3",style:{textAlign:"left",borderSpacing:0},children:i("div",{style:{display:"flex",flexDirection:"row",justifyContent:"start",flexWrap:"wrap",textAlign:"left",borderSpacing:0},children:(J=v.goleadoresVisitante)==null?void 0:J.split(",").map((Q,oe)=>p("div",{style:{margin:"0 2px",fontFamily:"Roboto Condensed, sans-serif",fontSize:10},children:[oe>0&&"-",Q.trim().slice(0,-1)]},oe))})})]})]},v.id)})})]})})}))},R)]})})),i(V,{})]})},N1e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState([]),[a,l]=C.useState([]),[c,d]=C.useState([]),[u,f]=C.useState([]);C.useEffect(()=>{g(),E(),S(),w(),_(),h();const m=z.channel("Fixture2023").on("postgres_changes",{event:"*",schema:"public",table:"Fixture2023"},A=>{_()}).subscribe();return()=>{m.unsubscribe()}},[]);const g=async()=>{try{const{data:m,error:A}=await z.from("Goleadores").select("*").eq("torneo","COPAARGENTINAFEM").eq("añoGoleadores",2024);A?console.error("Error",A):e(m)}catch(m){console.error("Error",m.message)}},E=async()=>{try{const{data:m,error:A}=await z.from("Equipos").select("*");A?console.error("Error",A):r(m)}catch(m){console.error("Error",m.message)}},S=async()=>{try{const{data:m,error:A}=await z.from("Asistencias").select("*").eq("torneo","COPAARGENTINAFEM").eq("añoAsistencia",2024);A?console.error("Error",A):o(m)}catch(m){console.error("Error",m.message)}},w=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").eq("torneo","COPAARGENTINAFEM").eq("añoTorneo",2023);A?console.error("Error",A):l(m)}catch(m){console.error("Error",m.message)}},_=async()=>{try{const{data:m,error:A}=await z.from("Fixture2023").select("*").eq("torneo","COPAARGENTINAFEM").eq("añoTorneo",2024).order("fecha",{ascending:!1});A?console.error("Error",A):d(m)}catch(m){console.error("Error",m.message)}},h=async()=>{try{const{data:m,error:A}=await z.from("CanalesTv").select("*");A?console.error("Error",A):f(m)}catch(m){console.error("Error",m.message)}};return p(ee,{children:[p(Xe,{children:[i("title",{children:"SEGUNDOPALO - FUTSAL -COPA ARGENTINA FEMENINA - FIXTURES - PARTIDOS"}),i("meta",{name:"description",content:"Obtén toda la información actualizada del torneo de LA COPA ARGENTINA DE Futsal AFA , fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:" tamañoTorneo mb-5",children:[i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginRight:3}}),"COPA ARGENTINA FEMENINA",i("img",{src:"https://flagcdn.com/w20/ar.png",srcSet:"https://flagcdn.com/w40/ar.png 2x",width:"20",alt:"Argentina",style:{marginLeft:3}})]})}),i(V,{children:i($,{md:12,children:i(et,{})})}),i(V,{}),i(V,{children:i($,{md:12,children:i(A1e,{dataFixture:c,dataEquipos:n,canalesTvPlayoff:u})})}),i(V,{children:i($,{md:6,className:"mb-5",children:i(Vt,{goleadores:t,dataEquipos:n})})})]})]})},R1e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState([]),[s,o]=C.useState(""),[a,l]=C.useState(null),[c,d]=C.useState("");C.useEffect(()=>{u()},[]);const u=async()=>{const{data:S,error:w}=await z.from("rankings_selecciones").select("*");w?(console.error(w),l("Error al cargar los datos")):(e(S),r(S.filter(_=>_.genero==="masculino")))};return p(ee,{children:[p(Xe,{children:[i("title",{children:" SEGUNDOPALO - Futsal AFA FIFA - Ranking selecciones Fifa -Masculino - Femenino - Fixture completo con tabla de posiciones"}),i("meta",{name:"description",content:"Ranking de selecciones futsal FIFA -Obtén toda la información actualizada del torneo de Futsal AFA Primera A, B, C, D : tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:"tamañoTorneo mb-5",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i(Ft,{style:{marginRight:3}}),"RANKING MUNDIAL DE SELECCIONES FIFA",i(Ft,{style:{marginLeft:3}})]})})}),i(V,{children:i($,{className:"",children:i(et,{})})}),a&&i(V,{children:i($,{children:i(NI,{variant:"danger",children:a})})}),i(V,{children:i($,{children:i("h6",{style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:12,color:"white"},children:"Última actualización 11 octubre 2024."})})}),i(V,{className:"mb-4",children:p($,{children:[i(Qe,{style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:s==="masculino"?"#001c31":"white",color:s==="masculino"?"#fff":"#001c31",borderColor:"#001c31"},className:s==="masculino"?"fw-bold":"",onClick:()=>{const S=t.filter(w=>w.genero==="masculino").sort((w,_)=>_.points-w.points);r(S),o("masculino")},children:"Masculino"})," ",i(Qe,{style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:s==="femenino"?"#350070":"white",color:s==="femenino"?"#fff":"#350070",borderColor:"#350070"},className:s==="femenino"?"fw-bold":"",onClick:()=>{const S=t.filter(w=>w.genero==="femenino").sort((w,_)=>_.points-w.points);r(S),o("femenino")},children:"Femenino"})]})}),i(V,{children:i($,{children:i("input",{type:"text",placeholder:"Buscar equipo",value:c,onChange:S=>{d(S.target.value);const _=t.filter(h=>h.genero===s).filter(h=>h.team.toLowerCase().includes(S.target.value.toLowerCase()));r(_)},className:"form-control mb-3"})})}),i(V,{children:i($,{children:p(Ie,{bordered:!0,responsive:!0,size:"sm",children:[i("thead",{style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:p("tr",{className:"text-white text-center",children:[i("th",{style:{width:"10%"},children:"Posición"}),i("th",{style:{width:"30%"},children:"Equipo"}),i("th",{style:{width:"25%"},children:"Puntos"})]})}),i("tbody",{children:n.length>0?n.map(S=>p("tr",{children:[i("td",{className:"text-dark text-center fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:S.position}),p("td",{className:"text-dark text-center fw-bolder bordered",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12,display:"flex",justifyContent:"start",alignItems:"center",padding:"8px",height:"32px"},children:[i("img",{src:`https://flagcdn.com/w20/${S.countryCode.toLowerCase()}.png`,alt:`Bandera de ${S.team}`,className:"me-2",style:{width:25,height:19},onError:w=>w.target.src="/path_to_default_flag.png"}),S.team]}),i("td",{className:"text-dark text-center fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:S.points})]},S.id)):i("tr",{children:i("td",{colSpan:"4",className:"text-center",children:"No hay datos disponibles."})})})]})})})]})]})},P1e="/assets/contenidoFifa-f6d2582f.png",O1e={Brasil:"br",España:"es","Estados Unidos":"us","Países Bajos":"nl",Italia:"it",Rusia:"ru",Argentina:"ar",Irán:"ir",Portugal:"pt",Bélgica:"be",Ucrania:"ua","China Taipéi":"tw",Guatemala:"gt","Hong Kong":"hk",Tailandia:"th",Colombia:"co",Kazajistán:"kz",Lituania:"lt",Uzbekistán:"uz",Francia:"fr"},F1e=()=>{const[t,e]=C.useState([]),[n,r]=C.useState(null),[s,o]=C.useState(!1),[a,l]=C.useState("");C.useEffect(()=>{c()},[]);const c=async()=>{const{data:_,error:h}=await z.from("historial_campeones_mundiales").select("*").order("anio",{ascending:!0});h?(console.error(h),r("Error al cargar los datos")):e(_)},d=_=>{const h=O1e[_];return h?`https://flagcdn.com/w20/${h}.png`:null},u=t.reduce((_,h)=>(h.campeon&&(_[h.campeon]||(_[h.campeon]={count:0,years:[]}),_[h.campeon].count+=1,_[h.campeon].years.push(h.anio)),_),{}),f=_=>{const h=u[_];return h?`${h.count} (${h.years.join(", ")})`:"0"},g=t.reduce((_,h)=>(h.subcampeon&&(_[h.subcampeon]||(_[h.subcampeon]={count:0,years:[]}),_[h.subcampeon].count+=1,_[h.subcampeon].years.push(h.anio)),_),{}),E=_=>{const h=g[_];return h?`${h.count} (${h.years.join(", ")})`:"0"},S=_=>{l(_),o(!0)},w=()=>{o(!1),l("")};return p(ee,{children:[p(Xe,{children:[i("title",{children:" SEGUNDOPALO - Futsal AFA FIFA - Historial campeones mundiales selecciones Fifa -Masculino - Fixture completo con tabla de posiciones"}),i("meta",{name:"description",content:"Historial campeones mundiales selecciones futsal FIFA -Obtén toda la información actualizada del torneo de Futsal AFA Primera A, B, C, D : tabla de posiciones, fixture completo con horarios, días y fechas de los partidos. Mantente al tanto de la posición de tu equipo y no te pierdas ningún partido. ¡Entra ya y sigue de cerca el torneo más emocionante de Futsal en Argentina!"})]}),p(ae,{className:"tamañoTorneo mb-5",children:[i(V,{children:i($,{md:12,children:p("h1",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"20px"},children:[i(Ft,{style:{marginRight:3}}),"CAMPEONES MUNDIALES",i(Ft,{style:{marginLeft:3}})]})})}),i(V,{children:i($,{className:"",children:i(et,{})})}),n&&i(V,{children:i($,{children:i(NI,{variant:"danger",children:n})})}),i(V,{children:i($,{children:p(Ie,{bordered:!0,responsive:!0,size:"sm",children:[i("thead",{style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:12,textAlign:"center",whiteSpace:"nowrap"},children:p("tr",{className:"text-white text-center",children:[i("th",{style:{width:"auto"},children:"Año"}),i("th",{style:{width:"auto"},children:"Sede"}),i("th",{style:{width:"auto"},children:"Campeón"}),i("th",{style:{width:"auto"},children:"Resultado Final"}),i("th",{style:{width:"auto"},children:"Subcampeón"}),i("th",{style:{width:"auto"},children:"Tercer Lugar"}),i("th",{style:{width:"auto"},children:"Resultado Tercer Lugar"}),i("th",{style:{width:"auto"},children:"Cuarto Lugar"})]})}),i("tbody",{children:t.length>0?t.map(_=>p("tr",{children:[i("td",{className:"text-dark text-center fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:_.anio}),i("td",{className:"text-dark text-start fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:p("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",flexDirection:"column"},children:[d(_.sede)&&i("img",{src:d(_.sede),alt:`Bandera de ${_.sede}`,className:"me-2",width:17}),_.sede]})}),i("td",{className:"text-dark fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:p("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",flexDirection:"column"},children:[d(_.campeon)&&i("img",{src:d(_.campeon),alt:`Bandera de ${_.campeon}`,className:"me-2",width:17}),_.campeon]})}),p("td",{className:"text-dark text-center fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:[_.finalresultado,"-",_.linkPartido&&i(Ya,{style:{fontSize:"19px",color:"red",cursor:"pointer"},onClick:()=>S(_.linkPartido)})]}),i("td",{className:"text-dark text-start fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:p("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",flexDirection:"column"},children:[d(_.subcampeon)&&i("img",{src:d(_.subcampeon),alt:`Bandera de ${_.subcampeon}`,className:"me-2",width:17}),_.subcampeon]})}),i("td",{className:"text-dark text-start fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:p("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",flexDirection:"column"},children:[d(_.tercerlugar)&&i("img",{src:d(_.tercerlugar),alt:`Bandera de ${_.tercerlugar}`,className:"me-2",width:17}),_.tercerlugar]})}),i("td",{className:"text-dark text-center fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:_.resultadotercerlugar}),i("td",{className:"text-dark text-start fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:p("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",flexDirection:"column"},children:[d(_.cuartolugar)&&i("img",{src:d(_.cuartolugar),alt:`Bandera de ${_.cuartolugar}`,className:"me-2",width:17}),_.cuartolugar]})})]},_.id)):i("tr",{children:i("td",{colSpan:"8",className:"text-center",children:"No hay datos disponibles."})})})]})})}),i(V,{children:i($,{className:"",children:i(et,{})})}),p(V,{children:[p($,{md:6,children:[i("h6",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"15px"},children:"ESTADISTICAS CAMPEONES"}),p(Ie,{bordered:!0,responsive:!0,size:"sm",children:[i("thead",{style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:12,textAlign:"center",whiteSpace:"nowrap"},children:p("tr",{className:"text-white text-center",children:[i("th",{style:{width:"auto"},children:"País"}),i("th",{style:{width:"auto"},children:"Cantidad de títulos"})]})}),i("tbody",{children:Object.keys(u).length>0?Object.keys(u).map(_=>p("tr",{children:[i("td",{className:"text-dark text-start fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:p("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",flexDirection:"column"},children:[d(_)&&i("img",{src:d(_),alt:`Bandera de ${_}`,className:"me-2",width:17}),_]})}),i("td",{className:"text-dark text-center fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:f(_)})]},_)):i("tr",{children:i("td",{colSpan:"2",className:"text-center",children:"No hay datos disponibles."})})})]})]}),p($,{md:6,children:[i("h6",{className:"text-white text-center fw-bolder ",style:{fontFamily:"Roboto Condensed, sans-serif",backgroundColor:"#001c31",fontSize:"15px"},children:"ESTADISTICAS SUB-CAMPEONES"}),p(Ie,{bordered:!0,responsive:!0,size:"sm",children:[i("thead",{style:{backgroundColor:"#001c31",fontFamily:"Roboto Condensed, sans-serif",fontSize:12,textAlign:"center",whiteSpace:"nowrap"},children:p("tr",{className:"text-white text-center",children:[i("th",{style:{width:"auto"},children:"País"}),i("th",{style:{width:"auto"},children:"Cantidad de subcampeonatos"})]})}),i("tbody",{children:Object.keys(g).length>0?Object.keys(g).map(_=>p("tr",{children:[i("td",{className:"text-dark text-start fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:p("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",flexDirection:"column"},children:[d(_)&&i("img",{src:d(_),alt:`Bandera de ${_}`,className:"me-2",width:17}),_]})}),i("td",{className:"text-dark text-center fw-bolder",style:{backgroundColor:"white",fontFamily:"Roboto Condensed, sans-serif",fontSize:12},children:E(_)})]},_)):i("tr",{children:i("td",{colSpan:"2",className:"text-center",children:"No hay datos disponibles."})})})]})]})]}),p(Ut,{show:s,onHide:w,size:"md",centered:!0,children:[i(Ut.Header,{closeButton:!0,style:{backgroundColor:"#001c31"},children:i(Ut.Title,{className:"text-white",children:"Highlights"})}),i(Ut.Body,{children:p("div",{style:{textAlign:"center"},children:[i("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:i("img",{src:P1e,alt:"Ver Partido",style:{width:"100%",cursor:"pointer"}})}),i("p",{children:"Haz clic en la imagen para ver el partido en YouTube"})]})}),i(Ut.Footer,{style:{backgroundColor:"#001c31"},children:i(Qe,{variant:"secondary",onClick:w,children:"Cerrar"})})]})]})]})},D1e="/assets/500footer-102c891e.png",k1e="/assets/1000footer-a1cc698d.png",T1e="/assets/3000footer-6ad6cee5.png",I1e="/assets/5000footer-f2f6ba62.png",M1e="/assets/footerCalse-fae30852.gif",L1e=[{img:D1e,href:"https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_plan_id=2c9380848e681d84018e773f963407dd"},{img:k1e,href:"https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_plan_id=2c9380848e681dc9018e6b4b0ff80123"},{img:T1e,href:"https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_plan_id=2c9380848e681dc9018e77401cba0826"},{img:I1e,href:"https://www.mercadopago.com.ar/subscriptions/checkout?preapproval_plan_id=2c93808491eb5f1c019202d616420742"},{img:Ahe,href:"https://www.segundopalo.com.ar/sumatesp?utm_source=segundopalosumatepopupfooter&utm_medium=segundopalosumatepopupfooter&utm_campaign=segundopalosumatepopupfooter&utm_id=2&utm_term=segundopalosumatepopupfooter&utm_content=segundopalosumatepopupfooter"}],z1e=()=>{const[t,e]=C.useState(!1),[n,r]=C.useState(!1),[s,o]=C.useState(0),[a,l]=C.useState(!0);return C.useEffect(()=>{const c=localStorage.getItem("footerBannerIndex");c!==null&&o(parseInt(c,10))},[]),C.useEffect(()=>{const c=(s+1)%L1e.length;localStorage.setItem("footerBannerIndex",c)},[s]),C.useEffect(()=>{window.location.pathname==="/premiossegundopalo"&&l(!1)},[]),C.useEffect(()=>{if(!a||n)return;const c=setTimeout(()=>{e(!0)},6e3);return()=>{clearTimeout(c)}},[n,a]),!t||!a?null:i(ee,{children:t&&i("div",{className:"",style:{position:"fixed",bottom:"45px",left:"50%",transform:"translateX(-50%)",backgroundColor:"transparent",padding:"10px",borderRadius:"5px",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)",zIndex:"1000",display:"flex",justifyContent:"center",alignItems:"center"},children:p("div",{style:{position:"relative"},children:[i("a",{href:"https://www.calse.com.ar/?utm_source=segundopalotraficpopup&utm_medium=segundopalotraficpopup&utm_campaign=segundopalotraficpopup&utm_id=1&utm_term=segundopalotraficpopup&utm_content=segundopalotraficpopup",rel:"noopener noreferrer",children:i("img",{src:M1e,alt:"Suscripción",style:{width:"auto",height:"auto",boxShadow:"0px 0px 10px rgba(255,255,255,0.8)"}})}),i("button",{onClick:()=>{e(!1),r(!0)},style:{position:"absolute",right:"-10px",top:"-10px",backgroundColor:"transparent",border:"none",fontSize:"16px",cursor:"pointer"},children:i(Nhe,{style:{fontSize:"35px",color:"#001c31",backgroundColor:"white",borderRadius:"15px"}})})]})})})},q1e="/assets/fondoSPPremios1-9794764c.jpg",j1e="/assets/nominados0-7d0fd3a0.png",$1e="/assets/nominados1-131d3695.png",B1e="/assets/nominados2-d91c5068.png",jD="/assets/logoMarplast-2a9699ff.png",U1e=()=>{const[t,e]=C.useState(!1);C.useState(!1);const n=s=>{document.getElementById(s).scrollIntoView({behavior:"smooth"})},r=()=>e(!1);return C.useEffect(()=>(document.body.classList.add("premios-page"),()=>{document.body.classList.remove("premios-page")}),[]),C.useEffect(()=>{const s=document.querySelectorAll(".section"),o=new IntersectionObserver((a,l)=>{a.forEach(c=>{c.isIntersecting&&(c.target.classList.add("animate-slide-in"),l.unobserve(c.target))})},{threshold:.1});return s.forEach(a=>{o.observe(a)}),()=>{s.forEach(a=>o.unobserve(a))}},[]),p(ee,{children:[p(Xe,{children:[i("title",{children:"Premios Futuro - Segundo Palo"}),i("meta",{name:"description",content:`Premios Futuro - Segundo Palo -\r Los Premios Futuro son un reconocimiento a los jugadores sub-21 del futsal argentino que se destacan por su talento, compromiso y dedicación. En esta primera edición, celebramos a los jóvenes que representan el futuro de nuestro deporte y que, con su esfuerzo y pasión, inspiran a muchos a seguir sus pasos.`})]}),p(mo,{expand:"lg",expanded:t,className:"custom-navbar navPremiosHeader",variant:"",children:[i(mo.Brand,{href:"#home",className:"brand-logo",children:i("a",{href:"https://www.marplast.com.ar/",target:"_blank",rel:"noopener noreferrer",children:i("img",{src:jD,alt:"Logo Futuro",className:"img-fluid",style:{width:"100px",height:"auto"}})})}),i(mo.Toggle,{"aria-controls":"basic-navbar-nav",onClick:()=>{const s=document.querySelector("#basic-navbar-nav");t?(s.classList.add("collapsing-menu"),setTimeout(()=>{e(!1),s.classList.remove("collapsing-menu")},200)):e(!0)},children:t?i(Mve,{className:"icon-close animated-menu"}):i(_ve,{className:"icon-menu "})}),i(mo.Collapse,{id:"basic-navbar-nav",className:`justify-content-between ${t?"show-menu animated-menu":""}`,in:t,children:p(ul,{className:"ml-auto navPremios align-items-center",style:{fontFamily:"poppins",fontWeight:200},children:[i(ul.Link,{href:"#nominados",onClick:r,style:{fontSize:"16px"},children:"NOMINADOS 2024"}),i(ul.Link,{href:"#sobrepremios",onClick:r,style:{fontSize:"16px"},children:"SOBRE LOS PREMIOS"}),i(ul.Link,{href:"#votacion",onClick:r,style:{fontSize:"16px"},children:"VOTACIÓN"}),i(ul.Link,{href:"#expertos",onClick:r,style:{fontSize:"16px"},children:"EXPERTOS"}),i(ul.Link,{href:"/",onClick:r,style:{fontSize:"16px"},children:"VOLVER A SP"}),p("div",{className:"social-icons",children:[i("a",{href:"https://www.instagram.com/segundopalo_ok/",target:"_blank",rel:"noopener noreferrer",children:i(VW,{className:"icon"})}),i("a",{href:"https://x.com/segundopalo_ok",target:"_blank",rel:"noopener noreferrer",children:i(whe,{className:"icon"})}),i("a",{href:"mailto:info@segundopalo.com.ar",children:i(xhe,{className:"icon"})})]}),i("a",{href:"https://www.marplast.com.ar/",target:"_blank",rel:"noopener noreferrer",children:i("img",{src:jD,alt:"Logo Futuro",className:"img-fluid",style:{width:"100px",height:"auto"}})})]})})]}),p("section",{id:"home",className:"section section-home ",children:[i("div",{className:"container animated-img",children:i("img",{src:q1e,alt:"Prueba Jugador",className:"img-fluid "})}),i("div",{className:"scroll-down flechaHover ",onClick:()=>n("nominados"),children:i(Che,{className:"icon-down ",style:{fontSize:"80px",color:"white"}})})]}),i("section",{className:"section section-bienvenida animated-p ",style:{fontFamily:"poppins",fontWeight:200},children:p("div",{className:"container",children:[p("h2",{className:"fw-bolder mb-5",children:["Bienvenidos/as ",i("br",{}),"a los Premios FUTURO"]}),i("div",{className:"parrafoBienvenida hoverTitulos",children:i("p",{className:"",style:{textAlign:"start"},children:"Los Premios Futuro son un reconocimiento a los jugadores sub-21 del futsal argentino que se destacan por su talento, compromiso y dedicación. En esta primera edición, celebramos a los jóvenes que representan el futuro de nuestro deporte y que, con su esfuerzo y pasión, inspiran a muchos a seguir sus pasos."})})]})}),i("section",{id:"nominados",className:"section section-nominados ",style:{fontFamily:"poppins",fontWeight:200},children:i("div",{className:"container animated-img",children:p(_m,{controls:!0,indicators:!0,interval:12e3,pause:!0,className:"carousel-fotos animated-img",children:[i(_m.Item,{children:i("img",{className:"d-block ",src:j1e,alt:"Nominado 0",style:{cursor:"pointer",width:"100%",height:"auto"}})}),i(_m.Item,{children:i("img",{className:"d-block ",src:$1e,alt:"Nominado 1",style:{cursor:"pointer",width:"100%",height:"auto"}})}),i(_m.Item,{children:i("img",{className:"d-block ",src:B1e,alt:"Nominado 2",style:{cursor:"pointer",width:"100%",height:"auto"}})})]})})}),i("section",{id:"sobrepremios",className:"section section-historia animated-p ",style:{fontFamily:"poppins",fontWeight:200},children:p("div",{className:"container",children:[i("h2",{className:"fw-bolder mb-5 hoverTitulos ",children:"SOBRE LOS PREMIOS"}),i("div",{className:"parrafoBienvenida hoverTitulos .animated-p ",children:i("p",{className:"centered .animated-p ",style:{textAlign:"start"},children:"En el año 2024, damos inicio a la primera edición de los Premios Futuro, un reconocimiento pensado para destacar a los jugadores sub-21 del futsal argentino que se encuentran en pleno proceso de formación profesional. Estos premios buscan no solo resaltar el esfuerzo y dedicación de los jóvenes talentos, sino también visibilizar a las promesas que representan el futuro de nuestro deporte."})}),i("div",{className:"parrafoBienvenida hoverTitulos",children:i("p",{className:"centered mt-5",style:{textAlign:"start"},children:"El futsal es una disciplina que sigue creciendo y desarrollándose en nuestro país, y es vital ofrecer un espacio para que los jugadores más jóvenes reciban el reconocimiento que merecen por su entrega y su compromiso con la profesionalización del deporte."})}),i("div",{className:"parrafoBienvenida hoverTitulos",children:i("p",{className:"centered mt-5",style:{textAlign:"start"},children:"El Premio Futuro tiene como objetivo visibilizar y premiar a aquellos jugadores que, además de destacar por su rendimiento, demuestran talento, fair play, y un profundo compromiso con su crecimiento profesional a lo largo de todo el año."})}),i("div",{className:"parrafoBienvenida hoverTitulos",children:i("p",{className:"centered mt-5",style:{textAlign:"start"},children:"En esta primera edición, hemos decidido enfocarnos en el género masculino, lo que nos permitirá evaluar el impacto del premio y sentar las bases para futuras ediciones. Creemos firmemente que este reconocimiento contribuirá a la motivación y desarrollo de muchos jóvenes que ven en el futsal una oportunidad de crecimiento tanto dentro como fuera de la cancha."})})]})}),i("section",{id:"votacion",className:"section section-historia mt-5 animated-p ",style:{fontFamily:"poppins",fontWeight:200},children:p("div",{className:"container",children:[p("h2",{className:"fw-bolder mb-5 hoverTitulos",children:["SISTEMA DE VOTACIÓN ",i("br",{}),"Premios Futuro"]}),i("div",{className:"parrafoBienvenida hoverTitulos",children:i("p",{className:"centered",style:{textAlign:"start"},children:"El Premio Futuro será decidido a través de un riguroso sistema de votación. Primero, SegundoPalo confecciona una lista de 21 jugadores sub-21 nominados por su desempeño, rendimiento individual, compromiso con el profesionalismo y fair play a lo largo del año. Luego, un panel de expertos compuesto por periodistas, jugadores, técnicos y exjugadores votará para seleccionar a los 5 mejores jugadores."})}),i("div",{className:"parrafoBienvenida hoverTitulos",children:i("p",{className:"centered mt-5",children:"Cada experto asignará un total de 15 puntos, distribuidos así: 5 puntos al primer lugar, 4 al segundo, 3 al tercero, 2 al cuarto y 1 al quinto. El jugador con más puntos será el ganador del Premio Futuro."})})]})}),i("section",{id:"expertos",className:"section section-expertos mt-5 animated-p ",style:{fontFamily:"poppins",fontWeight:200},children:p("div",{className:"container",children:[i("h2",{className:"fw-bolder mb-5 hoverTitulos",children:" PANEL DE EXPERTOS"}),i("div",{className:"parrafoBienvenida hoverTitulos",children:i("p",{className:"centered",style:{textAlign:"start"},children:"El panel de expertos encargado de la votación ha sido cuidadosamente conformado por SegundoPalo y está compuesto por medios reconocidos en el ambiente del futsal, periodistas altamente capacitados, así como técnicos, jugadores y exjugadores con una amplia trayectoria en la disciplina. Todos los integrantes han sido seleccionados por su profundo conocimiento y experiencia, asegurando una votación justa y representativa del talento joven en el futsal argentino."})}),i("div",{className:"parrafoBienvenida hoverTitulos",children:i("p",{className:"centered mt-5 fw-bolder ",style:{fontSize:"20px"},children:'En futuras ediciones, incorporaremos más medios y especialistas a la votación, incluyendo la categoría femenina y el galardón principal para mayores, "Suela de Oro", a partir de 2025.'})})]})}),i("footer",{className:"footer",children:i("div",{className:"container",children:i("p",{className:"text-center",style:{fontFamily:"poppins",fontWeight:500},children:"© 2024 SegundoPalo - Todos los derechos reservados"})})})]})},Y1e="/assets/videoFuturo-72f63509.mp4",H1e="/assets/videoFuturoVertical-6b1a1ac5.mp4",G1e=()=>{const[t,e]=C.useState(!1),n=Rt();return C.useEffect(()=>{const s=window.matchMedia("(max-width: 768px)");e(s.matches);const o=()=>{e(s.matches)};return s.addEventListener("change",o),()=>{s.removeEventListener("change",o)}},[]),C.useEffect(()=>(document.body.classList.add("premios-page-inicio"),()=>{document.body.classList.remove("premios-page-inicio")}),[]),i("div",{className:"video-container-futuro",onClick:()=>{n("/premiossegundopalo")},style:{cursor:"pointer"},children:i(kE,{url:t?H1e:Y1e,className:"react-player-futuro",playing:!0,loop:!0,muted:!0,controls:!1,width:"100%",height:"100%"})})};function W1e(){const t=Ss(),e=t.pathname.startsWith("/futuro"),n=t.pathname.startsWith("/formulariofuturo"),r=t.pathname.startsWith("/loginfuturo"),s=t.pathname.startsWith("/afa"),o=t.pathname.startsWith("/zocalotv"),a=t.pathname.startsWith("/marcadorsp"),l=t.pathname.startsWith("/premiossegundopalo"),c=t.pathname.startsWith("/iniciopremios");return p(ee,{children:[!e&&!n&&!r&&!s&&!o&&!a&&!l&&!c&&i(BK,{}),!e&&!n&&!r&&!s&&!o&&!a&&!l&&!c&&i(FH,{})]})}function V1e(){const[t,e]=C.useState(null);C.useEffect(()=>{const o=a=>{a.preventDefault(),e(a),console.log("beforeinstallprompt event triggered")};return window.addEventListener("beforeinstallprompt",o),()=>{window.removeEventListener("beforeinstallprompt",o)}},[]);const n=()=>{t&&(t.prompt(),t.userChoice.then(o=>{o.outcome==="accepted"?console.log("Usuario aceptó la instalación"):console.log("Usuario rechazó la instalación"),e(null)}))},[r,s]=C.useState(!1);return C.useEffect(()=>{const o=localStorage.getItem("instagramModalShown"),a=localStorage.getItem("instagramModalShownDate"),l=new Date;(!o||!a||(d=>{const u=new Date(d);return l-u>24*60*60*1e3})(a))&&(s(!0),localStorage.setItem("instagramModalShown","true"),localStorage.setItem("instagramModalShownDate",l.toISOString()))},[]),p("div",{className:"App",children:[i("div",{children:t&&i(ee,{children:i("div",{className:"d-flex justify-content-center",children:i("button",{className:"install-button",onClick:n,children:"Instalar SegundoPalo en la pantalla principal"})})})}),p(PH,{children:[location.pathname!=="/sumatesp"&&location.pathname!=="/colaboracion"&&location.pathname!=="/iniciopremios"&&location.pathname!=="/premiossegundopalo"&&i(z1e,{}),i(W1e,{}),p(EH,{children:[i(Le,{path:"/",element:i(AD,{})}),i(Le,{path:"/partidosmañana",element:i(RD,{})}),i(Le,{path:"/partidosayer",element:i(ND,{})}),i(Le,{path:"/primeraa",element:i(SD,{})}),i(Le,{path:"/primerab",element:i(PD,{})}),i(Le,{path:"/primerac",element:i(Qve,{})}),i(Le,{path:"/primerad1",element:i(gve,{})}),i(Le,{path:"/primerad2",element:i(yve,{})}),i(Le,{path:"/torneointegracion",element:i(p0e,{})}),i(Le,{path:"/uruguay",element:i(Cve,{})}),i(Le,{path:"/primeraafemenino",element:i(e0e,{})}),i(Le,{path:"/primerabfemenino",element:i(n0e,{})}),i(Le,{path:"/primeracfemenino",element:i(b0e,{})}),i(Le,{path:"/argenligazona1",element:i(bve,{})}),i(Le,{path:"/argenligazona2",element:i(vve,{})}),i(Le,{path:"/argenligabzona1",element:i(V0e,{})}),i(Le,{path:"/argenligabzona2",element:i(K0e,{})}),i(Le,{path:"/españafutsal",element:i(n_e,{})}),i(Le,{path:"/laambaelite",element:i(v0e,{})}),i(Le,{path:"/laambaelitefemenino",element:i(_0e,{})}),i(Le,{path:"/copaargentinafutsal",element:i(yX,{})}),i(Le,{path:"/copaargentinafemeninafutsal",element:i(N1e,{})}),i(Le,{path:"/supercopamasculinofutsal",element:i(LZ,{})}),i(Le,{path:"/copadeorofutsal",element:i(Zle,{})}),i(Le,{path:"/uefaclasificacionmunadialfutsal",element:i(_he,{})}),i(Le,{path:"/copadeplatafutsal",element:i(xve,{})}),i(Le,{path:"/copaamericafutsal",element:i(fve,{})}),i(Le,{path:"/concacaffutsal",element:i(Tve,{})}),i(Le,{path:"/lnfafutsal",element:i(h0e,{})}),i(Le,{path:"/copalibertadoresfutsal",element:i(P0e,{})}),i(Le,{path:"/copaafricafutsal",element:i(M0e,{})}),i(Le,{path:"/copaasiafutsal",element:i(W0e,{})}),i(Le,{path:"/mundialfutsal",element:i(w_e,{})}),i(Le,{path:"/copalibertadoresfemeninafutsal",element:i(S1e,{})}),i(Le,{path:"/sextafaltasestadisticas",element:i(lae,{})}),i(Le,{path:"/origendelosgoles",element:i(t0e,{})}),i(Le,{path:"/videos",element:i(hX,{})}),i(Le,{path:"/pruebajugadoresfutsal",element:i(Vle,{})}),i(Le,{path:"/zocalotv",element:i($le,{})}),i(Le,{path:"/marcadorsp",element:i(b1e,{})}),i(Le,{path:"/amistososinternacionalesfutsal",element:i(Ehe,{})}),i(Le,{path:"/rankingfifa",element:i(R1e,{})}),i(Le,{path:"/historialcampeones",element:i(F1e,{})}),i(Le,{path:"/calendario",element:i(wve,{})}),i(Le,{path:"/formulariogoleadores",element:i(e_e,{})}),i(Le,{path:"/legales",element:i(FZ,{})}),i(Le,{path:"/Nosotros",element:i(Ble,{})}),i(Le,{path:"/Contacto",element:i(Ule,{})}),i(Le,{path:"*",element:i(kZ,{})}),i(Le,{path:"/colaboracion",element:i(Sve,{})}),i(Le,{path:"/sumatesp",element:i(y0e,{})}),i(Le,{path:"/ayersupa",element:i(ND,{})}),i(Le,{path:"/pruebasupa",element:i(AD,{})}),i(Le,{path:"/mañanasupa",element:i(RD,{})}),i(Le,{path:"/primeraasupa",element:i(SD,{})}),i(Le,{path:"/primerabsupa",element:i(PD,{})}),i(Le,{path:"/futuro",element:i(DD,{})}),i(Le,{path:"/futuro/:organizador/:genero/:division/:categoria",element:i(DD,{})}),i(Le,{path:"/formulariofuturo",element:i(Xve,{})}),i(Le,{path:"/cuadros",element:i(i_e,{})}),i(Le,{path:"/afa",element:i(y1e,{})}),i(Le,{path:"/premiossegundopalo",element:i(U1e,{})}),i(Le,{path:"/iniciopremios",element:i(G1e,{})})]})]})]})}r1.createRoot(document.getElementById("root")).render(i(ive,{children:i(V1e,{})}));"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/service-worker.js").then(t=>{console.log("Service Worker registrado con éxito:",t)}).catch(t=>{console.log("Error al registrar el Service Worker:",t)})})});export default K1e();